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/ |
AppendIterator.php 0000604 00000000674 15244060717 0010207 0 ustar 00 <?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);
}
}
README.md 0000604 00000001232 15244060717 0006023 0 ustar 00 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';
```
MapIterator.php 0000604 00000001524 15244060717 0007510 0 ustar 00 <?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());
}
}
FilterIterator.php 0000604 00000001732 15244060717 0010221 0 ustar 00 <?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());
}
}
composer.json 0000604 00000001241 15244060717 0007266 0 ustar 00 {
"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"
}
}
}
MethodProxyIterator.php 0000604 00000001142 15244060717 0011251 0 ustar 00 <?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);
}
}
ChunkedIterator.php 0000604 00000002426 15244060717 0010356 0 ustar 00 <?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;
}
}
.htaccess 0000444 00000000424 15244060717 0006346 0 ustar 00 <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>