$options为是否指定options的string内容，用在允许多次执行里面
1104
private function _parseReturn($method, $operate = '', $options = null)
    {
        if ($operate) $operate = ' ' . $operate . ' ';
        $string = (is_null($options) && isset($this->options[$method]['0'])) ? $this->options[$method]['0'] : $options;
        if (isset($string)) {
            if (in_array($method, array('table', 'join'))) {
                $config = Config::config()->{$this->name};
                $prefix = $config['prefix'];
                unset($config);
                $string = preg_replace_callback('/__([A-Z_-]+)__/sU', function ($match) use ($prefix) {
                    return '`' . $prefix . strtolower($match[1]) . '`';
                }, $string);
            }
            return $operate . $string;
        } else
            return '';
    }
456337
private static function appRun(){
        // echo "runing";
        // 当有get参数传递时 获取get参数
        if(isset($_GET['s'])){
            // 更加"/"将get参数分割成数组
            $info = explode('/',$_GET['s']);

            // 获取模块名称 转换成小写
            $m = strtolower($info[0]);
            // 获取控制器名称 转换成小写
            $c = strtolower($info[1]);
            // 获取方法名称 转换成小写
            $a = strtolower($info[2]);

        }else{ // 当用户没有参数传递时设置默认参数

            // 模块名称 默认名称
            $m = 'home';
            // 默认控制器
            $c = 'entry';
            // 默认方法名称
            $a = 'index';
        }

        // 定义三个常量 将路由参照中的模块 控制器和方法定义成方法
        // 用于在view核心方法中能够访问到这些参数，凭借出模板的路径方便控制器载入模板

        // 模块常量
        define('MODULE',$m);
        // 控制器常量
        define('CONTROLLER',$c);
        // 方法名常量
        define('ACTION',$a);

        // 根据get参数的在自动执行对象类中的方法
        // 因为类名称首字母大写 为保持一致转换成大写
        $controller = ucfirst($c);

        // 拼接对应类的命名 ，实现不同参数调用不同的类，文件以及通过composer自动加载了
        // 路径如：\app\home\controller\Entry()
        // 其中上面路径中 app controller是固定不变的 ，
        // home：对应的模块
        // Entry: 方法名称
        // 拼接路径是需要将home 和Entry用变量替换
        $class = "\app\\{$m}\controller\\{$controller}";

        // 执行对应的方法  实现路由的分配
        // 通过echo 触发view 中Base类中的__toString 方法

        echo call_user_func_array([new $class,$a],[]);

    }
231407
public function getAsHtml($options = [])
    {
        $defaults = [
            'table_id' => null,
            'table_class' => null,
            'translations' => [
                'title' => 'Transaction Details'
            ],
        ];

        $options = array_merge($defaults, $options);
        $translations = $options['translations'];

        $html = "<table id='{$options['table_id']}' class='{$options['table_class']}'><tbody>";
        foreach ($this->getAllSetData() as $key => $value) {
            $html .= "<tr><td>" . $this->translate($key, $translations) . "</td><td>" . $value . "</td></tr>";
        }

        $html .= "</tbody></table>";
        return $html;
    }
670593
function outputOptions($width = 24)
    {
        # echo "* Available options:\n";
        $lines = array();
        foreach( $this->all() as $spec )
        {
            $c1 = $spec->getReadableSpec();
            if( strlen($c1) > $width )
            {
                $line = sprintf("% {$width}s", $c1) . "\n" . $spec->description;
            }
            else
            {
                $line = sprintf("% {$width}s      %s",$c1, $spec->description );
            }
            $lines[] = $line;
        }
        return $lines;
    }
