Method | Description | |
---|---|---|
__construct ( $record, $property = null, $relation = null ) | ||
getAssociationTable ( ) : string | ||
getCondition ( ) : string | ||
getFkField ( ) : string | ||
getForeignRecordClass ( ) : string | ||
getForeignRecordFinder ( ) : |
||
getParameters ( ) : array | ||
getProperty ( ) : string | ||
getPropertyValue ( ) | ||
getRelationForeignKeys ( ) : array | ||
getRelationHandler ( $criteria = null ) : |
Creates and return the TActiveRecordRelation handler for specific relationships. | |
getRelationType ( ) : string | ||
getSourceRecord ( ) : |
||
hasAssociationTable ( ) : boolean | ||
hasFkField ( ) : boolean | ||
hasRecordRelation ( ) : boolean | ||
updateAssociatedRecords ( $updateBelongsTo = false ) : TActiveRecordRelationCommand |
Method | Description | |
---|---|---|
isEmptyFkObject ( $obj ) |
public getAssociationTable ( ) : string | ||
return | string | the M-N relationship association table name. |
public getCondition ( ) : string | ||
return | string | the query condition for the relation as specified in RELATIONS |
public getFkField ( ) : string | ||
return | string | foreign key field names, comma delimited. |
public getForeignRecordClass ( ) : string | ||
return | string | foreign record class name. |
public getForeignRecordFinder ( ) : |
||
return | corresponding relationship foreign object finder instance. |
public getParameters ( ) : array | ||
return | array | the query parameters for the relation as specified in RELATIONS |
public getProperty ( ) : string | ||
return | string | name of the record property that the relationship results will be assigned to. |
public getRelationForeignKeys ( ) : array | ||
return | array | foreign key of this relations, the keys is dependent on the relationship type. |
public getRelationHandler ( $criteria = null ) : |
||
return | record relationship handler instnace. |
public getRelationType ( ) : string | ||
return | string | HAS_MANY, HAS_ONE, or BELONGS_TO |
public getSourceRecord ( ) : |
||
return | the active record instance that queried for its related records. |
public hasAssociationTable ( ) : boolean | ||
return | boolean | true if the relationship is HAS_MANY and requires an association table. |
public hasFkField ( ) : boolean | ||
return | boolean | true if the 3rd element of an TActiveRecord::$RELATION entry is set. |
public hasRecordRelation ( ) : boolean | ||
return | boolean | true if the relation is defined in TActiveRecord::$RELATIONS |
public updateAssociatedRecords ( $updateBelongsTo = false ) : TActiveRecordRelationCommand | ||
return | TActiveRecordRelationCommand |