PHP 클래스 Andrew13\Cabinet\CabinetUpload

상속: extends Illuminate\Database\Eloquent\Model
파일 보기 프로젝트 열기: andrewelkins/cabinet

공개 프로퍼티들

프로퍼티 타입 설명
$app

보호된 프로퍼티들

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