public function getFilters($source)
 {
     $parentFilters = parent::getFilters($source);
     $filters = array();
     foreach ($parentFilters as $filter) {
         $filters[] = $filter->getValue() === null ? $filter : $filter->setValue(new \DateTime($filter->getValue()));
     }
     return $filters;
 }
 public function getFilters($source)
 {
     $parentFilters = parent::getFilters($source);
     $filters = array();
     foreach ($parentFilters as $filter) {
         switch ($filter->getOperator()) {
             case self::OPERATOR_ISNULL:
                 $filters[] = new Filter(self::OPERATOR_ISNULL);
                 $filters[] = new Filter(self::OPERATOR_EQ, '');
                 $this->setDataJunction(self::DATA_DISJUNCTION);
                 break;
             case self::OPERATOR_ISNOTNULL:
                 $filters[] = new Filter(self::OPERATOR_ISNOTNULL);
                 $filters[] = new Filter(self::OPERATOR_NEQ, '');
                 break;
             default:
                 $filters[] = $filter;
         }
     }
     return $filters;
 }
 public function getFilters($source)
 {
     $parentFilters = parent::getFilters($source);
     $filters = array();
     foreach ($parentFilters as $filter) {
         switch ($filter->getOperator()) {
             case self::OPERATOR_EQ:
             case self::OPERATOR_NEQ:
                 $filterValues = (array) $filter->getValue();
                 $value = '';
                 $counter = 1;
                 foreach ($filterValues as $filterValue) {
                     $len = strlen($filterValue);
                     $value .= 'i:' . $counter++ . ';s:' . $len . ':"' . $filterValue . '";';
                 }
                 $filters[] = new Filter($filter->getOperator(), 'a:' . count($filterValues) . ':{' . $value . '}');
                 break;
             case self::OPERATOR_LIKE:
             case self::OPERATOR_NLIKE:
                 $len = strlen($filter->getValue());
                 $value = 's:' . $len . ':"' . $filter->getValue() . '";';
                 $filters[] = new Filter($filter->getOperator(), $value);
                 break;
             case self::OPERATOR_ISNULL:
                 $filters[] = new Filter(self::OPERATOR_ISNULL);
                 $filters[] = new Filter(self::OPERATOR_EQ, 'a:0:{}');
                 $this->setDataJunction(self::DATA_DISJUNCTION);
                 break;
             case self::OPERATOR_ISNOTNULL:
                 $filters[] = new Filter(self::OPERATOR_ISNOTNULL);
                 $filters[] = new Filter(self::OPERATOR_NEQ, 'a:0:{}');
                 break;
             default:
                 $filters[] = $filter;
         }
     }
     return $filters;
 }
 public function getFilters($source)
 {
     $parentFilters = parent::getFilters($source);
     $filters = array();
     foreach ($parentFilters as $filter) {
         // Transforme in number for ODM
         $filters[] = $filter->getValue() === null ? $filter : $filter->setValue($filter->getValue() + 0);
     }
     return $filters;
 }