src/Template.php
protected function parseTemplate($str)
    {
        $tag = '/{([\/$]?[-_:\w]*)}/';

        $input = preg_split($tag, $str, -1, PREG_SPLIT_DELIM_CAPTURE);

        $prefix = current($input);
        next($input);
        $this->template = [$prefix];

        $this->parseTemplateRecursive($input, $this->template);
    }
protected function parseTemplate($str)
    {
        $tag = '/{([\/$]?[-_:\w]*)}/';

        $input = preg_split($tag, $str, -1, PREG_SPLIT_DELIM_CAPTURE);

        $prefix = current($input);
        next($input);
        $this->template = [$prefix];

        $this->parseTemplateRecursive($input, $this->template);
    }
protected function parseTemplate ( $ str ) { $ tag = '/{([\/$]?[-_:\w]*)}/' ; $ input = preg_split ( $ tag , $ str , - 1 , PREG_SPLIT_DELIM_CAPTURE ) ; $ prefix = current ( $ input ) ; next ( $ input ) ; $ this -> template = [ $ prefix ] ; $ this -> parseTemplateRecursive ( $ input , $ this -> template ) ; }
Deploys parse recursion.

@param string $str
Deploys parse recursion .