Пример #1
0
 /**
  * @param Where $where
  * @param array $whereArray
  *
  * @return array
  */
 protected function writeSubWheres(Where $where, array &$whereArray)
 {
     $subWheres = $where->getSubWheres();
     array_walk($subWheres, function (&$subWhere) {
         $subWhere = "({$this->writeWhere($subWhere)})";
     });
     $whereArray = array_merge($whereArray, $subWheres);
 }
Пример #2
0
 /**
  * @test
  */
 public function itShouldReturnDefaultSubWhere()
 {
     $this->assertSame(array(), $this->where->getSubWheres());
 }
Пример #3
0
 /**
  * @param Where $where
  * @param array $whereArray
  *
  * @return array
  */
 public function writeSubWheres(Where $where, array &$whereArray)
 {
     $subWheres = $where->getSubWheres();
     $me = $this;
     array_walk($subWheres, function (&$subWhere) use($me) {
         $subWhere = "({$me->writeWhere($subWhere)})";
     });
     $whereArray = array_merge($whereArray, $subWheres);
 }