OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
cream
/
aws-ses
/
vendor
/
aws
/
aws-sdk-php
/
build
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
05/19/2025 10:07:21 AM
rwxr-xr-x
📄
Burgomaster.php
13.48 KB
05/19/2025 10:07:21 AM
rw-r--r--
📄
ClassAnnotationUpdater.php
3.3 KB
05/19/2025 10:07:21 AM
rw-r--r--
📄
ClientAnnotator.php
4.57 KB
05/19/2025 10:07:21 AM
rw-r--r--
📄
JsonCompiler.php
2.48 KB
05/19/2025 10:07:21 AM
rw-r--r--
📄
PhpFileLinterTrait.php
1.44 KB
05/19/2025 10:07:21 AM
rw-r--r--
📄
ServiceBuilder.php
1.85 KB
05/19/2025 10:07:21 AM
rw-r--r--
📄
annotate-client-locator.php
1.04 KB
05/19/2025 10:07:21 AM
rw-r--r--
📄
annotate-clients.php
2.74 KB
05/19/2025 10:07:21 AM
rw-r--r--
📄
aws-clear-cache.php
91 bytes
05/19/2025 10:07:21 AM
rw-r--r--
📄
build-manifest.php
3.57 KB
05/19/2025 10:07:21 AM
rw-r--r--
📄
build-redirect-map.php
343 bytes
05/19/2025 10:07:21 AM
rw-r--r--
📄
build-service.php
1015 bytes
05/19/2025 10:07:21 AM
rw-r--r--
📁
changelog
-
05/19/2025 10:07:21 AM
rwxr-xr-x
📄
compile-json.php
447 bytes
05/19/2025 10:07:21 AM
rw-r--r--
📁
docs
-
01/07/2025 12:10:29 PM
rwxr-xr-x
📄
docs.php
1.72 KB
05/19/2025 10:07:21 AM
rw-r--r--
📄
gh-release.php
6.01 KB
05/19/2025 10:07:21 AM
rw-r--r--
📄
normalize-docs-files.php
7.74 KB
05/19/2025 10:07:21 AM
rw-r--r--
📄
option-docs.php
1.21 KB
05/19/2025 10:07:21 AM
rw-r--r--
📄
packager.php
2.2 KB
05/19/2025 10:07:21 AM
rw-r--r--
📄
phar-test-runner.php
161 bytes
05/19/2025 10:07:21 AM
rw-r--r--
📄
remove-method-annotations.php
1.4 KB
05/19/2025 10:07:21 AM
rw-r--r--
📄
test-phar.php
1.05 KB
05/19/2025 10:07:21 AM
rw-r--r--
Editing: ClientAnnotator.php
Close
<?php use Aws\Api\ApiProvider; class ClientAnnotator { /** @var ReflectionClass */ private $reflection; /** @var string */ private $endpoint; /** @var string[] */ private $versions; /** @var array */ private $methods; /** @var array */ private $aliases; public function __construct($clientClassName) { $this->reflection = new ReflectionClass($clientClassName); $this->aliases = \Aws\load_compiled_json(__DIR__ . '/../src/data/aliases.json'); } /** * Adds @method annotations to a client class. * * @return bool TRUE on success, FALSE on failure */ public function updateApiMethodAnnotations() { $updater = new ClassAnnotationUpdater( $this->reflection, $this->getMethodAnnotations(), $this->getDefaultDocComment(), '/^\* @method (\\\\Aws\\\\Result|\\\\GuzzleHttp\\\\Promise\\\\Promise) /' ); return $updater->update(); } private function getMethodAnnotations() { $annotations = []; foreach ($this->getMethods() as $command => $apiVersions) { $commandMethods = [ $command => '\\Aws\\Result', "{$command}Async" => '\\GuzzleHttp\\Promise\\Promise', ]; foreach ($commandMethods as $method => $returnType) { $annotations []= $this->getAnnotationLine( $method, $returnType, $apiVersions ); } } return $annotations; } private function getAnnotationLine($method, $return, array $versionsWithSupport) { $signature = lcfirst($method) . '(array $args = [])'; $annotation = " * @method $return $signature"; if ($versionsWithSupport !== $this->getVersions()) { $supportedIn = implode(', ', $versionsWithSupport); $annotation .= " (supported in versions $supportedIn)"; } return $annotation; } private function getMethods() { if (empty($this->methods)) { $this->methods = []; foreach ($this->getVersions() as $version) { $methodsInVersion = array_keys( $this->getApiDefinition($version)['operations'] ); $api = $this->getApiDefinition($version); $serviceId = !empty($api['metadata']['serviceId']) ? $api['metadata']['serviceId'] : null; foreach ($methodsInVersion as $method) { if (!empty($serviceId) && !empty($this->aliases['operations'][$serviceId][$version][$method]) ) { $method = $this->aliases['operations'][$serviceId][$version][$method]; } if (empty($this->methods[$method])) { $this->methods[$method] = []; } $this->methods[$method] []= $version; } } } return $this->methods; } private function getVersions() { if (empty($this->versions)) { $this->versions = ApiProvider::defaultProvider() ->getVersions($this->getEndpoint()); // ensure that versions are always iterated from oldest to newest sort($this->versions); } return $this->versions; } private function getApiDefinition($version = 'latest') { $provider = ApiProvider::defaultProvider(); return $provider('api', $this->getEndpoint(), $version); } private function getEndpoint() { if (empty($this->endpoint)) { $service = strtolower( preg_replace('/(MultiRegion)?Client$/', '', $this->reflection->getShortName()) ); $this->endpoint = Aws\manifest($service)['endpoint']; } return $this->endpoint; } private function getDefaultDocComment() { $serviceName = $this->getApiDefinition()['metadata']['serviceFullName']; switch ($this->reflection->getParentClass()->getShortName()) { case 'MultiRegionClient': return <<<EODC /** * **{$serviceName}** multi-region client. * */ EODC; default: return <<<EODC /** * **{$serviceName}** client. * */ EODC; } } }