/var/www/vhosts/ihelp.ro/_OLD/vendor/cakephp/cakephp/src/Datasource
NameSizeModeActions
Exception/-0755rm
Locator/-0755rm
composer.json12680644editdlrm
ConnectionInterface.php51060644editdlrm
ConnectionManager.php73580644editdlrm
ConnectionRegistry.php33750644editdlrm
EntityInterface.php84420644editdlrm
EntityTrait.php345930644editdlrm
FactoryLocator.php29110644editdlrm
FixtureInterface.php23750644editdlrm
InvalidPropertyInterface.php20740644editdlrm
LICENSE.txt12040644editdlrm
ModelAwareTrait.php58340644editdlrm
Paginator.php226280644editdlrm
PaginatorInterface.php13970644editdlrm
QueryCacher.php38320644editdlrm
QueryInterface.php148780644editdlrm
QueryTrait.php170340644editdlrm
README.md34140644editdlrm
RepositoryInterface.php91670644editdlrm
ResultSetDecorator.php13730644editdlrm
ResultSetInterface.php8840644editdlrm
RuleInvoker.php37720644editdlrm
RulesAwareTrait.php40920644editdlrm
RulesChecker.php114300644editdlrm
SchemaInterface.php48580644editdlrm
SimplePaginator.php13740644editdlrm
Edit: /var/www/vhosts/ihelp.ro/_OLD/vendor/cakephp/cakephp/src/Datasource/RuleInvoker.php (3772B)
rule = $rule; $this->name = $name; $this->options = $options; } /** * Set options for the rule invocation. * * Old options will be merged with the new ones. * * @param array $options The options to set. * @return $this */ public function setOptions(array $options) { $this->options = $options + $this->options; return $this; } /** * Set the rule name. * * Only truthy names will be set. * * @param string|null $name The name to set. * @return $this */ public function setName(?string $name) { if ($name) { $this->name = $name; } return $this; } /** * Invoke the rule. * * @param \Cake\Datasource\EntityInterface $entity The entity the rule * should apply to. * @param array $scope The rule's scope/options. * @return bool Whether or not the rule passed. */ public function __invoke(EntityInterface $entity, array $scope): bool { $rule = $this->rule; $pass = $rule($entity, $this->options + $scope); if ($pass === true || empty($this->options['errorField'])) { return $pass === true; } $message = 'invalid'; if (isset($this->options['message'])) { $message = $this->options['message']; } if (is_string($pass)) { $message = $pass; } if ($this->name) { $message = [$this->name => $message]; } else { $message = [$message]; } $errorField = $this->options['errorField']; $entity->setError($errorField, $message); if ($entity instanceof InvalidPropertyInterface && isset($entity->{$errorField})) { $invalidValue = $entity->{$errorField}; $entity->setInvalidField($errorField, $invalidValue); } return $pass === true; } }