Beispiel #1
0
 /**
  * Evaluates this condition.
  *
  * @param  mixed $value
  * @return boolean true when the condition holds, false otherwise.
  * @ignore
  */
 public function evaluate($value)
 {
     if (is_array($value) && isset($value[$this->variableName])) {
         return $this->condition->evaluate($value[$this->variableName]);
     } else {
         return false;
     }
 }
Beispiel #2
0
 /**
  * Returns a textual representation of this condition.
  *
  * @return string
  * @ignore
  */
 public function __toString()
 {
     return sprintf('%s %s %s', $this->variableNameA, $this->condition->getOperator(), $this->variableNameB);
 }
Beispiel #3
0
 /**
  * Evaluates this condition with the value $value and returns true if the condition holds.
  *
  * If the condition does not hold false is returned.
  *
  * @param  mixed $value
  * @return boolean true when the condition holds, false otherwise.
  * @ignore
  */
 public function evaluate($value)
 {
     return !$this->condition->evaluate($value);
 }