PHP Class OEModule\PASAPI\models\PasApiAssignment

Inheritance: extends BaseActiveRecord
Afficher le fichier Open project: openeyes/openeyes Class Usage Examples

Méthodes publiques

Méthode Description
findByResource ( string $resource_type, string $resource_id, $internal_type = null ) : PasApiAssignment Find or create association using resource details and lock.
getInternal ( boolean $force_create = false ) : CActiveRecord Returns the internal model that this assignment is associated with (or a new instance if it has not been attached yet).
model ( $className = __CLASS__ ) : PasApiAssignment Returns the static model of the specified AR class.
rules ( ) : array
tableName ( ) : string
unlock ( ) Unlock the assignment.

Méthodes protégées

Méthode Description
getLockKey ( $resource_type, $resource_id )
lock ( $resource_type, $resource_id ) Lock the assignment so no other instances can clash with efforts to create or update the record.

Method Details

findByResource() public méthode

Find or create association using resource details and lock.
public findByResource ( string $resource_type, string $resource_id, $internal_type = null ) : PasApiAssignment
$resource_type string
$resource_id string
Résultat PasApiAssignment

getInternal() public méthode

if force_create is true, it will create a new instance if the internal id cannot find the internal model. This allows for fault tolerance on internal models that might be deleted by other means.
public getInternal ( boolean $force_create = false ) : CActiveRecord
$force_create boolean
Résultat CActiveRecord

getLockKey() protected méthode

protected getLockKey ( $resource_type, $resource_id )

lock() protected méthode

Lock the assignment so no other instances can clash with efforts to create or update the record.
protected lock ( $resource_type, $resource_id )
$resource_type
$resource_id

model() public static méthode

Returns the static model of the specified AR class.
public static model ( $className = __CLASS__ ) : PasApiAssignment
Résultat PasApiAssignment the static model class

rules() public méthode

public rules ( ) : array
Résultat array validation rules for model attributes.

tableName() public méthode

public tableName ( ) : string
Résultat string the associated database table name

unlock() public méthode

Unlock the assignment.
public unlock ( )