protected function _parse(array $nodes, array $wrapper = array()) {
        $parsed = '';

        if (!$nodes) {
            return $parsed;
        }

        foreach ($nodes as $node) {
            if (is_string($node)) {
                $string = $this->_triggerHook('beforeContent', $node);

                if (!$wrapper) {
                    $string = $this->convertLineBreaks($string);
                }

                $string = $this->_triggerHook('afterContent', $string);

            } else {
                $string = $this->getFilterByTag($node['tag'])->parse($node, $this->_parse($node['children'], $node));
            }

            $parsed .= $string;
        }

        return $parsed;
    }
protected function _parse(array $nodes, array $wrapper = array()) {
        $parsed = '';

        if (!$nodes) {
            return $parsed;
        }

        foreach ($nodes as $node) {
            if (is_string($node)) {
                $string = $this->_triggerHook('beforeContent', $node);

                if (!$wrapper) {
                    $string = $this->convertLineBreaks($string);
                }

                $string = $this->_triggerHook('afterContent', $string);

            } else {
                $string = $this->getFilterByTag($node['tag'])->parse($node, $this->_parse($node['children'], $node));
            }

            $parsed .= $string;
        }

        return $parsed;
    }
protected function _parse ( array $ nodes , array $ wrapper = array ( ) ) { $ parsed = '' ; if ( ! $ nodes ) { return $ parsed ; } foreach ( $ nodes as $ node ) { if ( is_string ( $ node ) ) { $ string = $ this -> _triggerHook ( 'beforeContent' , $ node ) ; if ( ! $ wrapper ) { $ string = $ this -> convertLineBreaks ( $ string ) ; } $ string = $ this -> _triggerHook ( 'afterContent' , $ string ) ; } else { $ string = $ this -> getFilterByTag ( $ node [ 'tag' ] ) -> parse ( $ node , $ this -> _parse ( $ node [ 'children' ] , $ node ) ) ; } $ parsed .= $ string ; } return $ parsed ; }
Cycle through the nodes and parse the string with the appropriate filter.

@param array $nodes
@param array $wrapper
@return string
Cycle through the nodes and parse the string with the appropriate filter .