PHP Класс Josegonzalez\Upload\File\Writer\DefaultWriter

Наследование: implements Josegonzalez\Upload\File\Writer\WriterInterface
Показать файл Открыть проект

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

Свойство Тип Описание
$data array Array of uploaded data for this field
$entity Cake\ORM\Entity Entity instance.
$field string Name of field
$settings array Settings for processing a path
$table Cake\ORM\Table Table instance.

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

Метод Описание
__construct ( Table $table, Cake\ORM\Entity $entity, array $data, string $field, array $settings ) Constructs a writer
delete ( array $files ) : array Deletes a set of files to an output
deletePath ( League\Flysystem\FilesystemInterface $filesystem, string $path ) : boolean Deletes a path from a filesystem
getFilesystem ( string $field, array $settings = [] ) : League\Flysystem\FilesystemInterface Retrieves a configured filesystem for the given field
write ( array $files ) : array Writes a set of files to an output
writeFile ( League\Flysystem\FilesystemInterface $filesystem, string $file, string $path ) : boolean Writes a set of files to an output

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

__construct() публичный Метод

Constructs a writer
public __construct ( Table $table, Cake\ORM\Entity $entity, array $data, string $field, array $settings )
$table Cake\ORM\Table the instance managing the entity
$entity Cake\ORM\Entity the entity to construct a path for.
$data array the data being submitted for a save
$field string the field for which data will be saved
$settings array the settings for the current field

delete() публичный Метод

Deletes a set of files to an output
public delete ( array $files ) : array
$files array the files being written out
Результат array array of results

deletePath() публичный Метод

Deletes a path from a filesystem
public deletePath ( League\Flysystem\FilesystemInterface $filesystem, string $path ) : boolean
$filesystem League\Flysystem\FilesystemInterface a filesystem writer
$path string the path that should be deleted
Результат boolean

getFilesystem() публичный Метод

Retrieves a configured filesystem for the given field
public getFilesystem ( string $field, array $settings = [] ) : League\Flysystem\FilesystemInterface
$field string the field for which data will be saved
$settings array the settings for the current field
Результат League\Flysystem\FilesystemInterface

write() публичный Метод

Writes a set of files to an output
public write ( array $files ) : array
$files array the files being written out
Результат array array of results

writeFile() публичный Метод

Writes a set of files to an output
public writeFile ( League\Flysystem\FilesystemInterface $filesystem, string $file, string $path ) : boolean
$filesystem League\Flysystem\FilesystemInterface a filesystem wrapper
$file string a full path to a temp file
$path string that path to which the file should be written
Результат boolean

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

$data защищенное свойство

Array of uploaded data for this field
protected array $data
Результат array

$entity защищенное свойство

Entity instance.
protected Entity,Cake\ORM $entity
Результат Cake\ORM\Entity

$field защищенное свойство

Name of field
protected string $field
Результат string

$settings защищенное свойство

Settings for processing a path
protected array $settings
Результат array

$table защищенное свойство

Table instance.
protected Table,Cake\ORM $table
Результат Cake\ORM\Table