PHP Класс PartKeepr\UploadedFileBundle\Entity\UploadedFile

Наследование: extends PartKeepr\CoreBundle\Entity\BaseEntity
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
__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.

Защищенные методы

Метод Описание
setType ( string $type ) Sets the type of the file. Once the type is set, it may not be changed later.

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

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

public __construct ( )

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

Returns the created date.
public getCreated ( ) : mixed
Результат mixed

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

Returns the description for this attachment.
public getDescription ( ) : string
Результат string The description

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

Returns the extension for the file.
public getExtension ( ) : string
Результат string The extension

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

Returns the plain filename without path and suffix.
public getFilename ( ) : string
Результат string The plain filename without path and suffix

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

public getFullFilename ( )

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

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.
Устаревший:
public getLegacyExtension ( ) : string
Результат string The extension

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

Returns the mime type for this file.
public getMimeType ( ) : string
Результат string The mimetype for this file, e.g. text/plain

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

Returns the original filename.
public getOriginalFilename ( ) : string
Результат string The original filename

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

Returns the replacement image, if set.
public getReplacement ( ) : mixed
Результат mixed

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

Returns the size of this file.
public getSize ( ) : integer
Результат integer The size in bytes

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

Returns the type of the file.
public getType ( ) : string
Результат string The type of the file

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

setType() защищенный Метод

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