private function _addRelations(array $params, $primaryKeyName) { foreach (self::$relationNames as $relationName) { if (isset($params[$relationName])) { foreach ($params[$relationName] as $relation => $relationParams) { $this->_addRelation(RelationFactory::create($relationName, $relation, $relationParams, $primaryKeyName)); } } } }
/** * @param array $params { * @var string $class * @var string $localKey * @var string $foreignKey * @var bool $collection * @var string $destinationField * } * @return Relation */ public static function inline($params) { return RelationFactory::inline($params); }