for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace KGzocha\Searcher\FilterModel\Collection;
use KGzocha\Searcher\FilterModel\FilterModelInterface;
/**
* @author Krzysztof Gzocha <[email protected]>
* @package KGzocha\Searcher\FilterModel\Collection
*/
class NamedFilterModelCollection extends FilterModelCollection implements
NamedFilterModelCollectionInterface
{
* @param string $name
* @return null|FilterModelInterface
public function __get($name)
return $this->getNamedFilterModel($name);
}
* @param FilterModelInterface $value
public function __set($name, FilterModelInterface $value)
$this->addNamedFilterModel($name, $value);
* @param FilterModelInterface $filterModel
*
* @return $this
public function addNamedFilterModel(
$name,
FilterModelInterface $filterModel
) {
$this->filterModels[$name] = $filterModel;
return $this;
public function getNamedFilterModel($name)
return array_key_exists($name, $this->filterModels)
? $this->filterModels[$name]
: null;