608070
function text (options) {
  var opts = options || {}

  var defaultCharset = opts.defaultCharset || 'utf-8'
  var inflate = opts.inflate !== false
  var limit = typeof opts.limit !== 'number'
    ? bytes.parse(opts.limit || '100kb')
    : opts.limit
  var type = opts.type || 'text/plain'
  var verify = opts.verify || false

  if (verify !== false && typeof verify !== 'function') {
    throw new TypeError('option verify must be function')
  }

  // create the appropriate type checking function
  var shouldParse = typeof type !== 'function'
    ? typeChecker(type)
    : type

  function parse (buf) {
    return buf
  }

  return function textParser (req, res, next) {
    if (req._body) {
      debug('body already parsed')
      next()
      return
    }

    req.body = req.body || {}

    // skip requests without bodies
    if (!typeis.hasBody(req)) {
      debug('skip empty body')
      next()
      return
    }

    debug('content-type %j', req.headers['content-type'])

    // determine if request should be parsed
    if (!shouldParse(req)) {
      debug('skip parsing')
      next()
      return
    }

    // get charset
    var charset = getCharset(req) || defaultCharset

    // read
    read(req, res, next, parse, debug, {
      encoding: charset,
      inflate: inflate,
      limit: limit,
      verify: verify
    })
  }
}
720448
static function radio($name, $option, $default = null, $self = false, $attrArray = null, $label_class = '')
	{
		$htmlStr = "";
	    $attrStr = self::input_attr($attrArray);

		foreach($option as $key => $value)
		{
			if($self) $key=$value;
			if ($key == $default)
			{
				$htmlStr .= "<label class='$label_class'><input type=\"radio\" name=\"$name\" id=\"{$name}_{$key}\" value=\"$key\" checked=\"checked\" {$attrStr} />".$value."</label>";
			}
			else
			{
				$htmlStr .= "<label class='$label_class'><input type=\"radio\" name=\"$name\" id=\"{$name}_{$key}\" value=\"$key\"  {$attrStr} />&nbsp;".$value."</label>";
			}
		}
		return $htmlStr;
	}
733162
public function select($options=array()) {
        $pk   =  $this->getPk();
        if(is_string($options) || is_numeric($options)) {
            // 根据主键查询
            if(strpos($options,',')) {
                $where[$pk]     =  array('IN',$options);
            }else{
                $where[$pk]     =  $options;
            }
            $options            =  array();
            $options['where']   =  $where;
        }elseif (is_array($options) && (count($options) > 0) && is_array($pk)) {
            // 根据复合主键查询
            $count = 0;
            foreach (array_keys($options) as $key) {
                if (is_int($key)) $count++; 
            } 
            if ($count == count($pk)) {
                $i = 0;
                foreach ($pk as $field) {
                    $where[$field] = $options[$i];
                    unset($options[$i++]);
                }
                $options['where']  =  $where;
            } else {
                return false;
            }
        } elseif(false === $options){ // 用于子查询 不查询只返回SQL
            $options            =  array();
            // 分析表达式
            $options            =  $this->_parseOptions($options);
            return  '( '.$this->fetchSql(true)->select($options).' )';
        }
        // 分析表达式
        $options    =  $this->_parseOptions($options);
        // 判断查询缓存
        if(isset($options['cache'])){
            $cache  =   $options['cache'];
            $key    =   is_string($cache['key'])?$cache['key']:md5(serialize($options));
            $data   =   S($key,'',$cache);
            if(false !== $data){
                return $data;
            }
        }        
        $resultSet  = $this->db->select($options);
        if(false === $resultSet) {
            return false;
        }
        if(empty($resultSet)) { // 查询结果为空
            return null;
        }

        if(is_string($resultSet)){
            return $resultSet;
        }

        $resultSet  =   array_map(array($this,'_read_data'),$resultSet);
        $this->_after_select($resultSet,$options);
        if(isset($options['index'])){ // 对数据集进行索引
            $index  =   explode(',',$options['index']);
            foreach ($resultSet as $result){
                $_key   =  $result[$index[0]];
                if(isset($index[1]) && isset($result[$index[1]])){
                    $cols[$_key] =  $result[$index[1]];
                }else{
                    $cols[$_key] =  $result;
                }
            }
            $resultSet  =   $cols;
        }
        if(isset($cache)){
            S($key,$resultSet,$cache);
        }
        return $resultSet;
    }
809731
function(options) {
      if (!_.isString(options.method)) {
        throw new Error('"method" must be a string, got ' + options.method);
      } else if (!_.isString(options.url)) {
        throw new Error('"url" must be a string, got ' + options.url);
      }

      return options;
    }
