PHP 클래스 Josegonzalez\Upload\File\Writer\DefaultWriter

상속: implements Josegonzalez\Upload\File\Writer\WriterInterface
파일 보기 프로젝트 열기: josegonzalez/cakephp-upload

보호된 프로퍼티들

프로퍼티 타입 설명
$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