<?php
namespace App\Model\Query\ConditionQuery\Type;
use App\Model\Query\ConditionQuery\AbstractType;
use App\Model\Query\ConditionQuery\Condition\EqualCondition;
use App\Model\Query\ConditionQuery\Condition\NotEqualCondition;
class DateType extends AbstractType
{
const NAME = 'date';
const SPECIAL_VALUES = [
self::SPECIAL_VALUE_TODAY,
];
const SPECIAL_VALUE_TODAY = 'today';
/**
* {@inheritDoc}
*/
public function validate($value): void
{
// TODO
}
/**
* @return string[]
*/
public function getValidOperators(): array
{
if ($this->allowsMultiple()) {
return self::VALID_ARRAY_OPERATOR_NAMES;
}
return [
EqualCondition::NAME => EqualCondition::HUMAN_READABLE_NAME,
NotEqualCondition::NAME => NotEqualCondition::HUMAN_READABLE_NAME,
];
}
}