30936
function (options) {
        _.isString(options) && (options = { mode: 'raw', raw: options });
        if (!options.mode) { return; } // need a valid mode @todo raise error?

        var mode = RequestBody.MODES[options.mode.toString().toLowerCase()] || RequestBody.MODES.raw,
            urlencoded = options.urlencoded,
            formdata = options.formdata,
            graphql = options.graphql,
            file = options.file,
            raw = options.raw;

        // Handle URL Encoded data
        if (options.urlencoded) {
            _.isString(options.urlencoded) && (urlencoded = QueryParam.parse(options.urlencoded));
            // @todo: The fallback in the ternary expression will never be hit, as urlencoded points to
            // @todo: options.urlencoded
            urlencoded = urlencoded ? new PropertyList(QueryParam, this, urlencoded) :
                new PropertyList(QueryParam, this, []);
        }

        // Handle Form data
        if (options.formdata) {
            // @todo: The fallback in the ternary expression will never be hit, as formdata points to
            // @todo: options.formdata
            formdata = formdata ? new PropertyList(FormParam, this, options.formdata) :
                new PropertyList(FormParam, this, []);
        }

        // Handle GraphQL data
        if (options.graphql) {
            graphql = {
                query: graphql.query,
                operationName: graphql.operationName,
                variables: graphql.variables
            };
        }

        _.isString(options.file) && (file = { src: file });

        // If mode is raw but options does not give raw content, set it to empty string
        (mode === RequestBody.MODES.raw && !raw) && (raw = '');

        // If mode is urlencoded but options does not provide any content, set it to an empty property list
        (mode === RequestBody.MODES.urlencoded && !urlencoded) && (urlencoded = new PropertyList(QueryParam, this, []));

        // If mode is formdata but options does not provide any content, set it to an empty property list
        (mode === RequestBody.MODES.formdata && !formdata) && (formdata = new PropertyList(FormParam, this, []));

        // If mode is graphql but options does not provide any content, set empty query
        (mode === RequestBody.MODES.graphql && !graphql) && (graphql = {});

        _.assign(this, /** @lends RequestBody.prototype */ {

            /**
             * Indicates the type of request data to use.
             *
             * @type {String}
             */
            mode: mode,

            /**
             * If the request has raw body data associated with it, the data is held in this field.
             *
             * @type {String}
             */
            raw: raw,

            /**
             * Any URL encoded body params go here.
             *
             * @type {PropertyList<QueryParam>}
             */
            urlencoded: urlencoded,

            /**
             * Form data parameters for this request are held in this field.
             *
             * @type {PropertyList<FormParam>}
             */
            formdata: formdata,

            /**
             * Holds a reference to a file which should be read as the RequestBody. It can be a file path (when used
             * with Node) or a unique ID (when used with the browser).
             *
             * @note The reference stored here should be resolved by a resolver function (which should be provided to
             * the Postman Runtime).
             */
            file: file,

            /**
             * If the request has raw graphql data associated with it, the data is held in this field.
             *
             * @type {Object}
             */
            graphql: graphql,

            /**
             * Indicates whether to include body in request or not.
             *
             * @type {Boolean}
             */
            disabled: options.disabled
        });
    }
98897
static function formatOptions( $options, $default = false ) {
		$data = '';

		foreach( $options as $label => $value ){
			if( is_array( $value ) ) {
				$contents = self::formatOptions( $value, $default );
				$data .= self::tags( 'optgroup', array( 'label' => $label ), $contents ) . "\n";
			} else {
				$data .= self::option( $label, $value, $value === $default ) . "\n";
			}
		}

		return $data;
	}
41120
function parseOptions(options) {
    if (options.path.indexOf(HOST) !== -1) {
      // Get complete URL
      return getData(options.path);
    } else if (typeof options.value === 'undefined') {
      // Get all results
      return getAll(HOST + options.path + '/');
    } else if (typeof options.value === 'string') {
      // Get search results (paged or all)
      if (options.format === 'paged') {
        return getData(HOST + options.path + '/?search=' + options.value);
      } else {
        return getAll(HOST + options.path + '/?search=' + options.value);
      }
    } else {
      // Get results by ID (paged or single)
      if (options.format === 'paged') {
        return getData(HOST + options.path + '/?page=' + options.value);
      } else {
        return getData(HOST + options.path + '/' + options.value);
      }
    }
  }
