for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace eXpansion\Framework\Core\Model\Gui\Grid;
use eXpansion\Framework\Core\Model\Data\FilterInterface;
/**
* Class DataCollectionFactory
*
* @package eXpansion\Framework\Core\Model\Gui\Grid;
* @author oliver de Cramer <[email protected]>
*/
class DataCollectionFactory
{
/** @var FilterInterface */
protected $filterHelper;
/** @var string */
protected $collectionClass;
* DataCollectionFactory constructor.
* @param FilterInterface $filterHelper
* @param string $collectionClass
public function __construct(FilterInterface $filterHelper, $collectionClass)
$this->filterHelper = $filterHelper;
$this->collectionClass = $collectionClass;
}
* @param $data
* @return DataCollectionInterface
public function create($data)
$class = $this->collectionClass;
return new $class($data, $this->filterHelper);