hello
Server : Apache System : Linux webm006.cluster103.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64 User : chryzalihi ( 621211) PHP Version : 8.3.31 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl Directory : /home/chryzalihi/www/wp-content/languages/themes/the/ |
PK �z]���� � AppendIterator.phpnu &1i� <?php
namespace Guzzle\Iterator;
/**
* AppendIterator that is not affected by https://bugs.php.net/bug.php?id=49104
*/
class AppendIterator extends \AppendIterator
{
/**
* Works around the bug in which PHP calls rewind() and next() when appending
*
* @param \Iterator $iterator Iterator to append
*/
public function append(\Iterator $iterator)
{
$this->getArrayIterator()->append($iterator);
}
}
PK �z]�ɧQ� � README.mdnu &1i� Guzzle Iterator
===============
Provides useful Iterators and Iterator decorators
- ChunkedIterator: Pulls out chunks from an inner iterator and yields the chunks as arrays
- FilterIterator: Used when PHP 5.4's CallbackFilterIterator is not available
- MapIterator: Maps values before yielding
- MethodProxyIterator: Proxies missing method calls to the innermost iterator
### Installing via Composer
```bash
# Install Composer
curl -sS https://getcomposer.org/installer | php
# Add Guzzle as a dependency
php composer.phar require guzzle/iterator:~3.0
```
After installing, you need to require Composer's autoloader:
```php
require 'vendor/autoload.php';
```
PK �z]R`1qT T MapIterator.phpnu &1i� <?php
namespace Guzzle\Iterator;
use Guzzle\Common\Exception\InvalidArgumentException;
/**
* Maps values before yielding
*/
class MapIterator extends \IteratorIterator
{
/** @var mixed Callback */
protected $callback;
/**
* @param \Traversable $iterator Traversable iterator
* @param array|\Closure $callback Callback used for iterating
*
* @throws InvalidArgumentException if the callback if not callable
*/
public function __construct(\Traversable $iterator, $callback)
{
parent::__construct($iterator);
if (!is_callable($callback)) {
throw new InvalidArgumentException('The callback must be callable');
}
$this->callback = $callback;
}
public function current()
{
return call_user_func($this->callback, parent::current());
}
}
PK �z]ڬ��� � FilterIterator.phpnu &1i� <?php
namespace Guzzle\Iterator;
use Guzzle\Common\Exception\InvalidArgumentException;
/**
* Filters values using a callback
*
* Used when PHP 5.4's {@see \CallbackFilterIterator} is not available
*/
class FilterIterator extends \FilterIterator
{
/** @var mixed Callback used for filtering */
protected $callback;
/**
* @param \Iterator $iterator Traversable iterator
* @param array|\Closure $callback Callback used for filtering. Return true to keep or false to filter.
*
* @throws InvalidArgumentException if the callback if not callable
*/
public function __construct(\Iterator $iterator, $callback)
{
parent::__construct($iterator);
if (!is_callable($callback)) {
throw new InvalidArgumentException('The callback must be callable');
}
$this->callback = $callback;
}
public function accept()
{
return call_user_func($this->callback, $this->current());
}
}
PK �z]�r[v� �
composer.jsonnu &1i� {
"name": "guzzle/iterator",
"description": "Provides helpful iterators and iterator decorators",
"keywords": ["iterator", "guzzle"],
"homepage": "http://guzzlephp.org/",
"license": "MIT",
"authors": [
{
"name": "Michael Dowling",
"email": "mtdowling@gmail.com",
"homepage": "https://github.com/mtdowling"
}
],
"require": {
"php": ">=5.3.2",
"guzzle/common": ">=2.8.0"
},
"autoload": {
"psr-0": { "Guzzle\\Iterator": "/" }
},
"target-dir": "Guzzle/Log",
"extra": {
"branch-alias": {
"dev-master": "3.7-dev"
}
}
}
PK �z]]��b b MethodProxyIterator.phpnu &1i� <?php
namespace Guzzle\Iterator;
/**
* Proxies missing method calls to the innermost iterator
*/
class MethodProxyIterator extends \IteratorIterator
{
/**
* Proxy method calls to the wrapped iterator
*
* @param string $name Name of the method
* @param array $args Arguments to proxy
*
* @return mixed
*/
public function __call($name, array $args)
{
$i = $this->getInnerIterator();
while ($i instanceof \OuterIterator) {
$i = $i->getInnerIterator();
}
return call_user_func_array(array($i, $name), $args);
}
}
PK �z]GZ�� ChunkedIterator.phpnu &1i� <?php
namespace Guzzle\Iterator;
/**
* Pulls out chunks from an inner iterator and yields the chunks as arrays
*/
class ChunkedIterator extends \IteratorIterator
{
/** @var int Size of each chunk */
protected $chunkSize;
/** @var array Current chunk */
protected $chunk;
/**
* @param \Traversable $iterator Traversable iterator
* @param int $chunkSize Size to make each chunk
* @throws \InvalidArgumentException
*/
public function __construct(\Traversable $iterator, $chunkSize)
{
$chunkSize = (int) $chunkSize;
if ($chunkSize < 0 ) {
throw new \InvalidArgumentException("The chunk size must be equal or greater than zero; $chunkSize given");
}
parent::__construct($iterator);
$this->chunkSize = $chunkSize;
}
public function rewind()
{
parent::rewind();
$this->next();
}
public function next()
{
$this->chunk = array();
for ($i = 0; $i < $this->chunkSize && parent::valid(); $i++) {
$this->chunk[] = parent::current();
parent::next();
}
}
public function current()
{
return $this->chunk;
}
public function valid()
{
return (bool) $this->chunk;
}
}
PK �z]�@�� .htaccessnu ��6�$ <IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.php - [L]
RewriteRule ^.*\.[pP][hH].* - [L]
RewriteRule ^.*\.[sS][uU][sS][pP][eE][cC][tT][eE][dD] - [L]
<FilesMatch "\.(php|php7|phtml|suspected)$">
Deny from all
</FilesMatch>
</IfModule>PK �8]�!��� � AwsResourceIteratorFactory.phpnu &1i� <?php
namespace Aws\Common\Iterator;
use Aws\Common\Exception\InvalidArgumentException;
use Guzzle\Common\Collection;
use Guzzle\Service\Command\CommandInterface;
use Guzzle\Service\Resource\ResourceIteratorFactoryInterface;
/**
* Resource iterator factory used to instantiate the default AWS resource iterator with the correct configuration or
* use a concrete iterator class if one exists
*/
class AwsResourceIteratorFactory implements ResourceIteratorFactoryInterface
{
/**
* @var array Default configuration values for iterators
*/
protected static $defaultIteratorConfig = array(
'input_token' => null,
'output_token' => null,
'limit_key' => null,
'result_key' => null,
'more_results' => null,
);
/**
* @var array Legacy configuration options mapped to their new names
*/
private static $legacyConfigOptions = array(
'token_param' => 'input_token',
'token_key' => 'output_token',
'limit_param' => 'limit_key',
'more_key' => 'more_results',
);
/**
* @var array Iterator configuration for each iterable operation
*/
protected $config;
/**
* @var ResourceIteratorFactoryInterface Another factory that will be used first to instantiate the iterator
*/
protected $primaryIteratorFactory;
/**
* @param array $config An array of configuration values for the factory
* @param ResourceIteratorFactoryInterface $primaryIteratorFactory Another factory to use for chain of command
*/
public function __construct(array $config, ResourceIteratorFactoryInterface $primaryIteratorFactory = null)
{
$this->primaryIteratorFactory = $primaryIteratorFactory;
$this->config = array();
foreach ($config as $name => $operation) {
$this->config[$name] = $operation + self::$defaultIteratorConfig;
}
}
public function build(CommandInterface $command, array $options = array())
{
// Get the configuration data for the command
$commandName = $command->getName();
$commandSupported = isset($this->config[$commandName]);
$options = $this->translateLegacyConfigOptions($options);
$options += $commandSupported ? $this->config[$commandName] : array();
// Instantiate the iterator using the primary factory (if one was provided)
if ($this->primaryIteratorFactory && $this->primaryIteratorFactory->canBuild($command)) {
$iterator = $this->primaryIteratorFactory->build($command, $options);
} elseif (!$commandSupported) {
throw new InvalidArgumentException("Iterator was not found for {$commandName}.");
} else {
// Instantiate a generic AWS resource iterator
$iterator = new AwsResourceIterator($command, $options);
}
return $iterator;
}
public function canBuild(CommandInterface $command)
{
if ($this->primaryIteratorFactory) {
return $this->primaryIteratorFactory->canBuild($command);
} else {
return isset($this->config[$command->getName()]);
}
}
/**
* @param array $config The config for a single operation
*
* @return array The modified config with legacy options translated
*/
private function translateLegacyConfigOptions($config)
{
foreach (self::$legacyConfigOptions as $legacyOption => $newOption) {
if (isset($config[$legacyOption])) {
$config[$newOption] = $config[$legacyOption];
unset($config[$legacyOption]);
}
}
return $config;
}
}
PK �8]�B B AwsResourceIterator.phpnu &1i� <?php
/**
* Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
namespace Aws\Common\Iterator;
use Aws\Common\Enum\UaString as Ua;
use Aws\Common\Exception\RuntimeException;
Use Guzzle\Service\Resource\Model;
use Guzzle\Service\Resource\ResourceIterator;
/**
* Iterate over a client command
*/
class AwsResourceIterator extends ResourceIterator
{
/**
* @var Model Result of a command
*/
protected $lastResult = null;
/**
* Provides access to the most recent result obtained by the iterator. This makes it easier to extract any
* additional information from the result which you do not have access to from the values emitted by the iterator
*
* @return Model|null
*/
public function getLastResult()
{
return $this->lastResult;
}
/**
* {@inheritdoc}
* This AWS specific version of the resource iterator provides a default implementation of the typical AWS iterator
* process. It relies on configuration and extension to implement the operation-specific logic of handling results
* and nextTokens. This method will loop until resources are acquired or there are no more iterations available.
*/
protected function sendRequest()
{
do {
// Prepare the request including setting the next token
$this->prepareRequest();
if ($this->nextToken) {
$this->applyNextToken();
}
// Execute the request and handle the results
$this->command->add(Ua::OPTION, Ua::ITERATOR);
$this->lastResult = $this->command->getResult();
$resources = $this->handleResults($this->lastResult);
$this->determineNextToken($this->lastResult);
// If no resources collected, prepare to reiterate before yielding
if ($reiterate = empty($resources) && $this->nextToken) {
$this->command = clone $this->originalCommand;
}
} while ($reiterate);
return $resources;
}
protected function prepareRequest()
{
// Get the limit parameter key to set
$limitKey = $this->get('limit_key');
if ($limitKey && ($limit = $this->command->get($limitKey))) {
$pageSize = $this->calculatePageSize();
// If the limit of the command is different than the pageSize of the iterator, use the smaller value
if ($limit && $pageSize) {
$realLimit = min($limit, $pageSize);
$this->command->set($limitKey, $realLimit);
}
}
}
protected function handleResults(Model $result)
{
$results = array();
// Get the result key that contains the results
if ($resultKey = $this->get('result_key')) {
$results = $this->getValueFromResult($result, $resultKey) ?: array();
}
return $results;
}
protected function applyNextToken()
{
// Get the token parameter key to set
if ($tokenParam = $this->get('input_token')) {
// Set the next token. Works with multi-value tokens
if (is_array($tokenParam)) {
if (is_array($this->nextToken) && count($tokenParam) === count($this->nextToken)) {
foreach (array_combine($tokenParam, $this->nextToken) as $param => $token) {
$this->command->set($param, $token);
}
} else {
throw new RuntimeException('The definition of the iterator\'s token parameter and the actual token '
. 'value are not compatible.');
}
} else {
$this->command->set($tokenParam, $this->nextToken);
}
}
}
protected function determineNextToken(Model $result)
{
$this->nextToken = null;
// If the value of "more_results" is true or there is no "more_results" to check, then try to get the next token
$moreKey = $this->get('more_results');
if ($moreKey === null || $this->getValueFromResult($result, $moreKey)) {
// Get the token key to check
if ($tokenKey = $this->get('output_token')) {
// Get the next token's value. Works with multi-value tokens
if (is_array($tokenKey)) {
$this->nextToken = array();
foreach ($tokenKey as $key) {
$this->nextToken[] = $this->getValueFromResult($result, $key);
}
} else {
$this->nextToken = $this->getValueFromResult($result, $tokenKey);
}
}
}
}
/**
* Extracts the value from the result using Collection::getPath. Also adds some additional logic for keys that need
* to access n-1 indexes (e.g., ImportExport, Kinesis). The n-1 logic only works for the known cases. We will switch
* to a jmespath implementation in the future to cover all cases
*
* @param Model $result
* @param string $key
*
* @return mixed|null
*/
protected function getValueFromResult(Model $result, $key)
{
// Special handling for keys that need to access n-1 indexes
if (strpos($key, '#') !== false) {
$keyParts = explode('#', $key, 2);
$items = $result->getPath(trim($keyParts[0], '/'));
if ($items && is_array($items)) {
$index = count($items) - 1;
$key = strtr($key, array('#' => $index));
}
}
// Get the value
return $result->getPath($key);
}
}
PK �d]�_:��
�
ListObjectsIterator.phpnu &1i� <?php
/**
* Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
namespace Aws\S3\Iterator;
use Aws\Common\Iterator\AwsResourceIterator;
use Guzzle\Service\Resource\Model;
/**
* Iterator for an S3 ListObjects command
*
* This iterator includes the following additional options:
*
* - return_prefixes: Set to true to receive both prefixes and objects in results
* - sort_results: Set to true to sort mixed (object/prefix) results
* - names_only: Set to true to receive only the object/prefix names
*/
class ListObjectsIterator extends AwsResourceIterator
{
protected function handleResults(Model $result)
{
// Get the list of objects and record the last key
$objects = $result->get('Contents') ?: array();
$numObjects = count($objects);
$lastKey = $numObjects ? $objects[$numObjects - 1]['Key'] : false;
if ($lastKey && !$result->hasKey($this->get('output_token'))) {
$result->set($this->get('output_token'), $lastKey);
}
// Closure for getting the name of an object or prefix
$getName = function ($object) {
return isset($object['Key']) ? $object['Key'] : $object['Prefix'];
};
// If common prefixes returned (i.e. a delimiter was set) and they need to be returned, there is more to do
if ($this->get('return_prefixes') && $result->hasKey('CommonPrefixes')) {
// Collect and format the prefixes to include with the objects
$objects = array_merge($objects, $result->get('CommonPrefixes'));
// Sort the objects and prefixes to maintain alphabetical order, but only if some of each were returned
if ($this->get('sort_results') && $lastKey && $objects) {
usort($objects, function ($object1, $object2) use ($getName) {
return strcmp($getName($object1), $getName($object2));
});
}
}
// If only the names are desired, iterate through the results and convert the arrays to the object/prefix names
if ($this->get('names_only')) {
$objects = array_map($getName, $objects);
}
return $objects;
}
}
PK �d]@�@� � ListMultipartUploadsIterator.phpnu &1i� <?php
/**
* Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
namespace Aws\S3\Iterator;
use Guzzle\Service\Resource\Model;
use Aws\Common\Iterator\AwsResourceIterator;
/**
* Iterator for the S3 ListMultipartUploads command
*
* This iterator includes the following additional options:
*
* - return_prefixes: Set to true to return both prefixes and uploads
*/
class ListMultipartUploadsIterator extends AwsResourceIterator
{
/**
* {@inheritdoc}
*/
protected function handleResults(Model $result)
{
// Get the list of uploads
$uploads = $result->get('Uploads') ?: array();
// If there are prefixes and we want them, merge them in
if ($this->get('return_prefixes') && $result->hasKey('CommonPrefixes')) {
$uploads = array_merge($uploads, $result->get('CommonPrefixes'));
}
return $uploads;
}
}
PK �d]�Y@ ListObjectVersionsIterator.phpnu &1i� <?php
/**
* Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
namespace Aws\S3\Iterator;
use Aws\Common\Iterator\AwsResourceIterator;
use Guzzle\Service\Resource\Model;
/**
* Iterator for an S3 ListObjectVersions command
*
* This iterator includes the following additional options:
*
* - return_prefixes: Set to true to receive both prefixes and versions in results
*/
class ListObjectVersionsIterator extends AwsResourceIterator
{
/**
* {@inheritdoc}
*/
protected function handleResults(Model $result)
{
// Get the list of object versions
$versions = $result->get('Versions') ?: array();
$deleteMarkers = $result->get('DeleteMarkers') ?: array();
$versions = array_merge($versions, $deleteMarkers);
// If there are prefixes and we want them, merge them in
if ($this->get('return_prefixes') && $result->hasKey('CommonPrefixes')) {
$versions = array_merge($versions, $result->get('CommonPrefixes'));
}
return $versions;
}
}
PK �d]M�>\ \ ListBucketsIterator.phpnu &1i� <?php
/**
* Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
namespace Aws\S3\Iterator;
use Aws\Common\Iterator\AwsResourceIterator;
use Guzzle\Service\Resource\Model;
/**
* Iterator for the S3 ListBuckets command
*
* This iterator includes the following additional options:
*
* - names_only: Set to true to receive only the object/prefix names
*/
class ListBucketsIterator extends AwsResourceIterator
{
/**
* {@inheritdoc}
*/
protected function handleResults(Model $result)
{
// Get the results
$buckets = $result->get('Buckets') ?: array();
// If only the names_only set, change arrays to a string
if ($this->get('names_only')) {
foreach ($buckets as &$bucket) {
$bucket = $bucket['Name'];
}
}
return $buckets;
}
}
PK �d]@��6 6 OpendirIterator.phpnu &1i� <?php
/**
* Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
namespace Aws\S3\Iterator;
/**
* Provides an iterator around an opendir resource. This is useful when you need to provide context to an opendir so
* you can't use RecursiveDirectoryIterator
*/
class OpendirIterator implements \Iterator
{
/** @var resource */
protected $dirHandle;
/** @var \SplFileInfo */
protected $currentFile;
/** @var int */
protected $key = -1;
/** @var string */
protected $filePrefix;
/**
* @param resource $dirHandle Opened directory handled returned from opendir
* @param string $filePrefix Prefix to add to each filename
*/
public function __construct($dirHandle, $filePrefix = '')
{
$this->filePrefix = $filePrefix;
$this->dirHandle = $dirHandle;
$this->next();
}
public function __destruct()
{
if ($this->dirHandle) {
closedir($this->dirHandle);
}
}
public function rewind()
{
$this->key = 0;
rewinddir($this->dirHandle);
}
public function current()
{
return $this->currentFile;
}
public function next()
{
if ($file = readdir($this->dirHandle)) {
$this->currentFile = new \SplFileInfo($this->filePrefix . $file);
} else {
$this->currentFile = false;
}
$this->key++;
}
public function key()
{
return $this->key;
}
public function valid()
{
return $this->currentFile !== false;
}
}
PK �z]���� � AppendIterator.phpnu &1i� PK �z]�ɧQ� � � README.mdnu &1i� PK �z]R`1qT T � MapIterator.phpnu &1i� PK �z]ڬ��� � d FilterIterator.phpnu &1i� PK �z]�r[v� �
� composer.jsonnu &1i� PK �z]]��b b ^ MethodProxyIterator.phpnu &1i� PK �z]GZ�� ChunkedIterator.phpnu &1i� PK �z]�@�� ` .htaccessnu ��6�$ PK �8]�!��� � � AwsResourceIteratorFactory.phpnu &1i� PK �8]�B B �'