<commit_before><?php

namespace mako;

use \mako\Mako;
use \mako\view\Compiler;
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.
	*
	* @var string
	*/

	protected $viewFile;

	/**
	* View variables.
	*
	* @var array
	*/

	protected $vars = array();

	/**
	* Global view variables.
	*
	* @var array
	*/

	protected static $globalVars = array();

	/**
	* The output.
	*
	* @var string
	*/

	protected $output;

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

	/**
	* Create a new view object.
	*
	* @access  public
	* @param   string  $view       Name of the view file
	* @param   array   $variables  (optional) Array of view variables
	*/

	public function __construct($view, array $variables = array())
	{
		// Check if view file exists

		if(file_exists($file = Mako::path('views', $view)))
		{
			$this->viewFile = $file;
		}

		// No view, check if template exists
<commit_msg>Added support for "dot notation" view paths<commit_after><?php

namespace mako;

use \mako\Mako;
use \mako\view\Compiler;
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.
	*
	* @var string
	*/

	protected $viewFile;

	/**
	* View variables.
	*
	* @var array
	*/

	protected $vars = array();

	/**
	* Global view variables.
	*
	* @var array
	*/

	protected static $globalVars = array();

	/**
	* The output.
	*
	* @var string
	*/

	protected $output;

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

	/**
	* Create a new view object.
	*
	* @access  public
	* @param   string  $view       Name of the view file
	* @param   array   $variables  (optional) Array of view variables
	*/

	public function __construct($view, array $variables = array())
	{
		$view = str_replace('.', '/', $view);
		
		// Check if view file exists

		if(file_exists($file = Mako::path('views', $view)))
		{
			$this->viewFile = $file;
		}

		// No view, check if template exists

{'fraction_non_alphanumeric': 0.2754905732974221, 'fraction_numerical': 0.0061562139284340135, 'mean_word_length': 1.6557711950970377, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '5413278', 'n_tokens_mistral': 854, 'n_tokens_neox': 799, 'n_words': 217}