构建DNS字符串
@param array $option
@return string
15619
public function buildDSN($option = null)
	{
		if(null === $option)
		{
			$option = $this->option;
		}
		if(isset($option['dsn']))
		{
			return $option['dsn'];
		}
		$charset = (isset($option['charset']) ? $option['charset'] : 'utf8');
		// php<5.3.6的版本不认charset的处理
		if(-1 === version_compare(PHP_VERSION, '5.3.6'))
		{
			$this->option['options'][PDO::MYSQL_ATTR_INIT_COMMAND] = 'SET NAMES ' . $charset;
		}
		return 'mysql:'
				 . 'host=' . (isset($option['host']) ? $option['host'] : '127.0.0.1')
				 . ';port=' . (isset($option['port']) ? $option['port'] : '3306')
				 . ';dbname=' . (isset($option['dbname']) ? $option['dbname'] : '')
				 . ';unix_socket=' . (isset($option['unix_socket']) ? $option['unix_socket'] : '')
				 . ';charset=' . $charset
				 ;
	}
647282
public static function config($option = null)
    {
        if (is_array($option)) {
            self::$config = new DataArray($option);
        }
        if (self::$config instanceof DataArray) {
            return self::$config->get();
        }
        return [];
    }
1171126
public function getOption($option)
    {
        $this->_setErrorHandler();
        ldap_get_option($this->getConnection(), $option, $returnValue);
        $this->_unsetErrorHandler();

        return $returnValue;
    }
4971
public function getDnsName(): string
    {
        $host = $this->environment["HTTP_HOST"] ?? "";
        $port = strpos($host, ":");
        if ($port !== false) {
            return substr($host, 0, $port);
        }
        return $host;
    }
311769
public static function getVersion (string $option = 'FULL') : string
    {
        if ($option === 'MAJOR') :
            $version = explode('.', self::VERSION);
            return $version[0].'.'.$version[1];
        else :
            return self::VERSION;
        endif;
    }
932400
public function ddns($domain,$ip='',$lineId = 1)
    {
        $arr = array(
            'domain' => $domain,
            'ip' => $ip,
            'line_id' => $lineId
        );
        //设置参数体
        $this->setData(json_encode($arr));
        //设置请求的方法
        $this->setMethod('POST');
        //初始化参数
        $this->initParam();
        //获取返回值
        return $this->response();
    }
1021137
public function getName(array $options = array())
    {
        $result = "";
        foreach ($this->getUnitedTypes() as $type)
        {
            if ($result !== "")
                $result .= "|";
            $result .= $type->getName();
        }
        return $result;
    }
992293
public function domain($name, $rule = '', $option = [], $pattern = [])
    {
        // 支持多个域名使用相同路由规则
        $domainName = is_array($name) ? array_shift($name) : $name;

        if ('*' != $domainName && false === strpos($domainName, '.')) {
            $domainName .= '.' . $this->request->rootDomain();
        }

        if (!isset($this->domains[$domainName])) {
            $domain = (new Domain($this, $domainName, $rule, $option, $pattern))
                ->lazy($this->lazy)
                ->mergeRuleRegex($this->mergeRuleRegex);

            $this->domains[$domainName] = $domain;
        } else {
            $domain = $this->domains[$domainName];
            $domain->parseGroupRule($rule);
        }

        if (is_array($name) && !empty($name)) {
            $root = $this->request->rootDomain();
            foreach ($name as $item) {
                if (false === strpos($item, '.')) {
                    $item .= '.' . $root;
                }

                $this->domains[$item] = $domainName;
            }
        }

        // 返回域名对象
        return $domain;
    }
47905
public function getOption($option)
    {
        switch ($option) {
            case FTPClient::TIMEOUT_SEC:
            case FTPClient::AUTOSEEK:
                $result = @ftp_get_option($this->connection, $option);

                return $result;
                break;
            
            default:
                throw new Exception('Unsupported option');
                break;
        }
    }
584252
public static function curlGet($url = '', $options = array())
    {
        $ch = curl_init($url);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($ch, CURLOPT_TIMEOUT, 30);
        if (!empty($options)) {
            curl_setopt_array($ch, $options);
        }
        //https请求 不验证证书和host
        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
        curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
        $data = curl_exec($ch);
        curl_close($ch);
        return $data;
    }
1080237
protected function autoValidate($option)
    {
        list($validate, $scene, $message, $batch) = $option;

        if (is_array($validate)) {
            // 指定验证规则
            $v = $this->app->validate();
            $v->rule($validate);
        } else {
            // 调用验证器
            $v = $this->app->validate($validate);
            if (!empty($scene)) {
                $v->scene($scene);
            }
        }

        if (!empty($message)) {
            $v->message($message);
        }

        // 批量验证
        if ($batch) {
            $v->batch(true);
        }

        if (!$v->check($this->request->param())) {
            throw new ValidateException($v->getError());
        }
    }
174416
private static function getPostfix(Option $Option) {
        $postfix = '';
        if ($Option->getType() == Option::TYPE_STRING) {
            $postfix .= ':';
            if (!$Option->isRequired()) {
                $postfix .= ':';
            }
        }
        return $postfix;
    }
789165
public function getOption($name = null, $option = null)
    {
        if (is_null($name)) {
            return $this->_option;
        } else {
            $option || $option = $this->getOption();
            if (strpos($name, '.') !== false) {
                list ($key, $name) = explode('.', $name, 2);
                return isset($option[$key]) && is_array($option[$key]) ? $this->getOption($name, $option[$key]) : null;
            } else {
                return isset($option[$name]) ? $option[$name] : null;
            }
        }
    }
612112
private function getOption($option, array $options)
    {
        return isset($options[$option]) ? $options[$option] : $this->$option;
    }
468691
public function getOption($option)
    {
        return isset($this->getOptions()[$option]) ? $this->getOptions()[$option] : null;
    }
544559
public function getInfo($option = 0)
    {
        if (0 === $option) {
            return curl_getinfo($this->curl);
        }

        return curl_getinfo($this->curl, $option);
    }
91924
public function getCurrentUrl(array $options)
    {
        $url = Environment::get('url');

        if (isset($options['skipParams']) && $options['skipParams']) {
            $url .= parse_url(Environment::get('uri'), PHP_URL_PATH);
        } else {
            $url .= Environment::get('requestUri');
        }

        return $url;
    }