PHP Класс Andrew13\Cabinet\CabinetUpload

Наследование: extends Illuminate\Database\Eloquent\Model
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
$app

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

Свойство Тип Описание
$dateFolderPath

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

Метод Описание
__construct ( array $attributes = [] ) Create a new CabinetUpload instance.
children ( ) : Illuminate\Database\Eloquent\Relations\HasMany Get children uploads
cleanPath ( $path )
generateThumbnails ( $folder, $file )
getBasename ( $file )
getUploadFolder ( $date = null ) : string Get upload path with date folders
process ( Symfony\Component\HttpFoundation\File\UploadedFile $file )
resolveFileName ( string $folder, Symfony\Component\HttpFoundation\File\UploadedFile $file, boolean $enableObfuscation = true ) : array Resolve whether the file exists and if it already does, change the file name.
upload ( Symfony\Component\HttpFoundation\File\UploadedFile &$file ) : array Upload a file.
user ( ) : User Get the uploads owner.
verifyImageType ( Symfony\Component\HttpFoundation\File\UploadedFile $file ) : boolean Checks the upload vs the upload types in the config.
verifyUploadType ( Symfony\Component\HttpFoundation\File\UploadedFile $file ) Checks the upload vs the upload types in the config.

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

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

Create a new CabinetUpload instance.
public __construct ( array $attributes = [] )
$attributes array

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

Get children uploads
public children ( ) : Illuminate\Database\Eloquent\Relations\HasMany
Результат Illuminate\Database\Eloquent\Relations\HasMany

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

public cleanPath ( $path )

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

public generateThumbnails ( $folder, $file )

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

public getBasename ( $file )

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

Get upload path with date folders
public getUploadFolder ( $date = null ) : string
$date
Результат string

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

public process ( Symfony\Component\HttpFoundation\File\UploadedFile $file )
$file Symfony\Component\HttpFoundation\File\UploadedFile

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

Resolve whether the file exists and if it already does, change the file name.
public resolveFileName ( string $folder, Symfony\Component\HttpFoundation\File\UploadedFile $file, boolean $enableObfuscation = true ) : array
$folder string
$file Symfony\Component\HttpFoundation\File\UploadedFile
$enableObfuscation boolean
Результат array

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

Handles folder creation.
public upload ( Symfony\Component\HttpFoundation\File\UploadedFile &$file ) : array
$file Symfony\Component\HttpFoundation\File\UploadedFile
Результат array

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

Get the uploads owner.
public user ( ) : User
Результат User

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

Checks the upload vs the upload types in the config.
public verifyImageType ( Symfony\Component\HttpFoundation\File\UploadedFile $file ) : boolean
$file Symfony\Component\HttpFoundation\File\UploadedFile
Результат boolean

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

Checks the upload vs the upload types in the config.
public verifyUploadType ( Symfony\Component\HttpFoundation\File\UploadedFile $file )
$file Symfony\Component\HttpFoundation\File\UploadedFile

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

$app публичное статическое свойство

public static $app

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

protected $dateFolderPath