Свойство | Тип | Описание | |
---|---|---|---|
$_source_path | used in model creation | ||
$_stored_path | used in model delete | ||
$_thumbnail |
Метод | Описание | |
---|---|---|
afterDelete ( ) | ensures file is removed from filesystem when deleting. | |
beforeDelete ( ) : boolean | ensure we keep track of path to file before deleting from database. | |
beforeSave ( ) | (non-PHPdoc). | |
beforeValidate ( ) | ensures that mimetype and size are set based on the file that's been stored (unless the file is being copied from elsewhere, in which case this should have been taken care of). | |
createForWriting ( string $name ) : ProtectedFile | create a new protected file object which has properties that can be used for writing an actual file to. | |
createFromFile ( string $path ) : ProtectedFile | Create a new protected file from an existing file. | |
generateUID ( ) | generate the UID for the file from the file name. | |
getBasePath ( ) : string | Path to protected file storage. | |
getDownloadURL ( ) : string | get URL for downloading this file. | |
getFilePath ( ) : string | Path to file without filename. | |
getPath ( ) : string | Path to file. | |
getThumbnail ( string $dimensions, $regenerate = false ) : boolean | array: | Get thumbnail of image (generated automatically if not already created). | |
hasThumbnail ( ) : boolean | Has the file got a thumbnail. | |
model ( $className = __CLASS__ ) : ProtectedFile | Returns the static model of the specified AR class. | |
relations ( ) : array | ||
rules ( ) : array | ||
setSource ( string $path ) | Initialise protected file from a source file. | |
tableName ( ) : string |
Метод | Описание | |
---|---|---|
generateThumbnail ( string $dimensions ) : boolean | Generate a thumbnail. | |
getThumbnailPath ( string $dimensions ) : string | Get the path for a thumbnail. | |
lookupMimetype ( string $path ) : string | Get the mime type of the file. |
public afterDelete ( ) |
public beforeDelete ( ) : boolean | ||
Результат | boolean | (non-PHPdoc) |
public static createForWriting ( string $name ) : ProtectedFile | ||
$name | string | |
Результат | ProtectedFile |
public static createFromFile ( string $path ) : ProtectedFile | ||
$path | string | Path to file |
Результат | ProtectedFile |
protected generateThumbnail ( string $dimensions ) : boolean | ||
$dimensions | string | |
Результат | boolean |
public generateUID ( ) |
public static getBasePath ( ) : string | ||
Результат | string |
public getDownloadURL ( ) : string | ||
Результат | string |
public getFilePath ( ) : string | ||
Результат | string |
public getThumbnail ( string $dimensions, $regenerate = false ) : boolean | array: | ||
$dimensions | string | |
Результат | boolean | array: |
protected getThumbnailPath ( string $dimensions ) : string | ||
$dimensions | string | |
Результат | string |
public hasThumbnail ( ) : boolean | ||
Результат | boolean |
protected lookupMimetype ( string $path ) : string | ||
$path | string | |
Результат | string |
public static model ( $className = __CLASS__ ) : ProtectedFile | ||
Результат | ProtectedFile | the static model class |