Cml\Service\Blade::addRule PHP Method

addRule() public method

添加一个模板替换规则
public addRule ( string $pattern, callable $func )
$pattern string 正则
$func callable 执行的闭包函数
    public function addRule($pattern, callable $func)
    {
        $this->rule[$pattern] = $func;
        return $this;
    }