PHP Class Andrew13\Cabinet\CabinetUpload

Inheritance: extends Illuminate\Database\Eloquent\Model
Afficher le fichier Open project: andrewelkins/cabinet

Méthodes publiques

Свойство Type Description
$app

Protected Properties

Свойство Type Description
$dateFolderPath

Méthodes publiques

Méthode Description
__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.

Method Details

__construct() public méthode

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

children() public méthode

Get children uploads
public children ( ) : Illuminate\Database\Eloquent\Relations\HasMany
Résultat Illuminate\Database\Eloquent\Relations\HasMany

cleanPath() public méthode

public cleanPath ( $path )

generateThumbnails() public méthode

public generateThumbnails ( $folder, $file )

getBasename() public méthode

public getBasename ( $file )

getUploadFolder() public méthode

Get upload path with date folders
public getUploadFolder ( $date = null ) : string
$date
Résultat string

process() public méthode

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

resolveFileName() public méthode

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
Résultat array

upload() public méthode

Handles folder creation.
public upload ( Symfony\Component\HttpFoundation\File\UploadedFile &$file ) : array
$file Symfony\Component\HttpFoundation\File\UploadedFile
Résultat array

user() public méthode

Get the uploads owner.
public user ( ) : User
Résultat User

verifyImageType() public méthode

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
Résultat boolean

verifyUploadType() public méthode

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

Property Details

$app public_oe static_oe property

public static $app

$dateFolderPath protected_oe property

protected $dateFolderPath