프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$file | Symfony\Component\HttpFoundation\File\UploadedFile | ||
$fileName | string | ||
$oldFileName | string |
메소드 | 설명 | |
---|---|---|
__toString ( ) : string | Returns a string representation of the image. | |
fromString ( string $fileName ) : static | ||
fromUploadedFile ( Symfony\Component\HttpFoundation\File\UploadedFile $uploadedFile = null ) : static | ||
getAbsolutePath ( ) : string | null | ||
getFile ( ) : Symfony\Component\HttpFoundation\File\UploadedFile | Get file. | |
getFileName ( ) : string | ||
getWebPath ( ) : string | ||
markForDeletion ( ) | The next time doctrine saves this to the database the file will be removed | |
prepareToUpload ( ) | This function should be called for the life cycle events @ORM\PrePersist() and @ORM\PreUpdate() | |
remove ( ) | This function should be called for the life cycle event @ORM\PostRemove() | |
setFile ( Symfony\Component\HttpFoundation\File\UploadedFile $file = null ) : static | Sets file. | |
upload ( ) | This function should be called for the life cycle events @ORM\PostPersist() and @ORM\PostUpdate() |
메소드 | 설명 | |
---|---|---|
__construct ( string $fileName ) | ||
getTrimmedUploadDir ( ) : string | ||
getUploadDir ( ) : string | The dir in the web folder where the file needs to be uploaded. | |
getUploadRootDir ( ) : string | ||
removeOldFile ( ) | This will remove the old file, can be extended to add extra functionality | |
writeFileToDisk ( ) | if there is an error when moving the file, an exception will be automatically thrown by move(). This will properly prevent the entity from being persisted to the database on error |
public __toString ( ) : string | ||
리턴 | string |
public static fromString ( string $fileName ) : static | ||
$fileName | string | |
리턴 | static |
public static fromUploadedFile ( Symfony\Component\HttpFoundation\File\UploadedFile $uploadedFile = null ) : static | ||
$uploadedFile | Symfony\Component\HttpFoundation\File\UploadedFile | |
리턴 | static |
public getFile ( ) : Symfony\Component\HttpFoundation\File\UploadedFile | ||
리턴 | Symfony\Component\HttpFoundation\File\UploadedFile |
abstract protected getUploadDir ( ) : string | ||
리턴 | string |
public markForDeletion ( ) |
public prepareToUpload ( ) |
public remove ( ) |
protected removeOldFile ( ) |
public setFile ( Symfony\Component\HttpFoundation\File\UploadedFile $file = null ) : static | ||
$file | Symfony\Component\HttpFoundation\File\UploadedFile | |
리턴 | static |
public upload ( ) |
protected writeFileToDisk ( ) |
protected UploadedFile,Symfony\Component\HttpFoundation\File $file | ||
리턴 | Symfony\Component\HttpFoundation\File\UploadedFile |