![]() Server : Apache/2.4.62 (Unix) OpenSSL/1.0.2k-fips System : Linux server1.richineiserver.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64 User : fdshops ( 1003) PHP Version : 8.2.21 Disable Function : NONE Directory : /home/fdshops/public_html/vendor/aws/aws-sdk-php/src/EndpointV2/Rule/ |
<?php namespace Aws\EndpointV2\Rule; use Aws\EndpointV2\Ruleset\RulesetStandardLibrary; /** * A rule within a rule set. All rules contain a conditions property, * which can be empty, and documentation about the rule. */ abstract class AbstractRule { private $conditions; private $documentation; public function __construct(array $definition) { $this->conditions = $definition['conditions']; $this->documentation = isset($definition['documentation']) ? $definition['documentation'] : null; } /** * @return array */ public function getConditions() { return $this->conditions; } /** * @return mixed */ public function getDocumentation() { return $this->documentation; } /** * Determines if all conditions for a given rule are met. * * @return boolean */ protected function evaluateConditions( array &$inputParameters, RulesetStandardLibrary $standardLibrary ) { foreach($this->getConditions() as $condition) { $result = $standardLibrary->callFunction($condition, $inputParameters); if (is_null($result) || $result === false) { return false; } } return true; } abstract public function evaluate( array $inputParameters, RulesetStandardLibrary $standardLibrary ); }