<commit_before><?php
namespace Base;

use Base\Config\Node;

class Base {

	private $_config;
	private $_layout;
	private $_controller;
	private $_action;
	private $_resources = array();
	private $_handled = false;
	private $_hooks = array();
	private $_active_module;

	private $_force_route = false;

	final public function __construct() {

		$envs = require CONFIG_ROOT . 'envs.php';

		$this->getEnvironment()
		$this->_config = new Config\Config(CONFIG_ROOT . 'app.php');
		date_default_timezone_set('Europe/London');
		$partial_path =  isset($this->_config->partials) ? $this->_config->partials : 'partials';
		Template::setPartialPath($partial_path);
		
		if ($this->_config->error_handling) {
			ini_set('display_errors',false);
			set_error_handler(array($this,'errorHandler'));
			set_exception_handler(array($this,'exceptionHandler'));
			register_shutdown_function(array($this,'shutdownHandler'));
		}
	}

	public function route($uri) {
		$this->_force_route = $uri;
	}

	public function getAppClass($ns,$name,$force_module=null) {
		<commit_msg>not sure what happened there :S<commit_after><?php
namespace Base;

use Base\Config\Node;

class Base {

	private $_config;
	private $_layout;
	private $_controller;
	private $_action;
	private $_resources = array();
	private $_handled = false;
	private $_hooks = array();
	private $_active_module;

	private $_force_route = false;

	final public function __construct() {

		$envs = file_exists(CONFIG_ROOT . 'envs.php') ? require CONFIG_ROOT . 'envs.php' : [];
		$default = isset($envs['_default']) ? $envs['_default'] : 'shared';
		unset($envs['_default']);

		$env = $this->getEnvironment()->detectEnvironment($envs,$default);

		$this->_config = new Config\Config(CONFIG_ROOT . 'app.php', $env);

		date_default_timezone_set('Europe/London');
		$partial_path =  isset($this->_config->partials) ? $this->_config->partials : 'partials';
		Template::setPartialPath($partial_path);
		
		if ($this->_config->error_handling) {
			ini_set('display_errors',false);
			set_error_handler(array($this,'errorHandler'));
			set_exception_handler(array($this,'exceptionHandler'));
			register_shutdown_function(array($this,'shutdownHandler'));
		}
	}

	public function route($uri) {
		$this->_force_route = $uri;
	}

	public function getAppClass($ns,$name,$force_module=null) {
		
{'fraction_non_alphanumeric': 0.1563573883161512, 'fraction_numerical': 0.0, 'mean_word_length': 5.692528735632184, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 22, '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': '6665229', 'n_tokens_mistral': 794, 'n_tokens_neox': 735, 'n_words': 138}