97559
protected function checkOption($option)
    {
        // 请求类型检测
        if (!empty($option['method'])) {
            if (is_string($option['method']) && false === stripos($option['method'], Request::getMethod())) {
                return false;
            }
        }

        // AJAX PJAX 请求检查
        foreach (['ajax', 'pjax', 'mobile'] as $item) {
            if (isset($option[$item])) {
                $call = 'is' . $item;
                if ($option[$item] && !$request->$call() || !$option[$item] && $request->$call()) {
                    return false;
                }
            }
        }

        // 伪静态后缀检测
        if (Request::getRequestUri() != '/' && ((isset($option['ext']) && false === stripos('|' . $option['ext'] . '|', '|' . Request::ext() . '|'))
                || (isset($option['deny_ext']) && false !== stripos('|' . $option['deny_ext'] . '|', '|' . Request::ext() . '|')))) {
            return false;
        }

        // 域名检查
        if ((isset($option['domain']) && !in_array($option['domain'], [$request->host(true), $request->subDomain()]))) {
            return false;
        }

        // HTTPS检查
        if ((isset($option['https']) && $option['https'] && !$request->isSsl())
            || (isset($option['https']) && !$option['https'] && $request->isSsl())) {
            return false;
        }

        // 请求参数检查
        if (isset($option['filter'])) {
            foreach ($option['filter'] as $name => $value) {
                if ($request->param($name, '', null) != $value) {
                    return false;
                }
            }
        }
        return true;
    }
43336
function parseNpmOption (option) {
  if (!option || typeof option !== 'string') {
    return option
  }

  const parsedOption = option.replace(/([A-Z])/g, (match, p) => {
    return `-${p.toLowerCase()}`
  })

  return `--${parsedOption}`
}
1104106
private function _parseOptions($options=null)
    {
        if (!$options) return [];
        
        // 如果配置为多组式配置，取出其中一组
        $item = current($options);
        if (!isset($options['adapter']) && is_array($item) && isset($item['username'])) {
            $item = ArrayHelper::getItemArray($options);
            $options = array_values($item)[0];
        }
        
        // first check if dsn
        if (isset($options['dsn'])) {
            $options = static::parseDsn($options['dsn']);
        }
        
        // type is alias of adapter
        if (isset($options['type'])) {
            $options['adapter'] = $options['type'];
        }
        if (isset($options['adapter'])) {
            $options['adapter'] = preg_replace('/[^A-Z0-9_\.-]/i', '', $options['adapter']);
            $options['adapter'] = StringHelper::toCamelCase($options['adapter']);
            if ($options['adapter'] == 'Mysqli') {
                $options['adapter'] = 'Mysql';
            }
        }
        
        // dbname is alias of database
        if (isset($options['dbname'])) {
            $options['database'] = $options['dbname'];
            unset($options['dbname']);
        }
        
        // check database
        if (isset($options['database'])) {
            $options['database'] = preg_replace('/[^A-Z0-9_\.-]/i', '', $options['database']);
        }
        
        return $options;
    }
1049124
function(context, options) {
    if (!context) return '';
    var types_raw = context.split('|');
    var types_linked = options.fn(this).split('|');

    return types_raw.map(function(type, i) {
      if (/\[\]/.test(type)) {
        if (/<\/a>/.test(types_linked[i])) {
          return types_linked[i].replace('</a>', '[]</a>');
        } else {
          return types_linked[i].trim() + '[]';
        }
      } else {
        return types_linked[i];
      }
    }).join(' | ');
  }
421933
function parseOptions(type, options) {
    const ret = {
        indentChar: " ",
        indentSize: 2,
        attribute: 1,
        closeBracket: 0,
    }

    if (Number.isSafeInteger(type)) {
        ret.indentSize = type
    } else if (type === "tab") {
        ret.indentChar = "\t"
        ret.indentSize = 1
    }
    if (Number.isSafeInteger(options.attribute)) {
        ret.attribute = options.attribute
    }
    if (Number.isSafeInteger(options.closeBracket)) {
        ret.closeBracket = options.closeBracket
    }

    return ret
}
729353
function XSSFilter(options) {
    // 初始化配置
    this.config = {
        // 是否匹配 style 标签
        matchStyleTag: true,

        // 是否匹配 script 标签
        matchScriptTag: true,

        // 是否要删除匹配到的标签，如果设置为 false，则对标签进行转义
        removeMatchedTag: true,

        // 是否对整个字符串进行转义，默认不转义
        escape: false,

        // 标签属性黑名单列表，在这个列表中的属性将被清除
        blackListAttrs: {
            onclick: true,
            ondblclick: true,
            onchange: true,
            onblur: true,
            onfocus: true,
            onkeydown: true,
            onkeypress: true,
            onkeyup: true,
            onmousedown: true,
            onmousemove: true,
            onmouseover: true,
            onmouseout: true,
            onmouseup: true,
            onselect: true,
            onsubmit: true,
            onreset: true,
            onload: true,
            onabort: true,
            onerror: true
        }
    };

    // 实例化时扩展初始化配置
    if (utils.isObject(options)) {
        utils.extend(this.config, options);
    }
}