protected function _renderTags($template) {
		if (strpos($template, $this->_otag) === false) {
			return $template;
		}

		$first = true;
		$this->_tagRegEx = $this->_prepareTagRegEx($this->_otag, $this->_ctag, true);

		$html = '';
		$matches = array();
		while (preg_match($this->_tagRegEx, $template, $matches, PREG_OFFSET_CAPTURE)) {
			$tag      = $matches[0][0];
			$offset   = $matches[0][1];
			$modifier = $matches['type'][0];
			$tag_name = trim($matches['tag_name'][0]);

			if (isset($matches['leading']) && $matches['leading'][1] > -1) {
				$leading = $matches['leading'][0];
			} else {
				$leading = null;
			}

			if (isset($matches['trailing']) && $matches['trailing'][1] > -1) {
				$trailing = $matches['trailing'][0];
			} else {
				$trailing = null;
			}

			$html .= substr($template, 0, $offset);

			$next_offset = $offset + strlen($tag);
			if ((substr($html, -1) == "\n") && (substr($template, $next_offset, 1) == "\n")) {
				$next_offset++;
			}
			$template = substr($template, $next_offset);

			$html .= $this->_renderTag($modifier, $tag_name, $leading, $trailing);

			if ($first == true) {
				$first = false;
				$this->_tagRegEx = $this->_prepareTagRegEx($this->_otag, $this->_ctag);
			}
		}

		return $html . $template;
	}
protected function _renderTags($template) {
		if (strpos($template, $this->_otag) === false) {
			return $template;
		}

		$first = true;
		$this->_tagRegEx = $this->_prepareTagRegEx($this->_otag, $this->_ctag, true);

		$html = '';
		$matches = array();
		while (preg_match($this->_tagRegEx, $template, $matches, PREG_OFFSET_CAPTURE)) {
			$tag      = $matches[0][0];
			$offset   = $matches[0][1];
			$modifier = $matches['type'][0];
			$tag_name = trim($matches['tag_name'][0]);

			if (isset($matches['leading']) && $matches['leading'][1] > -1) {
				$leading = $matches['leading'][0];
			} else {
				$leading = null;
			}

			if (isset($matches['trailing']) && $matches['trailing'][1] > -1) {
				$trailing = $matches['trailing'][0];
			} else {
				$trailing = null;
			}

			$html .= substr($template, 0, $offset);

			$next_offset = $offset + strlen($tag);
			if ((substr($html, -1) == "\n") && (substr($template, $next_offset, 1) == "\n")) {
				$next_offset++;
			}
			$template = substr($template, $next_offset);

			$html .= $this->_renderTag($modifier, $tag_name, $leading, $trailing);

			if ($first == true) {
				$first = false;
				$this->_tagRegEx = $this->_prepareTagRegEx($this->_otag, $this->_ctag);
			}
		}

		return $html . $template;
	}
protected function _renderTags ( $ template ) { if ( strpos ( $ template , $ this -> _otag ) === false ) { return $ template ; } $ first = true ; $ this -> _tagRegEx = $ this -> _prepareTagRegEx ( $ this -> _otag , $ this -> _ctag , true ) ; $ html = '' ; $ matches = array ( ) ; while ( preg_match ( $ this -> _tagRegEx , $ template , $ matches , PREG_OFFSET_CAPTURE ) ) { $ tag = $ matches [ 0 ] [ 0 ] ; $ offset = $ matches [ 0 ] [ 1 ] ; $ modifier = $ matches [ 'type' ] [ 0 ] ; $ tag_name = trim ( $ matches [ 'tag_name' ] [ 0 ] ) ; if ( isset ( $ matches [ 'leading' ] ) && $ matches [ 'leading' ] [ 1 ] > - 1 ) { $ leading = $ matches [ 'leading' ] [ 0 ] ; } else { $ leading = null ; } if ( isset ( $ matches [ 'trailing' ] ) && $ matches [ 'trailing' ] [ 1 ] > - 1 ) { $ trailing = $ matches [ 'trailing' ] [ 0 ] ; } else { $ trailing = null ; } $ html .= substr ( $ template , 0 , $ offset ) ; $ next_offset = $ offset + strlen ( $ tag ) ; if ( ( substr ( $ html , - 1 ) == "\n" ) && ( substr ( $ template , $ next_offset , 1 ) == "\n" ) ) { $ next_offset ++ ; } $ template = substr ( $ template , $ next_offset ) ; $ html .= $ this -> _renderTag ( $ modifier , $ tag_name , $ leading , $ trailing ) ; if ( $ first == true ) { $ first = false ; $ this -> _tagRegEx = $ this -> _prepareTagRegEx ( $ this -> _otag , $ this -> _ctag ) ; } } return $ html . $ template ; }
Loop through and render individual Mustache tags.

@access protected
@param string $template
@return void
Loop through and render individual Mustache tags .