PHP Класс Codesleeve\Stapler\Factories\File

Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$mimeTypeExtensionGuesser Symfony\Component\HttpFoundation\File\MimeType\ExtensionGuesserInterface A instance of Symfony's MIME type extension guesser interface.

Открытые методы

Метод Описание
create ( mixed $file, boolean $testing = false ) : Codesleeve\Stapler\File\UploadedFile Build a Codesleeve\Stapler\UploadedFile object using various file input types.
getMimeTypeExtensionGuesserInstance ( ) : Symfony\Component\HttpFoundation\File\MimeType\MimeTypeExtensionGuesserInterface Return an instance of the Symfony MIME type extension guesser.
setConfigInstance ( Codesleeve\Stapler\Interfaces\Config $config ) Set the configuration object instance.

Защищенные методы

Метод Описание
createFromArray ( array $file, boolean $testing ) : Codesleeve\Stapler\File\File Build a Codesleeve\Stapler\File\File object from the raw php $_FILES array date. We assume here that the $_FILES array has been formated using the Stapler::arrangeFiles utility method.
createFromDataURI ( string $file ) : Codesleeve\Stapler\File\File Compose a \Codesleeve\Stapler\File\UploadedFile object from a data uri.
createFromObject ( Symfony\Component\HttpFoundation\File\UploadedFile $file ) : Codesleeve\Stapler\File\UploadedFile Compose a \Codesleeve\Stapler\File\UploadedFile object from a \Symfony\Component\HttpFoundation\File\UploadedFile object.
createFromString ( string $file ) : Codesleeve\Stapler\File\File Fetch a local file using a string location and convert it into an instance of \Codesleeve\Stapler\File\File.
createFromUrl ( string $file ) : Codesleeve\Stapler\File\File Fetch a remote file using a string URL and convert it into an instance of Codesleeve\Stapler\File\File.

Описание методов

create() публичный статический метод

Build a Codesleeve\Stapler\UploadedFile object using various file input types.
public static create ( mixed $file, boolean $testing = false ) : Codesleeve\Stapler\File\UploadedFile
$file mixed
$testing boolean
Результат Codesleeve\Stapler\File\UploadedFile

createFromArray() защищенный статический метод

Build a Codesleeve\Stapler\File\File object from the raw php $_FILES array date. We assume here that the $_FILES array has been formated using the Stapler::arrangeFiles utility method.
protected static createFromArray ( array $file, boolean $testing ) : Codesleeve\Stapler\File\File
$file array
$testing boolean
Результат Codesleeve\Stapler\File\File

createFromDataURI() защищенный статический метод

Compose a \Codesleeve\Stapler\File\UploadedFile object from a data uri.
protected static createFromDataURI ( string $file ) : Codesleeve\Stapler\File\File
$file string
Результат Codesleeve\Stapler\File\File

createFromObject() защищенный статический метод

Compose a \Codesleeve\Stapler\File\UploadedFile object from a \Symfony\Component\HttpFoundation\File\UploadedFile object.
protected static createFromObject ( Symfony\Component\HttpFoundation\File\UploadedFile $file ) : Codesleeve\Stapler\File\UploadedFile
$file Symfony\Component\HttpFoundation\File\UploadedFile
Результат Codesleeve\Stapler\File\UploadedFile

createFromString() защищенный статический метод

Fetch a local file using a string location and convert it into an instance of \Codesleeve\Stapler\File\File.
protected static createFromString ( string $file ) : Codesleeve\Stapler\File\File
$file string
Результат Codesleeve\Stapler\File\File

createFromUrl() защищенный статический метод

Fetch a remote file using a string URL and convert it into an instance of Codesleeve\Stapler\File\File.
protected static createFromUrl ( string $file ) : Codesleeve\Stapler\File\File
$file string
Результат Codesleeve\Stapler\File\File

getMimeTypeExtensionGuesserInstance() публичный статический метод

Return an instance of the Symfony MIME type extension guesser.
public static getMimeTypeExtensionGuesserInstance ( ) : Symfony\Component\HttpFoundation\File\MimeType\MimeTypeExtensionGuesserInterface
Результат Symfony\Component\HttpFoundation\File\MimeType\MimeTypeExtensionGuesserInterface

setConfigInstance() публичный статический метод

Set the configuration object instance.
public static setConfigInstance ( Codesleeve\Stapler\Interfaces\Config $config )
$config Codesleeve\Stapler\Interfaces\Config

Описание свойств

$mimeTypeExtensionGuesser защищенное статическое свойство

A instance of Symfony's MIME type extension guesser interface.
protected static ExtensionGuesserInterface,Symfony\Component\HttpFoundation\File\MimeType $mimeTypeExtensionGuesser
Результат Symfony\Component\HttpFoundation\File\MimeType\ExtensionGuesserInterface