$58 GRAYBYTE WORDPRESS FILE MANAGER $87

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 172.67.217.254 | ADMIN IP 216.73.216.23
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/home/bravrvjk/itiministry.org/wp-content/plugins/give/src/Framework/Http/Types/

HOME
Current File : /home/bravrvjk/itiministry.org/wp-content/plugins/give/src/Framework/Http/Types//UploadedFile.php
<?php

namespace Give\Framework\Http\Types;

/**
 * The represents the shape of a file from a POST request.
 *
 * @see https://www.php.net/manual/en/reserved.variables.files.php
 *
 * @since 2.32.0
 */
class UploadedFile
{
    /**
     * The original name of the file on the client machine.
     *
     * @var string
     */
    protected $name;
    /**
     * The mime type of the file, if the browser provided this information. An example would be "image/gif". This mime type is however not checked on the PHP side and therefore don't take its value for granted
     *
     * @var string
     */
    protected $browserMimeType;
    /**
     * The temporary filename of the file in which the uploaded file was stored on the server.
     *
     * @var string
     */
    protected $temporaryName;
    /**
     * The error code associated with this file upload.
     *
     * @see https://www.php.net/manual/en/features.file-upload.errors.php
     * @var int
     */
    protected $error;
    /**
     * The size, in bytes, of the uploaded file
     *
     * @var int
     */
    protected $size;

    /**
     * @since 2.32.0
     */
    public static function fromArray(array $fileArray): UploadedFile
    {
        $file = new self();

        $file->name = (string)$fileArray['name'];
        $file->browserMimeType = (string)$fileArray['type'];
        $file->temporaryName = (string)$fileArray['tmp_name'];
        $file->error = (int)$fileArray['error'];
        $file->size = (int)$fileArray['size'];

        return $file;
    }

    /**
     * @since 2.32.0
     */
    public function getName(): string
    {
        return $this->name;
    }

    /**
     * @since 2.32.0
     */
    public function getTemporaryName(): string
    {
        return $this->temporaryName;
    }

    /**
     * @since 2.32.0
     */
    public function getBrowserMimeType(): string
    {
        return $this->browserMimeType;
    }

    /**
     * @since 2.32.0
     *
     * @see https://www.php.net/manual/en/function.is-uploaded-file.php
     */
    public function isUploadedFile(): bool
    {
        return is_uploaded_file($this->temporaryName);
    }

    /**
     * @since 2.32.0
     *
     * @see https://www.php.net/manual/en/function.mime-content-type.php
     */
    public function getMimeType(): string
    {
        return mime_content_type($this->temporaryName);
    }

    /**
     * @since 2.32.0
     */
    public function getSize(): int
    {
        return $this->size;
    }

    /**
     * @since 2.32.0
     */
    public function getError(): int
    {
        return $this->error;
    }
}


Current_dir [ WRITEABLE ] Document_root [ NOT WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
4 Apr 2026 1.57 AM
bravrvjk / bravrvjk
0755
UploadedFile.php
2.548 KB
12 Aug 2023 1.18 AM
bravrvjk / bravrvjk
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF