__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
<?php
namespace Aws\Endpoint;
/**
* Provides endpoints based on an endpoint pattern configuration array.
*/
class PatternEndpointProvider
{
/** @var array */
private $patterns;
/**
* @param array $patterns Hash of endpoint patterns mapping to endpoint
* configurations.
*/
public function __construct(array $patterns)
{
$this->patterns = $patterns;
}
public function __invoke(array $args = [])
{
$service = isset($args['service']) ? $args['service'] : '';
$region = isset($args['region']) ? $args['region'] : '';
$keys = ["{$region}/{$service}", "{$region}/*", "*/{$service}", "*/*"];
foreach ($keys as $key) {
if (isset($this->patterns[$key])) {
return $this->expand(
$this->patterns[$key],
isset($args['scheme']) ? $args['scheme'] : 'https',
$service,
$region
);
}
}
return null;
}
private function expand(array $config, $scheme, $service, $region)
{
$config['endpoint'] = $scheme . '://'
. strtr($config['endpoint'], [
'{service}' => $service,
'{region}' => $region
]);
return $config;
}
}
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| UseDualstackEndpoint | Folder | 0777 |
|
|
| UseFipsEndpoint | Folder | 0777 |
|
|
| EndpointProvider.php | File | 3.24 KB | 0777 |
|
| Partition.php | File | 10.19 KB | 0777 |
|
| PartitionEndpointProvider.php | File | 3.79 KB | 0777 |
|
| PartitionInterface.php | File | 1.6 KB | 0777 |
|
| PatternEndpointProvider.php | File | 1.32 KB | 0777 |
|