PHP 클래스 Prado\Data\ActiveRecord\Relations\TActiveRecordRelationContext

This class is use internally by passing a context to the TActiveRecordRelation constructor.
부터: 3.1
파일 보기 프로젝트 열기: pradosoft/prado 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( $record, $property = null, $relation = null )
getAssociationTable ( ) : string
getCondition ( ) : string
getFkField ( ) : string
getForeignRecordClass ( ) : string
getForeignRecordFinder ( ) : TActiveRecord
getParameters ( ) : array
getProperty ( ) : string
getPropertyValue ( )
getRelationForeignKeys ( ) : array
getRelationHandler ( $criteria = null ) : TActiveRecordRelation Creates and return the TActiveRecordRelation handler for specific relationships.
getRelationType ( ) : string
getSourceRecord ( ) : TActiveRecord
hasAssociationTable ( ) : boolean
hasFkField ( ) : boolean
hasRecordRelation ( ) : boolean
updateAssociatedRecords ( $updateBelongsTo = false ) : TActiveRecordRelationCommand

보호된 메소드들

메소드 설명
isEmptyFkObject ( $obj )

메소드 상세

__construct() 공개 메소드

public __construct ( $record, $property = null, $relation = null )

getAssociationTable() 공개 메소드

public getAssociationTable ( ) : string
리턴 string the M-N relationship association table name.

getCondition() 공개 메소드

부터: 3.1.2
public getCondition ( ) : string
리턴 string the query condition for the relation as specified in RELATIONS

getFkField() 공개 메소드

부터: 3.1.2
public getFkField ( ) : string
리턴 string foreign key field names, comma delimited.

getForeignRecordClass() 공개 메소드

public getForeignRecordClass ( ) : string
리턴 string foreign record class name.

getForeignRecordFinder() 공개 메소드

public getForeignRecordFinder ( ) : TActiveRecord
리턴 Prado\Data\ActiveRecord\TActiveRecord corresponding relationship foreign object finder instance.

getParameters() 공개 메소드

부터: 3.1.2
public getParameters ( ) : array
리턴 array the query parameters for the relation as specified in RELATIONS

getProperty() 공개 메소드

public getProperty ( ) : string
리턴 string name of the record property that the relationship results will be assigned to.

getPropertyValue() 공개 메소드

public getPropertyValue ( )

getRelationForeignKeys() 공개 메소드

부터: 3.1.2
public getRelationForeignKeys ( ) : array
리턴 array foreign key of this relations, the keys is dependent on the relationship type.

getRelationHandler() 공개 메소드

An instance of TActiveRecordHasOne, TActiveRecordBelongsTo, TActiveRecordHasMany, or TActiveRecordHasManyAssocation will be returned.
public getRelationHandler ( $criteria = null ) : TActiveRecordRelation
리턴 TActiveRecordRelation record relationship handler instnace.

getRelationType() 공개 메소드

public getRelationType ( ) : string
리턴 string HAS_MANY, HAS_ONE, or BELONGS_TO

getSourceRecord() 공개 메소드

public getSourceRecord ( ) : TActiveRecord
리턴 Prado\Data\ActiveRecord\TActiveRecord the active record instance that queried for its related records.

hasAssociationTable() 공개 메소드

public hasAssociationTable ( ) : boolean
리턴 boolean true if the relationship is HAS_MANY and requires an association table.

hasFkField() 공개 메소드

부터: 3.1.2
public hasFkField ( ) : boolean
리턴 boolean true if the 3rd element of an TActiveRecord::$RELATION entry is set.

hasRecordRelation() 공개 메소드

부터: 3.1.2
public hasRecordRelation ( ) : boolean
리턴 boolean true if the relation is defined in TActiveRecord::$RELATIONS

isEmptyFkObject() 보호된 메소드

protected isEmptyFkObject ( $obj )

updateAssociatedRecords() 공개 메소드

public updateAssociatedRecords ( $updateBelongsTo = false ) : TActiveRecordRelationCommand
리턴 TActiveRecordRelationCommand