Example #1
0
 public function __construct($operation, array $filters = array())
 {
     if (!in_array($operation, $this->operations)) {
         $operations = implode(', ', $this->operations);
         throw new \Exception("Invalid composite filter operation [{$operation}]. Expected one of: {$operations}");
     }
     $this->operation = $operation;
     foreach ($filters as $filter) {
         if (is_array($filter)) {
             $filter = ColumnFilter::fromArray($filter);
         }
         $this->add($filter);
     }
 }