public function read(&$text)
    {
        if (preg_match_all('#@template\(\'(.*)\'#siU', $text, $matches)) {
            foreach ($matches[1] as $key => $match) {
                if (is_string($match) && strpos($match, '.') === false) {
                    $path =  dirname($this->getTemplate()->getPath()).DS.$match.'.php';
                    $text = str_replace($matches[0][$key], '$this->loadFile('."'".$path."'", $text);
                }
            }
        }

        return $this;
    }
public function read(&$text)
    {
        if (preg_match_all('#@template\(\'(.*)\'#siU', $text, $matches)) {
            foreach ($matches[1] as $key => $match) {
                if (is_string($match) && strpos($match, '.') === false) {
                    $path =  dirname($this->getTemplate()->getPath()).DS.$match.'.php';
                    $text = str_replace($matches[0][$key], '$this->loadFile('."'".$path."'", $text);
                }
            }
        }

        return $this;
    }
public function read ( & $ text ) { if ( preg_match_all ( '#@template\(\'(.*)\'#siU' , $ text , $ matches ) ) { foreach ( $ matches [ 1 ] as $ key => $ match ) { if ( is_string ( $ match ) && strpos ( $ match , '.' ) === false ) { $ path = dirname ( $ this -> getTemplate ( ) -> getPath ( ) ) . DS . $ match . '.php' ; $ text = str_replace ( $ matches [ 0 ] [ $ key ] , '$this->loadFile(' . "'" . $ path . "'" , $ text ) ; } } } return $ this ; }
Replace template alias with loadFile functions.

This function only replaces relative identifiers to a full path
based on the path of the template.

@param string
@return LibBaseTemplateFilterAlias
Replace template alias with loadFile functions .