normalizeMap() 공개 정적인 메소드

Takes either a flat array of relationships or a nested key=>value array and returns it as a nested format
public static normalizeMap ( $array ) : array
리턴 array
예제 #1
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;
 }