解析其他未处理的回调
@param array $matches
@return string
172445
private function parse_callback($matches)
    {
    	$method = $matches[1];
    	//$params = str_replace(array('"', '\''), '', $matches[2]);
    	$params = $this->addquote($matches[2]);
    	switch ($method) {
    	    case 'template':
    		case 'include':
    			$content = '<?php include $this->template(' . $params . '); ?>';
    			break;
    		case 'layout':
    		    $content = '<!-- php__layout(' . $params . ') -->';
    		    break;
    	}
    	
    	return isset($content) ? '' . $this->addquote($content) : '';
    }
1250679
public function _parseParams(array $matches)
    {
        $params = array();
        foreach ($matches as $k => $v) {
            if (is_numeric($k)) {
                if ($k === 0) {
                    continue;
                }
                $params[] = $v;
            } else {
                $params[$k] = $v;
            }
        }
        return new Set($params);
    }
562408
private function encryptMail(array $matches): string
    {
        [, $email, $text] = $matches;

        if ($text === $email) {
            $text = '';
        }

        return
            '<span'.(!empty($this->mailCssClass) ? ' class="'.$this->mailCssClass.'"' : '').'>'.
            '<span>'.$this->getSecuredName($email).'</span>'.
                $this->mailAtText[array_rand($this->mailAtText)].
            '<span>'.$this->getSecuredName($email, true).'</span>'.
            ($text ? ' (<span>'.$text.'</span>)' : '').
            '</span>';
    }
115008
private function restoreProtectedHtml($matches): string
    {
        \preg_match('/.*"(?<id>\d*)"/', $matches['attributes'], $matchesInner);

        $html = '';
        if (isset($this->protectedChildNodes[$matchesInner['id']])) {
            $html .= $this->protectedChildNodes[$matchesInner['id']];
        }

        return $html;
    }
716332
protected function placeHolder(array $matches)
    {
        $placeholder = '%{{' . md5(time() . count($this->holder) . mt_rand(0, 500)) . '}}%';
        $this->holder[$placeholder] = $matches['1'];

        return $placeholder;
    }
1211982
protected static function p(array $matches)
    {
        $line = $matches[1];
        $trimmed = trim($line);

        if (preg_match('/^<\/?(ul|ol|li|h|p|bl)/', $trimmed)) {
            return "\n$line\n";
        }

        return sprintf("\n<p>%s</p>\n", $trimmed);
    }
1024422
protected function jsMatcher($matches)
    {
        $chr = $matches[0];
        if (strlen($chr) == 1) {
            return sprintf('\\x%02X', ord($chr));
        }
        $chr = $this->convertEncoding($chr, 'UTF-16BE', 'UTF-8');
        return sprintf('\\u%04s', strtoupper(bin2hex($chr)));
    }
908699
protected function matchToKeys(array $matches)
    {
        $parameterNames = $this->parameterNames();

        if (count($parameterNames) == 0) {
            return array();
        }

        $parameters = array_intersect_key($matches, array_flip($parameterNames));

        return array_filter($parameters, function ($value)
        {
            return is_string($value) && (strlen($value) > 0);
        });
    }
132751
protected function parseDocParameter( $matches )
	{
		$parameter	= new ADT_PHP_Parameter( $matches[4], $matches[2] );
		if( isset( $matches[5] ) )
			$parameter->setDescription( $matches[5] );
		return $parameter;
	}
161234
protected function _censorCallback($matches) {
        $length = mb_strlen(trim($matches[0]));
        $censored = '';
        $symbols = str_shuffle('*@#$*!?%');
        $i = 0;
        $s = 0;

        if ($length > 10) {
            $length = 10;
        }

        while ($i < $length) {
            $censored .= $symbols[$s];

            $i++;
            $s++;

            if ($s > 7) {
                $s = 0;
            }
        }

        return $censored;
    }
1157792
private function getArguments($matches)
	{
		$arguments = array();

		foreach ($matches as $key => $match) {
			if ($key === 0) continue;

			if (strlen($match) > 0) {
				$arguments[] = $match;
			}
		}

		return $arguments;
	}
139549
protected function cssEscaper(array $matches): string
	{
		$chr = $matches[0];

		if(strlen($chr) === 1)
		{
			$ord = ord($chr);
		}
		else
		{
			$chr = mb_convert_encoding($chr, 'UTF-16BE', 'UTF-8');

			$ord = hexdec(bin2hex($chr));
		}

		return sprintf('\\%X ', $ord);
	}
930002
protected function _translate($matches)
    {
        $replacement = '';
        $translator = $this->getObject('translator');

        switch ($matches[0])
        {
            case 'D':
                $replacement = $translator->translate(strtoupper($this->_date->format('D')));
                break;

            case 'l':
                $replacement = $translator->translate(strtoupper($this->_date->format('l')));
                break;

            case 'F':
                $replacement = $translator->translate(strtoupper($this->_date->format('F')));
                break;

            case 'M':
                $replacement = $translator->translate(strtoupper($this->_date->format('F').'_SHORT'));
                break;
        }

        $replacement = preg_replace('/([a-z])/i', '\\\\$1', $replacement);

        return $replacement;
    }
813556
protected function parseParameters($matches)
    {
        parse_str($matches[1], $params);

        foreach ($params as $key => $val) {
            if (!$val) {
                continue;
            }
            switch ($key) {
                case 'weight':
                    $this->weight = (int) $val;
                    break;
                case 'alias':
                    $this->alias = $val;
                    break;
            }
        }

        return '';
    }
520826
private function _typePatternCallback($matches)
	{
		$type = empty($matches[2]) ? 'any' : ltrim($matches[2],':');

		// try basic numeric types
		switch($type)
		{
			case 'any':
				return self::TYPE_ANY;
			case 'int':
			case 'integer':
				return self::TYPE_INTEGER;
			case 'str':
			case 'string':
				return self::TYPE_STRING;
			case 'decimal':
			case 'dec':
				return self::TYPE_DECIMAL;
			case 'greedy':
				return self::TYPE_GREEDY;
		}

		// try the enumeration type
		if(preg_match("#^\(.+?\)$#", $type))
		{
			$items = explode("|",trim($type,"()"));
			$items = array_map('preg_quote', $items);
			return sprintf('(%s)',implode('|',$items));
		}

		// unknown type, fail
		throw new BuildException(
			"Unknown type $type in $this->_template");
	}
628753
protected function _sanitize_naughty_html($matches) {
		// encode opening brace
		$str = '&lt;' . $matches[1] . $matches[2] . $matches[3];
		
		// encode captured opening or closing brace to prevent recursive vectors
		$str .= str_replace(array('>', '<'), array('&gt;', '&lt;'), $matches[4]);
		
		return $str;
	}
557045
private function translatePhraseCallback($matches) {

		return 'xxxx';

		if(!empty($GLOBALS['phrases'][$config->site->current_locale][$matches[1]])) {
			return $GLOBALS['phrases'][$config->site->current_locale][$matches[1]];
		}

		if(isset($matches[3])) {
			return $this->storePhrase($matches[3], $matches[1]);
		}
		else {
			return $this->storePhrase($matches[1]);
		}
	}