PHP Class PartKeepr\UploadedFileBundle\Entity\UploadedFile

Inheritance: extends PartKeepr\CoreBundle\Entity\BaseEntity
Afficher le fichier Open project: partkeepr/PartKeepr Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( )
getCreated ( ) : mixed Returns the created date.
getDescription ( ) : string Returns the description for this attachment.
getExtension ( ) : string Returns the extension for the file.
getFilename ( ) : string Returns the plain filename without path and suffix.
getFullFilename ( )
getLegacyExtension ( ) : string Returns the extension for the given mime type.
getMimeType ( ) : string Returns the mime type for this file.
getOriginalFilename ( ) : string Returns the original filename.
getReplacement ( ) : mixed Returns the replacement image, if set.
getSize ( ) : integer Returns the size of this file.
getType ( ) : string Returns the type of the file.
setCreated ( mixed $created ) Sets the created date.
setDescription ( string $description ) Sets the description for this attachment.
setExtension ( string $extension ) Sets the extension for this file.
setFilename ( $filename ) Sets the plain filename without path and suffix.
setMimeType ( string $mimeType ) Sets the mimetype for this file.
setOriginalFilename ( string $filename ) Sets the original filename.
setReplacement ( $replacement ) Sets a replacement image.
setSize ( integer $size ) Sets the size of the file.

Méthodes protégées

Méthode Description
setType ( string $type ) Sets the type of the file. Once the type is set, it may not be changed later.

Method Details

__construct() public méthode

public __construct ( )

getCreated() public méthode

Returns the created date.
public getCreated ( ) : mixed
Résultat mixed

getDescription() public méthode

Returns the description for this attachment.
public getDescription ( ) : string
Résultat string The description

getExtension() public méthode

Returns the extension for the file.
public getExtension ( ) : string
Résultat string The extension

getFilename() public méthode

Returns the plain filename without path and suffix.
public getFilename ( ) : string
Résultat string The plain filename without path and suffix

getFullFilename() public méthode

public getFullFilename ( )

getLegacyExtension() public méthode

This function simply extracts that information from the mime type; special cases are not handled. e.g. if you have image/foobar, it would return "foobar" as extension.
Deprecation:
public getLegacyExtension ( ) : string
Résultat string The extension

getMimeType() public méthode

Returns the mime type for this file.
public getMimeType ( ) : string
Résultat string The mimetype for this file, e.g. text/plain

getOriginalFilename() public méthode

Returns the original filename.
public getOriginalFilename ( ) : string
Résultat string The original filename

getReplacement() public méthode

Returns the replacement image, if set.
public getReplacement ( ) : mixed
Résultat mixed

getSize() public méthode

Returns the size of this file.
public getSize ( ) : integer
Résultat integer The size in bytes

getType() public méthode

Returns the type of the file.
public getType ( ) : string
Résultat string The type of the file

setCreated() public méthode

Sets the created date.
public setCreated ( mixed $created )
$created mixed

setDescription() public méthode

Sets the description for this attachment.
public setDescription ( string $description )
$description string The attachment description

setExtension() public méthode

Sets the extension for this file.
public setExtension ( string $extension )
$extension string The extension

setFilename() public méthode

Sets the plain filename without path and suffix.
public setFilename ( $filename )
$filename string The plain filename without path and suffix

setMimeType() public méthode

Sets the mimetype for this file.
public setMimeType ( string $mimeType )
$mimeType string The mimetype

setOriginalFilename() public méthode

Sets the original filename.
public setOriginalFilename ( string $filename )
$filename string The original filename

setReplacement() public méthode

Sets a replacement image.
public setReplacement ( $replacement )
$replacement

setSize() public méthode

Sets the size of the file.
public setSize ( integer $size )
$size integer The size in bytes

setType() protected méthode

Sets the type of the file. Once the type is set, it may not be changed later.
protected setType ( string $type )
$type string The type of the file