<commit_before><?php
namespace Evil\Libraries;

/**
 * Template
 * Provides non-parsing template support.
 *
 * @package Evil Genius Framework
 * @author <NAME>
 * @copyright Evil Genius Media
 */
class Template
{
	/**
	 * Template::__construct()
	 *
	 * @param Controller $controller The framework controller.
	 * @param Arguments $arguments The framework arguments object.
	 * @return void
	 */
	public function __construct($template, $application_path)
	{
		if ( empty($template) || !is_string($template) )
			$template = 'default';

		$this->setTemplate($template, $application_path);
	}

	/**
	 * Template::addHook()
	 * Add a pre-display hook to the template.
	 *
	 * @param Closure $function The function to execute.
	 * @return void
	 */
	public function addHook($function)
	{
		$this->_hooks[] = $function;
	}

	/**
	 * Template::setTemplate()<commit_msg>Fix: phpDoc comments were outdated.<commit_after><?php
namespace Evil\Libraries;

/**
 * Template
 * Provides non-parsing template support.
 *
 * @package Evil Genius Framework
 * @author <NAME>
 * @copyright Evil Genius Media
 */
class Template
{
	/**
	 * Template::__construct()
	 *
	 * @param string $template The template directory to use.
	 * @param string $application_path The path to the application.
	 * @return void
	 */
	public function __construct($template, $application_path)
	{
		if ( empty($template) || !is_string($template) )
			$template = 'default';

		$this->setTemplate($template, $application_path);
	}

	/**
	 * Template::addHook()
	 * Add a pre-display hook to the template.
	 *
	 * @param Closure $function The function to execute.
	 * @return void
	 */
	public function addHook($function)
	{
		$this->_hooks[] = $function;
	}

	/**
	 * Template::setTemplate()
{'fraction_non_alphanumeric': 0.1382857142857143, 'fraction_numerical': 0.0, 'mean_word_length': 3.8774373259052926, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, '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': '3841600', 'n_tokens_mistral': 561, 'n_tokens_neox': 510, 'n_words': 146}