protected function parse()
    {
        $data = $this->_source->getData();

        $prefilters = $this->getPreFilterInstances();
        foreach($prefilters as $prefilter) {
            $data = $prefilter->filter($data);
        }

        $realpath = $this->_source->getRealPath();
        $parser = new PHPTAL_Dom_SaxXmlParser($this->_encoding);

        $builder = new PHPTAL_Dom_PHPTALDocumentBuilder();
        $tree = $parser->parseString($builder, $data, $realpath)->getResult();

        foreach($prefilters as $prefilter) {
            if ($prefilter instanceof PHPTAL_PreFilter) {
                if ($prefilter->filterDOM($tree) !== NULL) {
                    throw new PHPTAL_ConfigurationException("Don't return value from filterDOM()");
                }
            }
        }

        $state = new PHPTAL_Php_State($this);

        $codewriter = new PHPTAL_Php_CodeWriter($state);
        $codewriter->doTemplateFile($this->getFunctionName(), $tree);

        return $codewriter->getResult();
    }
protected function parse()
    {
        $data = $this->_source->getData();

        $prefilters = $this->getPreFilterInstances();
        foreach($prefilters as $prefilter) {
            $data = $prefilter->filter($data);
        }

        $realpath = $this->_source->getRealPath();
        $parser = new PHPTAL_Dom_SaxXmlParser($this->_encoding);

        $builder = new PHPTAL_Dom_PHPTALDocumentBuilder();
        $tree = $parser->parseString($builder, $data, $realpath)->getResult();

        foreach($prefilters as $prefilter) {
            if ($prefilter instanceof PHPTAL_PreFilter) {
                if ($prefilter->filterDOM($tree) !== NULL) {
                    throw new PHPTAL_ConfigurationException("Don't return value from filterDOM()");
                }
            }
        }

        $state = new PHPTAL_Php_State($this);

        $codewriter = new PHPTAL_Php_CodeWriter($state);
        $codewriter->doTemplateFile($this->getFunctionName(), $tree);

        return $codewriter->getResult();
    }
protected function parse ( ) { $ data = $ this -> _source -> getData ( ) ; $ prefilters = $ this -> getPreFilterInstances ( ) ; foreach ( $ prefilters as $ prefilter ) { $ data = $ prefilter -> filter ( $ data ) ; } $ realpath = $ this -> _source -> getRealPath ( ) ; $ parser = new PHPTAL_Dom_SaxXmlParser ( $ this -> _encoding ) ; $ builder = new PHPTAL_Dom_PHPTALDocumentBuilder ( ) ; $ tree = $ parser -> parseString ( $ builder , $ data , $ realpath ) -> getResult ( ) ; foreach ( $ prefilters as $ prefilter ) { if ( $ prefilter instanceof PHPTAL_PreFilter ) { if ( $ prefilter -> filterDOM ( $ tree ) !== NULL ) { throw new PHPTAL_ConfigurationException ( "Don't return value from filterDOM()" ) ; } } } $ state = new PHPTAL_Php_State ( $ this ) ; $ codewriter = new PHPTAL_Php_CodeWriter ( $ state ) ; $ codewriter -> doTemplateFile ( $ this -> getFunctionName ( ) , $ tree ) ; return $ codewriter -> getResult ( ) ; }
Parse currently set template, prefilter and generate PHP code.

@return string (compiled PHP code)
Parse currently set template prefilter and generate PHP code .