<commit_before><?php
/**
 * Nooku Framework - http://www.nooku.org
 *
 * @copyright	Copyright (C) 2007 - 2013 <NAME> and Timble CVBA. (http://www.timble.net)
 * @license		GNU GPLv3 <http://www.gnu.org/licenses/gpl.html>
 * @link		git://git.assembla.com/nooku-framework.git for the canonical source repository
 */

namespace Nooku\Library;

/**
 * Alias Template Filter
 *
 * Read filter for aliases such as template(), text(), helper(), route() etc
 *
 * @author  <NAME> <http://nooku.assembla.com/profile/johanjanssens>
 * @package Nooku\Library\Template
 */
class TemplateFilterAlias extends TemplateFilterAbstract implements TemplateFilterCompiler, TemplateFilterRenderer
{
    /**
     * The alias read map
     *
     * @var array
     */
    protected $_alias_read = array(
        'helper('    => '$this->renderHelper(',
    	'object('    => '$this->getObject(',
        'date('      => '$this->renderHelper(\'date.format\',',
        'overlay('   => '$this->renderHelper(\'behavior.overlay\', ',
        'translate(' => '\JText::_(',
        'include('   => '$this->loadFile(',
        'route('     => '$this->getView()->getRoute(',
        'escape('    => '$this->getView()->escape(',
        'url('       => '$this->getView()->getBaseUrl()->toString('
    );

    /**
     * The alias write map
     *
     * @var array
     */
    protected $_alias_write = array();

    /**
     * Append an alias
     *
     * @param array $alias An array of aliases to be appended
     * @param int  $mode   The template mode
     * @return TemplateFilterAlias
     */
    public function addAlias(array $alias, $mode = TemplateFilter::MODE_COMPILE)
    {
        if($mode & TemplateFilter::MODE_COMPILE) {
            $this->_alias_read = array_merge($this->_alias_read, $alias);
        }<commit_msg>re #405 : Added title() template function. Will call ViewInterface::getTitle().<commit_after><?php
/**
 * Nooku Framework - http://www.nooku.org
 *
 * @copyright	Copyright (C) 2007 - 2013 <NAME> and Timble CVBA. (http://www.timble.net)
 * @license		GNU GPLv3 <http://www.gnu.org/licenses/gpl.html>
 * @link		git://git.assembla.com/nooku-framework.git for the canonical source repository
 */

namespace Nooku\Library;

/**
 * Alias Template Filter
 *
 * Read filter for aliases such as template(), text(), helper(), route() etc
 *
 * @author  <NAME> <http://nooku.assembla.com/profile/johanjanssens>
 * @package Nooku\Library\Template
 */
class TemplateFilterAlias extends TemplateFilterAbstract implements TemplateFilterCompiler, TemplateFilterRenderer
{
    /**
     * The alias read map
     *
     * @var array
     */
    protected $_alias_read = array(
        'helper('    => '$this->renderHelper(',
    	'object('    => '$this->getObject(',
        'date('      => '$this->renderHelper(\'date.format\',',
        'overlay('   => '$this->renderHelper(\'behavior.overlay\', ',
        'translate(' => '\JText::_(',
        'include('   => '$this->loadFile(',
        'route('     => '$this->getView()->getRoute(',
        'escape('    => '$this->getView()->escape(',
        'url('       => '$this->getView()->getBaseUrl()->toString(',
        'title('     => '$this->getView()->getTitle('
    );

    /**
     * The alias write map
     *
     * @var array
     */
    protected $_alias_write = array();

    /**
     * Append an alias
     *
     * @param array $alias An array of aliases to be appended
     * @param int  $mode   The template mode
     * @return TemplateFilterAlias
     */
    public function addAlias(array $alias, $mode = TemplateFilter::MODE_COMPILE)
    {
        if($mode & TemplateFilter::MODE_COMPILE) {
            $this->_alias_read = array_merge($this->_alias_read, $alias);
        }
{'fraction_non_alphanumeric': 0.16993815541812315, 'fraction_numerical': 0.0056466792148427, 'mean_word_length': 2.6941410129096326, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 60, 'https://': 0, 'lorem ipsum': 0, 'www.': 6, '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': '5087918', 'n_tokens_mistral': 1166, 'n_tokens_neox': 1139, 'n_words': 252}