/** * Constructor */ public function __construct($class, $local, $foreign = null) { parent::__construct($class, $local, $foreign); }
/** * Constructor * */ public function __construct($class, $local, $foreign = null, $allowEmpty = false) { parent::__construct($class, $local, $foreign); $this->_allowEmpty = $allowEmpty; }
/** * Eager load relationships to avoid the N+1 problem * @chainable */ public function includes($rels) { foreach (Relationship::normalizeMap($rels) as $alias => $nested) { $this->_includes[$alias] = new Relationships\Includer($this->_query, $this->_schema->relationship($alias), $nested); } return $this; }