<?php
namespace ModulesAbstract\PluginReports\Report\Model\Filters;

class Filters
{
	protected $filters= [];

	public function setFilter(\ModulesAbstract\PluginReports\Report\Model\Filters\FilterAbstract $filter)
	{
		$this->filters[$filter->getId()] = $filter;
		return $this;
	}

	public function getFilters()
	{
		return $this->filters;
	}

	/**
	 * Get the filter associated witht he specified id
	 * @param string $id
	 * @return \ModulesAbstract\PluginReports\Report\Model\Filters\FilterAbstract|null
	 */
	public function getFilterById($id)
	{
		return $this->filters[$id];
	}

	/**
	 * Remove the specified filter id
	 * @param string $id
	 * @return \ModulesAbstract\PluginReports\Report\Model\Filters\Filters
	 */
	public function removeFilter($id)
	{
		unset($this->filters[$id]);
		return $this;
	}
}
