PHP Class PartKeepr\UploadedFileBundle\Entity\UploadedFile

Inheritance: extends PartKeepr\CoreBundle\Entity\BaseEntity
Mostrar archivo Open project: partkeepr/PartKeepr Class Usage Examples

Public Methods

Method 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.

Protected Methods

Method 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 method

public __construct ( )

getCreated() public method

Returns the created date.
public getCreated ( ) : mixed
return mixed

getDescription() public method

Returns the description for this attachment.
public getDescription ( ) : string
return string The description

getExtension() public method

Returns the extension for the file.
public getExtension ( ) : string
return string The extension

getFilename() public method

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

getFullFilename() public method

public getFullFilename ( )

getLegacyExtension() public method

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
return string The extension

getMimeType() public method

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

getOriginalFilename() public method

Returns the original filename.
public getOriginalFilename ( ) : string
return string The original filename

getReplacement() public method

Returns the replacement image, if set.
public getReplacement ( ) : mixed
return mixed

getSize() public method

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

getType() public method

Returns the type of the file.
public getType ( ) : string
return string The type of the file

setCreated() public method

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

setDescription() public method

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

setExtension() public method

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

setFilename() public method

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

setMimeType() public method

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

setOriginalFilename() public method

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

setReplacement() public method

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

setSize() public method

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

setType() protected method

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