<commit_before><?php

namespace mako
{
	use \mako\Mako;
	use \Exception;
	use \RuntimeException;
	
	/**
	* View/template class.
	*
	* @author     <NAME>
	* @copyright  (c) 2008-2012 <NAME>
	* @license    http://www.makoframework.com/license
	*/

	class View
	{
		//---------------------------------------------
		// Class variables
		//---------------------------------------------

		/**
		* Path to view file.
		*/

		protected $viewFile;

		/**
		* View variables.
		*/

		protected $vars = array();

		/**
		* Global view variables.
		*/

		protected static $globalVars = array();

		/**
		* The output.
		*/

		protected $output;

		//---------------------------------------------
		// Class constructor, destructor etc ...
		//---------------------------------------------

		/**
		* Create a new view object.
		*
		* @access  public
		* @param   string  Name of the view file
		*/

		public function __construct($view)
		{
			if(strrpos($view, '::') !== false)
			{
				list($bundle, $view) = explode('::', $view);

				$this->viewFile = MAKO_BUNDLES . '/' . $bundle . '/views/' . $file . '.php';
			}
			else
			{
				$this->viewFile = MAKO_APPLICATION . '/views/' . $view . '.php';
			}
			
			if(file_exists($this->viewFile) === false)
			{
				throw new RuntimeException(vsprintf("%s(): The '%s' view does not exist.", array(__METHOD__, $view)));
			}
		}

		/**
		* Factory method making method chaining possible right off the bat.
		*
		* @access  public
		* @param   string  Name of the view file
		* @return  View
		*/

		public static function factory($view)
		{
			return new static($view);
		}

		//---------------------------------------------
		// Class methods<commit_msg>Fixed bug in view class<commit_after><?php

namespace mako
{
	use \mako\Mako;
	use \Exception;
	use \RuntimeException;
	
	/**
	* View/template class.
	*
	* @author     <NAME>
	* @copyright  (c) 2008-2012 <NAME>
	* @license    http://www.makoframework.com/license
	*/

	class View
	{
		//---------------------------------------------
		// Class variables
		//---------------------------------------------

		/**
		* Path to view file.
		*/

		protected $viewFile;

		/**
		* View variables.
		*/

		protected $vars = array();

		/**
		* Global view variables.
		*/

		protected static $globalVars = array();

		/**
		* The output.
		*/

		protected $output;

		//---------------------------------------------
		// Class constructor, destructor etc ...
		//---------------------------------------------

		/**
		* Create a new view object.
		*
		* @access  public
		* @param   string  Name of the view file
		*/

		public function __construct($view)
		{
			if(strrpos($view, '::') !== false)
			{
				list($bundle, $view) = explode('::', $view);

				$this->viewFile = MAKO_BUNDLES . '/' . $bundle . '/views/' . $view . '.php';
			}
			else
			{
				$this->viewFile = MAKO_APPLICATION . '/views/' . $view . '.php';
			}
			
			if(file_exists($this->viewFile) === false)
			{
				throw new RuntimeException(vsprintf("%s(): The '%s' view does not exist.", array(__METHOD__, $view)));
			}
		}

		/**
		* Factory method making method chaining possible right off the bat.
		*
		* @access  public
		* @param   string  Name of the view file
		* @return  View
		*/

		public static function factory($view)
		{
			return new static($view);
		}

		//---------------------------------------------
		// Class methods
{'fraction_non_alphanumeric': 0.2773851590106007, 'fraction_numerical': 0.004711425206124852, 'mean_word_length': 1.5070110701107011, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '6238744', 'n_tokens_mistral': 1231, 'n_tokens_neox': 1026, 'n_words': 257}