<commit_before><?php
/**
 * Created by PhpStorm.
 * User: daedeloth
 * Date: 8/01/15
 * Time: 15:44
 */

namespace Neuron\Models\Router;


use Neuron\Interfaces\Module;

class Route {

	/** @var string $route */
	private $route;

	/** @var callable $function */
	private $function;

	/** @var Module $module */
	private $module;

	/** @var string[] */
	private $filters = array ();

	public function __construct ($path)
	{
		$this->setRoute ($path);
	}

	/**
	 * @return string
	 */
	public function getRoute ()
	{
		return $this->route;
	}

	/**
	 * @param string $route
	 */
	public function setRoute ($route)
	{
		$this->route = $route;
	}

	/**
	 * @return callable
	 */
	public function getFunction ()
	{
		return $this->function;
	}

	/**
	 * @param callable $function
	 */
	public function setFunction ($function)
	{
		$this->function = $function;
	}

	/**
	 * @return Module
	 */
	public function getModule ()
	{
		return $this->module;
	}

	/**
	 * @param Module $module
	 */
	public function setModule ($module)
	{
		$this->module = $module;
	}

	/**
	 * Add a filter
	 * @param $filtername
	 */
	public function filter ($filtername)
	{
		$arguments = func_get_args ();
		array_shift ($arguments);

		$filters = explode (',', $filtername);
		foreach ($filters as $filter)
		{
			$objfilter = new Filter ($filter);
			$objfilter->setArguments ($arguments);

			$this->filters[] = $objfilter;
		}
	}

	/**
	 * @return Filter[]
	 */
	public function getFilters ()
	{
		return $this->filters;
	}

}<commit_msg>Changing filter a bit more.<commit_after><?php
/**
 * Created by PhpStorm.
 * User: daedeloth
 * Date: 8/01/15
 * Time: 15:44
 */

namespace Neuron\Models\Router;


use Neuron\Interfaces\Module;

class Route {

	/** @var string $route */
	private $route;

	/** @var callable $function */
	private $function;

	/** @var Module $module */
	private $module;

	/** @var string[] */
	private $filters = array ();

	public function __construct ($path)
	{
		$this->setRoute ($path);
	}

	/**
	 * @return string
	 */
	public function getRoute ()
	{
		return $this->route;
	}

	/**
	 * @param string $route
	 */
	public function setRoute ($route)
	{
		$this->route = $route;
	}

	/**
	 * @return callable
	 */
	public function getFunction ()
	{
		return $this->function;
	}

	/**
	 * @param callable $function
	 */
	public function setFunction ($function)
	{
		$this->function = $function;
	}

	/**
	 * @return Module
	 */
	public function getModule ()
	{
		return $this->module;
	}

	/**
	 * @param Module $module
	 */
	public function setModule ($module)
	{
		$this->module = $module;
	}

	/**
	 * Add a filter
	 * @param $filtername
	 * @return $this
	 */
	public function filter ($filtername)
	{
		$arguments = func_get_args ();
		array_shift ($arguments);

		$filters = explode (',', $filtername);
		foreach ($filters as $filter)
		{
			$objfilter = new Filter ($filter);
			$objfilter->setArguments ($arguments);

			$this->filters[] = $objfilter;
		}

		return $this;
	}

	/**
	 * @return Filter[]
	 */
	public function getFilters ()
	{
		return $this->filters;
	}

}
{'fraction_non_alphanumeric': 0.17072379097695553, 'fraction_numerical': 0.005842259006815969, 'mean_word_length': 2.9512820512820515, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3727308', 'n_tokens_mistral': 1169, 'n_tokens_neox': 1052, 'n_words': 258}