Метод | Описание | |
---|---|---|
__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 |
Метод | Описание | |
---|---|---|
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). |
Метод | Описание | |
---|---|---|
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 | ||
Результат | boolean | always true. |
protected findForeignKeys ( $from, |
||
$matchesRecord | ||
Результат | array | foreign keys with source column names as key and foreign column names as value. |
protected findForeignObjects ( $fields, $indexValues ) : |
||
Результат | foreign objects. |
protected getContext ( ) : |
||
Результат |
protected getCriteria ( ) : TActiveRecordCriteria | ||
Результат | TActiveRecordCriteria |
protected getIndexValues ( $keys, $results ) : array | ||
Результат | array | foreign key index values. |
protected getObjectHash ( $obj, $properties ) : string | ||
Результат | string | object hash using crc32 and serialize. |
abstract public getRelationForeignKeys ( ) : array | ||
Результат | array | foreign key field names as key and object properties as value. |
protected getSourceRecord ( ) : |
||
Результат |
protected populateResult ( &$results, $properties, &$fkObjects, $fields ) |
protected setObjectProperty ( $source, $properties, &$collections ) |
protected setResultCollection ( array &$results, array &$collections, $properties ) | ||
$results | array | |
$collections | array |