File ManagerCurrent Directory: wp-content/plugins/backwpup/vendor/aws/aws-sdk-php/src/EndpointV2Linux appserver-0d5e4f1e-php-cc8da225320a42ba9b7d66cba40b1f03 6.6.123+ #1 SMP PREEMPT_DYNAMIC Wed Mar 11 09:04:28 UTC 2026 x86_64Edit File: EndpointProviderV2.php <?php namespace Aws\EndpointV2; use Aws\EndpointV2\Ruleset\Ruleset; use Aws\Exception\UnresolvedEndpointException; use Aws\LruArrayCache; /** * Given a service's Ruleset and client-provided input parameters, provides * either an object reflecting the properties of a resolved endpoint, * or throws an error. */ class EndpointProviderV2 { /** @var Ruleset */ private $ruleset; /** @var LruArrayCache */ private $cache; public function __construct(array $ruleset, array $partitions) { $this->ruleset = new Ruleset($ruleset, $partitions); $this->cache = new LruArrayCache(100); } /** * @return Ruleset */ public function getRuleset() { return $this->ruleset; } /** * Given a Ruleset and input parameters, determines the correct endpoint * or an error to be thrown for a given request. * * @return RulesetEndpoint * @throws UnresolvedEndpointException */ public function resolveEndpoint(array $inputParameters) { $hashedParams = $this->hashInputParameters($inputParameters); $match = $this->cache->get($hashedParams); if (!is_null($match)) { return $match; } $endpoint = $this->ruleset->evaluate($inputParameters); if ($endpoint === false) { throw new UnresolvedEndpointException( 'Unable to resolve an endpoint using the provider arguments: ' . json_encode($inputParameters) ); } $this->cache->set($hashedParams, $endpoint); return $endpoint; } private function hashInputParameters($inputParameters) { return md5(serialize($inputParameters)); } } Upload File Directory Listing NameTypeSizeActions.. (Parent Directory)DirEndpointDefinitionProvider.phpFile2.22 KB Rename | Delete | EditEndpointProviderV2.phpFile1.70 KB Rename | Delete | EditEndpointV2Middleware.phpFile9.13 KB Rename | Delete | EditEndpointV2SerializerTrait.phpFile2.03 KB Rename | Delete | EditRuleDirectory Rename | DeleteRulesetDirectory Rename | Delete