PHP Класс OphCoTherapyapplication_FileCollection

A File Collection points to one or more PDF that can be attached to a therapy application
Наследование: extends BaseActiveRecordVersioned
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
behaviors ( )
checkMimeType ( string $file ) : boolean function to check if a file is the right type to become part of a collection.
defaultScope ( ) set the ordering based on the name of the collections.
getDownloadURL ( ) : string return the download url for the compressed file of this collection.
getZipFile ( ) : ProtectedFile get a compressed zip file containing all the files in the collection.
model ( $className = __CLASS__ ) : the Returns the static model of the specified AR class.
relations ( ) : array
removeFileById ( $file_id ) : boolean removes a protected file associated with the collection.
rules ( ) : array
tableName ( ) : string
updateFiles ( int[] $file_ids ) update the files for this collection.

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

Метод Описание
cleanCompressedFile ( ) removes the compressed file association for this collection. Should be called when the files for it are changed so that a new compressed file is created when needed.

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

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

public behaviors ( )

checkMimeType() публичный статический Метод

function to check if a file is the right type to become part of a collection.
public static checkMimeType ( string $file ) : boolean
$file string
Результат boolean

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

will also call the delete function on the protected file itself to remove orphaned files
protected cleanCompressedFile ( )

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

(non-PHPdoc)
См. также: CActiveRecord::defaultScope()
public defaultScope ( )

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

return the download url for the compressed file of this collection.
public getDownloadURL ( ) : string
Результат string URL

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

get a compressed zip file containing all the files in the collection.
public getZipFile ( ) : ProtectedFile
Результат ProtectedFile

model() публичный статический Метод

Returns the static model of the specified AR class.
public static model ( $className = __CLASS__ ) : the
Результат the static model class

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

public relations ( ) : array
Результат array relational rules.

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

removes a protected file associated with the collection.
public removeFileById ( $file_id ) : boolean
$file_id
Результат boolean

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

public rules ( ) : array
Результат array validation rules for model attributes.

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

public tableName ( ) : string
Результат string the associated database table name

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

update the files for this collection.
public updateFiles ( int[] $file_ids )
$file_ids int[] - array of ProtectedFile ids to assign to the collection