for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* This file is part of the Cubiche package.
*
* Copyright (c) Cubiche
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Cubiche\Core\Collections\DataSource;
use Cubiche\Core\Comparable\ComparatorInterface;
use Cubiche\Core\Specification\SpecificationInterface;
* Array Data Source Class.
* @author Karel Osorio Ramírez <[email protected]>
class ArrayDataSource extends IteratorDataSource
{
* @param array $items
* @param SpecificationInterface $searchCriteria
* @param ComparatorInterface $sortCriteria
* @param int $offset
* @param int $length
public function __construct(
array $items,
SpecificationInterface $searchCriteria = null,
ComparatorInterface $sortCriteria = null,
$offset = null,
$length = null
) {
parent::__construct(
new \ArrayIterator($items),
$searchCriteria,
$sortCriteria,
$offset,
$length
);
}