if标签解析
格式：
<if condition=" $a eq 1" >
<elseif condition="$a eq 2" />
<else />
</if>
表达式支持 eq neq gt egt lt elt == > >= < <= or and || &&
@access public
@param array $tag 标签属性
@param string $content  标签内容
@return string
492580
public function _if($tag,$content) {
        $condition  =   $this->parseCondition($tag['condition']);
        $parseStr   =   '<?php if('.$condition.'): ?>'.$content.'<?php endif; ?>';
        return $parseStr;
    }
512628
public function tag($name, $content, $htmlOptions = array()) {
        $element = "<$name ";
        foreach ($htmlOptions as $k => $v) {
            $element .= "$k=\"" . self::encode($v) . "\" ";
        }
        return $element . '>' . $content . '</' . $name . '>';
    }
1157820
public function render(array $tag, $content) {
        $setup = $this->getFilter()->getTag($tag['tag']);

        $vars = $tag['attributes'];
        $vars['filter'] = $this->getFilter();
        $vars['content'] = $content;

        $this->_view->set($vars);

        // Try outside of the plugin first in-case they use their own templates
        try {
            $response = $this->_view->render($setup['template']);

        // Else fallback to the plugin templates
        } catch (Exception $e) {
            $this->_view->plugin = 'Utility';

            $response = $this->_view->render($setup['template']);
        }

        $this->_view->hasRendered = false;
        $this->_view->plugin = null;

        return $response;
    }
163156
public static function createTag($tag, $htmlOptions = null, $content = null)
    {
        $return = '';
        $tag = self::clearAttributeKey(trim($tag));
        if ($tag) {
            $attributes = self::createAttributeString($htmlOptions);
            $return = '<' . $tag . (!empty($attributes) ? ' ' . $attributes : '');
            if ($content === false) {
                $return .= '>';
            } elseif ($content === true) {
                $return .= '>';
            } else {
                $return .= '>' . $content . self::createCloseTag($tag);
            }
        }

        return $return;
    }
1341343
private function getStart($content)
    {
        $str = '';
        if (preg_match('/function\s*\(.*\)\s*{(.+)/', $content, $r)) {
            $r = preg_replace('/(\/\/|#).*/', '', $r[1]); //去掉可能注释
            $str .= trim($r);
        }
        return $str;
    }
640716
public function strip($content)
    {
        if (empty($this->registered)) {
            return $content;
        }
        $pattern = $this->getRegex();

        return preg_replace_callback("/{$pattern}/s", [$this, 'stripTag'], $content);
    }
1218888
public function hasShortcode(string $content, $tags = []): bool
    {
        $tags = $this->preProcessTags($tags);
        $matches = $this->parser->parseShortcode($content, $tags);

        return !empty($matches);
    }
136268
public function tagCase($tag, $content)
    {
        $value = isset($tag['expression']) ? $tag['expression'] : $tag['value'];
        $flag  = substr($value, 0, 1);

        if ('$' == $flag || ':' == $flag) {
            $value = $this->autoBuildVar($value);
            $value = 'case ' . $value . ':';
        } elseif (strpos($value, '|')) {
            $values = explode('|', $value);
            $value  = '';
            foreach ($values as $val) {
                $value .= 'case "' . addslashes($val) . '":';
            }
        } else {
            $value = 'case "' . $value . '":';
        }

        $parseStr = '<?php ' . $value . ' ?>' . $content;
        $isBreak  = isset($tag['break']) ? $tag['break'] : '';

        if ('' == $isBreak || $isBreak) {
            $parseStr .= '<?php break; ?>';
        }

        return $parseStr;
    }
906503
public function strip(array $tag, $content) {
        $url = isset($tag['attributes']['href']) ? $tag['attributes']['href'] : $content;

        return parent::strip($tag, $url);
    }
2901
static function p($tag, array $contents, array $p = []) {return
		(new static([self::$P__CONTENTS => $contents, self::$P__TAG => $tag] + $p))->_p();
	}
1272185
public static function tagGetVer(string $tag) :?int
        {
            if (!self::$useTagsBuffer || !($ver = (self::$tagsBuffer[$tag] ?? null))) {
                $ver = self::$tagsBuffer[$tag] = self::GetInstance()
                                                     ->get("\$vxnTag:{$tag}") ?: self::tagIncrementVer($tag);
            }

            return $ver ?: null;
        }
1084928
public function getSig($content) {
        if(!$this->privateKey || !$content) {
            return false;
        }
        $privateKey = openssl_pkey_get_private($this->privateKey, '');
        $encryptedData = '';
        // 私钥加密
        openssl_sign($content, $encryptedData, $privateKey, OPENSSL_ALGO_SHA1);
        return base64_encode($encryptedData);
    }
951860
public function reattachSeparator($content) {
        $separator = $this->imgSeparator;
        $content = array_map(function($val) use ($separator) {
            // If html content starts with text then after the array explosion the first item in array will contain only text and <img tag should not be reattached to it
            if (preg_match('/src=\".+\"/', $val) == 1) {
                return $separator . $val;
            } else if (preg_match('/src=\".+\"/', $val) == 0) { // there is array item without src, do not add img tag o
                return $val;
            }

        }, $content);
        
        return $content;
    }
419650
public function getIncludeTagLib(& $content) {
        //搜索是否有TagLib标签
        $find = preg_match('/'.$this->config['taglib_begin'].'taglib\s(.+?)(\s*?)\/'.$this->config['taglib_end'].'\W/is',$content,$matches);
        if($find) {
            //替换TagLib标签
            $content        =   str_replace($matches[0],'',$content);
            //解析TagLib标签
            $array          =   $this->parseXmlAttrs($matches[1]);
            $this->tagLib   =   explode(',',$array['name']);
        }
        return;
    }
1313866
public function process($content)
    {
        foreach ($this->tags as $t) {
            $content = $this->reserveTag($content, $t);
        }

        $content = strtr($content, $this->replacementTable);
        return $this->restoreHolders($content);
    }
774657
public function parse($content)
    {
        if (strpos($content, '@ORM') === false) {
            return null;
        }

        if (preg_match(self::PATTERN, $content, $matches)) {
            return (new \SplFixedArray(2))->fromArray([$matches[1], $matches[2]]);
        }

        return null;
    }
721223
public function _notpresent($tag,$content) {
        $name       =   $tag['name'];
        $name       =   $this->autoBuildVar($name);
        $parseStr   =   '<?php if(!isset('.$name.')): ?>'.$content.'<?php endif; ?>';
        return $parseStr;
    }