Location: PHPKode > scripts > Redstart Templating > Redstart-Templating-master/Redstart/Templating/Plugin/Plugin.php
<?php

namespace Redstart\Templating\Plugin;

use Redstart\Templating\Template;

/**
 * Template Plugin
 *
 * @package Redstart    
 * @subpackage Redstart_Templating_Plugin
 *
 * @author Hyyan Abo Fakher
 * @since Redstart 1.0
 * @version 1.0
 */
abstract class Plugin implements PluginInterface {

    /**
     * Template Instance
     * @var \Redstart\Templating\Template 
     */
    private $template;

    /**
     * Constrcut New Plugin
     * @param \Redstart\Templating\Template $template
     */
    public function __construct(Template $template) {
        $this->template = $template;
    }

    /**
     * Get plugin's template
     * @return \Redstart\Templating\Template
     */
    public function getTemplate() {
        return $this->template;
    }

    /**
     * Applies escaping to a value.
     * 
     * @see Template::escape()
     * 
     * @param string $value the value to apply escaping to it
     * @param array $listeners array of listeners to overide predefined escaping
     *                         listeners in the template system
     * 
     * @return string escaped value
     */
    protected function escape($value, array $listeners = array()) {
        return $this->getTemplate()->escape($value, $listeners);
    }

}

Return current item: Redstart Templating