<commit_before><?php

namespace Primal\Routing;

class Route {

	public $url = '';
	public $name = '';
	public $path = '';
	public $segments = array();
	public $arguments = array();
	public $parameters = array();
	public $map = array();
	public $origin = null;

	public function __construct($config) {
		foreach ($config as $key => $value) {
			if (isset($this->$key)) {
				$this->$key = $value;
			}
		}
	}

	public function __invoke() {
		$this->run();
	}

	public function run() {
		include $this->path;
	}

	/**
	 * Reroutes the request to the specified route.
	 *
	 * @param string $new_route Name of the new route
	 * @return $this<commit_msg>Changed origin's default to false so isset wouldn't skip over it.<commit_after><?php

namespace Primal\Routing;

class Route {

	public $url = '';
	public $name = '';
	public $path = '';
	public $segments = array();
	public $arguments = array();
	public $parameters = array();
	public $map = array();
	public $origin = false;

	public function __construct($config) {
		foreach ($config as $key => $value) {
			if (isset($this->$key)) {
				$this->$key = $value;
			}
		}
	}

	public function __invoke() {
		$this->run();
	}

	public function run() {
		include $this->path;
	}

	/**
	 * Reroutes the request to the specified route.
	 *
	 * @param string $new_route Name of the new route
	 * @return $this
{'fraction_non_alphanumeric': 0.16038433111603842, 'fraction_numerical': 0.0, 'mean_word_length': 3.4248366013071894, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, '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': '3074572', 'n_tokens_mistral': 479, 'n_tokens_neox': 443, 'n_words': 137}