public function addPostProcessor($callback, $autoload = false)
    {
        if ($autoload) {
            $name  = str_replace(Core::NAMESPACE_PLUGINS_PROCESSORS, '', $callback);
            $class = Core::NAMESPACE_PLUGINS_PROCESSORS . Core::toCamelCase($name);

            if (class_exists($class)) {
                $callback = array(new $class($this), 'process');
            } elseif (function_exists($class)) {
                $callback = $class;
            } else {
                $callback = array('autoload' => true, 'class' => $class, 'name' => $name);
            }

            $this->processors['post'][] = $callback;
        } else {
            $this->processors['post'][] = $callback;
        }
    }
public function addPostProcessor($callback, $autoload = false)
    {
        if ($autoload) {
            $name  = str_replace(Core::NAMESPACE_PLUGINS_PROCESSORS, '', $callback);
            $class = Core::NAMESPACE_PLUGINS_PROCESSORS . Core::toCamelCase($name);

            if (class_exists($class)) {
                $callback = array(new $class($this), 'process');
            } elseif (function_exists($class)) {
                $callback = $class;
            } else {
                $callback = array('autoload' => true, 'class' => $class, 'name' => $name);
            }

            $this->processors['post'][] = $callback;
        } else {
            $this->processors['post'][] = $callback;
        }
    }
public function addPostProcessor ( $ callback , $ autoload = false ) { if ( $ autoload ) { $ name = str_replace ( Core :: NAMESPACE_PLUGINS_PROCESSORS , '' , $ callback ) ; $ class = Core :: NAMESPACE_PLUGINS_PROCESSORS . Core :: toCamelCase ( $ name ) ; if ( class_exists ( $ class ) ) { $ callback = array ( new $ class ( $ this ) , 'process' ) ; } elseif ( function_exists ( $ class ) ) { $ callback = $ class ; } else { $ callback = array ( 'autoload' => true , 'class' => $ class , 'name' => $ name ) ; } $ this -> processors [ 'post' ] [ ] = $ callback ; } else { $ this -> processors [ 'post' ] [ ] = $ callback ; } }
Adds a postprocessor to the compiler, it will be called
before the template is compiled.

@param mixed $callback either a valid callback to the postprocessor or a simple name if the autoload is set to
true
@param bool  $autoload if set to true, the postprocessor is auto-loaded from one of the plugin directories, else
you must provide a valid callback
Adds a postprocessor to the compiler it will be called before the template is compiled .