Esempio n. 1
0
 /**
  * @param Fluent $fluent
  * @param array $criteria
  * @return Fluent
  */
 private static function applyCriteria(Fluent $fluent, array $criteria)
 {
     foreach ($criteria as $key => $val) {
         if (is_int($key)) {
             $fluent->where(...$val);
         } else {
             $fluent->where($key, $val);
         }
     }
     return $fluent;
 }
Esempio n. 2
0
 public function depth(Fluent $statement, $depth = NULL)
 {
     if ($depth === NULL) {
         $depth = self::DEFAULT_DEPTH;
     }
     $statement->where('[depth] = %s', $depth);
 }