예제 #1
0
파일: HasMany.php 프로젝트: lox/pheasant
 /**
  * Constructor
  */
 public function __construct($class, $local, $foreign = null)
 {
     parent::__construct($class, $local, $foreign);
 }
예제 #2
0
파일: BelongsTo.php 프로젝트: lox/pheasant
 /**
  * Constructor
  *
  */
 public function __construct($class, $local, $foreign = null, $allowEmpty = false)
 {
     parent::__construct($class, $local, $foreign);
     $this->_allowEmpty = $allowEmpty;
 }
예제 #3
0
파일: Collection.php 프로젝트: lox/pheasant
 /**
  * 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;
 }