/** * проверяет соответсвует ли значение сущности условиям аттрибута * * @param $propertyValue * * @return RuleExecutionResult */ public function execute($propertyValue) { $result = new RuleExecutionResult($this); $isValid = $this->isValid($propertyValue); $result->setResult($isValid); if (!$isValid) { $result->setError($this->constructException($propertyValue)); } return $result; }
/** * проверяет есть ли доступ у пользователя к операции * * @return RuleExecutionResult */ public function execute() { $result = new RuleExecutionResult($this); $isValid = $this->isValid(); $result->setResult($isValid); if (!$isValid) { $result->setError($this->constructValidationException()); } return $result; }
/** * проверяет соответсвует ли значение сущности условиям аттрибута * * @return RuleExecutionResult * */ public function execute() { $executionResult = new RuleExecutionResult($this); $isValid = $this->isValid(); $executionResult->setResult($isValid); if (!$isValid) { $executionResult->setError($this->constructException()); } $this->hasBeenChecked = true; return $executionResult; }