/** * Create a new date filter. * * Only one of the filter bounds may be 0, indicating a no limit in that * direction. * * @param string $field The name of the field that should be filtered. * @param string $start Start of filter range (or 0 for no start filter) * @param string $end End of filter range (or 0 for no end filter) */ public function __construct($field, $start, $end) { parent::__construct($field); if ($start == 0 && $end == 0) { throw new midcom_error('Both start and end of a datefilter must not be 0.'); } $this->_start = $start; $this->_end = $end; $this->type = 'datefilter'; }