[COMPOSER] Add new php-ffmpeg package

This commit is contained in:
t3nma
2020-08-07 23:42:38 +01:00
parent 0a6bb5190f
commit c527ad0803
8874 changed files with 1090008 additions and 154 deletions

View File

@@ -0,0 +1,36 @@
<?php
/**
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
namespace Zend\Hydrator\Iterator;
use ArrayIterator;
use Zend\Hydrator\HydratorInterface;
class HydratingArrayIterator extends HydratingIteratorIterator
{
/**
* @var HydratorInterface
*/
protected $hydrator;
/**
* @var object
*/
protected $prototype;
/**
* @param HydratorInterface $hydrator
* @param array $data
* @param string|object $prototype Object, or class name to use for prototype.
*/
public function __construct(HydratorInterface $hydrator, array $data, $prototype)
{
parent::__construct($hydrator, new ArrayIterator($data), $prototype);
}
}

View File

@@ -0,0 +1,33 @@
<?php
/**
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
namespace Zend\Hydrator\Iterator;
use Iterator;
use Zend\Hydrator\HydratorInterface;
interface HydratingIteratorInterface extends Iterator
{
/**
* This sets the prototype to hydrate.
*
* This prototype can be the name of the class or the object itself;
* iteration will clone the object.
*
* @param string|object $prototype
*/
public function setPrototype($prototype);
/**
* Sets the hydrator to use during iteration.
*
* @param HydratorInterface $hydrator
*/
public function setHydrator(HydratorInterface $hydrator);
}

View File

@@ -0,0 +1,78 @@
<?php
/**
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
namespace Zend\Hydrator\Iterator;
use Iterator;
use IteratorIterator;
use Zend\Hydrator\Exception\InvalidArgumentException;
use Zend\Hydrator\HydratorInterface;
class HydratingIteratorIterator extends IteratorIterator implements HydratingIteratorInterface
{
/**
* @var HydratorInterface
*/
protected $hydrator;
/**
* @var object
*/
protected $prototype;
/**
* @param HydratorInterface $hydrator
* @param Iterator $data
* @param string|object $prototype Object or class name to use for prototype.
*/
public function __construct(HydratorInterface $hydrator, Iterator $data, $prototype)
{
$this->setHydrator($hydrator);
$this->setPrototype($prototype);
parent::__construct($data);
}
/**
* @inheritdoc
*/
public function setPrototype($prototype)
{
if (is_object($prototype)) {
$this->prototype = $prototype;
return;
}
if (!class_exists($prototype)) {
throw new InvalidArgumentException(
sprintf('Method %s was passed an invalid class name: %s', __METHOD__, $prototype)
);
}
$this->prototype = new $prototype;
}
/**
* @inheritdoc
*/
public function setHydrator(HydratorInterface $hydrator)
{
$this->hydrator = $hydrator;
}
/**
* @return object Returns hydrated clone of $prototype
*/
public function current()
{
$currentValue = parent::current();
$object = clone $this->prototype;
$this->hydrator->hydrate($currentValue, $object);
return $object;
}
}