45 $this->conditionVariables = explode(
" ", $value);
54 public function validate($value, $citationNumber =
null)
56 switch ($this->match) {
58 return $this->matchAll($value);
60 return !$this->matchAny($value);
63 return $this->matchAny($value);
67 private function matchAny($value)
69 $conditionMatched =
false;
70 foreach ($this->conditionVariables as $variable) {
73 return (
bool)$conditionMatched;
76 private function matchAll($value)
78 $conditionMatched =
true;
79 foreach ($this->conditionVariables as $variable) {
82 return (
bool)$conditionMatched;