Method | Description | |
---|---|---|
__call ( $method, $args ) : mixed | Dispatch the method calls to the source record finder object. When an instance of TActiveRecord or an array of TActiveRecord is returned the corresponding foreign objects are also fetched and assigned. | |
__construct ( |
||
fetchResultsInto ( $obj ) : boolean | Fetch results for current relationship. | |
getRelationForeignKeys ( ) : array |
Method | Description | |
---|---|---|
collectForeignObjects ( &$results ) | ||
findForeignKeys ( $from, |
Returns foreign keys in $fromRecord with source column names as key and foreign column names in the corresponding $matchesRecord as value. | |
findForeignObjects ( $fields, $indexValues ) : |
Fetches the foreign objects using TActiveRecord::findAllByIndex() | |
getContext ( ) : |
||
getCriteria ( ) : TActiveRecordCriteria | ||
getIndexValues ( $keys, $results ) : array | Obtain the foreign key index values from the results. | |
getObjectHash ( $obj, $properties ) : string | ||
getSourceRecord ( ) : |
||
populateResult ( &$results, $properties, &$fkObjects, $fields ) | Populate the results with the foreign objects found. | |
setObjectProperty ( $source, $properties, &$collections ) | Sets the foreign objects to the given property on the source object. | |
setResultCollection ( array &$results, array &$collections, $properties ) | Populates the result array with foreign objects (matched using foreign key hashed property values). |
Method | Description | |
---|---|---|
getFkFields ( $fkeys ) | Find matching foreign key fields from the 3rd element of an entry in TActiveRecord::$RELATION. |
public __construct ( |
||
$context |
abstract protected collectForeignObjects ( &$results ) |
public fetchResultsInto ( $obj ) : boolean | ||
return | boolean | always true. |
protected findForeignKeys ( $from, |
||
$matchesRecord | ||
return | array | foreign keys with source column names as key and foreign column names as value. |
protected findForeignObjects ( $fields, $indexValues ) : |
||
return | foreign objects. |
protected getContext ( ) : |
||
return |
protected getCriteria ( ) : TActiveRecordCriteria | ||
return | TActiveRecordCriteria |
protected getIndexValues ( $keys, $results ) : array | ||
return | array | foreign key index values. |
protected getObjectHash ( $obj, $properties ) : string | ||
return | string | object hash using crc32 and serialize. |
abstract public getRelationForeignKeys ( ) : array | ||
return | array | foreign key field names as key and object properties as value. |
protected getSourceRecord ( ) : |
||
return |
protected populateResult ( &$results, $properties, &$fkObjects, $fields ) |
protected setObjectProperty ( $source, $properties, &$collections ) |
protected setResultCollection ( array &$results, array &$collections, $properties ) | ||
$results | array | |
$collections | array |