检查配置信息是否完整

@return bool
546404
final public function checkInfo()
    {
        $info_check_keys = ['name', 'title', 'description', 'status', 'author', 'version'];
        foreach ($info_check_keys as $value) {
            if (! array_key_exists($value, $this->info)) {
                return false;
            }
        }

        return true;
    }
1102666
public function errorInfo(){
        if ($this->getConnection() instanceof PDO) {
            $message = isset($this->connection->errorInfo()['message']) ? $this->getConnection()->errorInfo()['message'] : 'Something Went Wrong!';
        } elseif ($this->getConnection() instanceof mysqli) {
            $message = $this->getConnection()->error;
        }

        return $message;
    }
324193
public function isValid()
    {
        return $this->getID() != null && $this->getURL() != null && $this->getLocalPath() != null;
    }
1007287
public function current() {
		if (!$this->_started) {
			$this->rewind();
		}
		if (!$this->_valid) {
			return false;
		}
		return current($this->_data);
	}
1094033
public function valid()
    {
        if (!parent::valid()) {
            return false;
        }

        $current = $this->current();
        $key = $this->key();
        $condition = $this->_condition;

        return !$condition($current, $key, $this->_innerIterator);
    }
1260614
public function getUserInfo()
    {
        if (!isset($this->userInfo) || empty($this->userInfo)) {
            $this->userInfo = $this->makeRequest('GET', 'userInfo');
        }

        return $this->userInfo;
    }
595055
public function isValid()
	{
		if ($this->isEmpty()) {
			return false;
		}
		$requiresHost = ! $this->port->isEmpty() || ! $this->credentials->isEmpty() || $this->scheme->equals('http') || $this->scheme->equals('https');
		if ($requiresHost && $this->host->isEmpty()) {
			return false;
		}
		$requiresPath = (! $this->query->isEmpty() || ! $this->fragment->isEmpty()) && (! $this->scheme->isEmpty() || ! $this->host->isEmpty() || ! $this->port->isEmpty() || ! $this->credentials->isEmpty());
		if ($requiresPath && $this->path->isEmpty()) {
			return false;
		}
		return true;
	}
804470
public function is()
    {
        $patterns = func_get_args();

        $name = $this->currentRouteName();

        foreach ($patterns as $pattern) {
            if (Str::is($pattern, $this->currentRouteName())) {
                return true;
            }
        }

        return false;
    }
1085664
public function valid()
    {
        if (key($this->_data) === null) {
            return false;
        }

        $current = current($this->_data);
        while (!$current->value()) {
            $current = $this->next();
            if (key($this->_data) === null) {
                return false;
            }
        }
        return true;
    }
192857
public function hasData()
    {
        if ( count( $this->files ) >= 1 )
        {
            if ( $this->files[0] === 'php://stdin' || filesize( $this->files[0] ) > 0 )
            {
                return true;
            }
        }
        return false;
    }
1150907
public function info()
    {
        $resp=$this->_transport->send(HttpRequest::GET, $this->_baseURL);
        $ret = array();
        $ret["hub"] = $this->_hub;
        $ret["key"] = $this->_key;
        $ret["disabledTill"] = $resp["disabledTill"];
        $ret["converts"] = $resp["converts"];
        return $ret;
    }
525263
public function getPhpInfo()
    {
        ob_start();
        phpinfo();
        $pinfo = ob_get_contents();
        ob_end_clean();
        $phpinfo = preg_replace('%^.*<body>(.*)</body>.*$%ms', '$1', $pinfo);
        $phpinfo = str_replace('<table',
            '<div class="table-responsive"><table class="table table-condensed table-bordered table-striped table-hover config-php-info-table" ',
            $phpinfo);
        $phpinfo = str_replace('</table>', '</table></div>', $phpinfo);
        $phpinfo = str_replace('<div class="center">', '<div class="phpinfo">', $phpinfo);
        return $phpinfo;
    }
904688
public function hasPersonalInfo()
    {
        if ($this->getDescription()
            || $this->getFacebook()
            || $this->getTwitter()
            || $this->getEmail()
            || $this->getWebsiteurl()
        ) {
            return true;
        }
        return false;
    }
361420
public function check()
	{
		// Is data valid?
		if (!$this->_tbl->check())
		{
			$this->_errors = $this->_tbl->getErrors();
			return false;
		}
		return true;
	}
1300678
protected function getOAuthCode()
    {
        // 1. 如果请求不带code,不再处理
        if (!isset($this->request['code']) || !isset($this->request['state'])) {
            return false;
        }

        // 2. 检查是否为认证服务号
        $account = wei()->wechatAccount->getCurrentAccount();
        if (!$account->isVerifiedService()) {
            $this->logger->info('Got OAuth code, but wechat account is not verified service');

            return false;
        }

        // 3. 如果code已经处理过,不再处理
        if (!wei()->cache->add('wechatOAuth2Code' . $this->request['code'], true, 86400 * 3)) {
            return false;
        }

        return $this->request['code'];
    }
494090
public function save()
    {
        if ($this->validate()) {
            $manager = Configs::authManager();
            if ($this->_item === null) {
                if ($this->type == Item::TYPE_ROLE) {
                    $this->_item = $manager->createRole($this->name);
                } else {
                    $this->_item = $manager->createPermission($this->name);
                }
                $isNew = true;
            } else {
                $isNew = false;
                $oldName = $this->_item->name;
            }
            $this->_item->name = $this->name;
            $this->_item->description = $this->description;
            $this->_item->ruleName = $this->ruleName;
            $this->_item->data = $this->data === null || $this->data === '' ? null : Json::decode($this->data);
            if ($isNew) {
                $manager->add($this->_item);
            } else {
                $manager->update($oldName, $this->_item);
            }
            Helper::invalidate();
            return true;
        } else {
            return false;
        }
    }
824625
public function getinfo()
    {
        error_reporting(0);    //会有多处报错，因此这里进行屏蔽
        switch (PHP_OS) {// 根据不同系统取得CPU相关信息
            case "Linux":
                $sysInfo = self::sys_linux();
                break;
            case "FreeBSD":
                $sysInfo = self::sys_freebsd();
                break;
            default:
                $sysInfo = [];
                break;
        }
        $result = $sysInfo;
        $result['freeSpace'] = round(@disk_free_space(".") / (1024 * 1024 * 1024), 3);
        $result['diskTotal'] = round(@disk_total_space(".") / (1024 * 1024 * 1024), 3);    //总空间
        //网卡流量
        $strs = @file("/proc/net/dev");
        $NetOut = array();
        for ($i = 2; $i < count($strs); $i++) {
            preg_match_all("/([^\s]+):[\s]{0,}(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)/", $strs[$i], $info);
            /*	$NetInput[$i] = formatsize($info[2][0]);
                $NetOut[$i]  = formatsize($info[10][0]);
            */
            $tmo = round($info[2][0] / 1024 / 1024, 5);
            $tmo2 = round($tmo / 1024, 5);
            $NetInput[$i] = $tmo2;
            $tmp = round($info[10][0] / 1024 / 1024, 5);
            $tmp2 = round($tmp / 1024, 5);
            $NetOut[$i] = $tmp2;
        }
        //判断内存如果小于1GB，就显示M，否则显示GB单位
        if ($sysInfo['memTotal'] < 1024) {
            $result['TotalMemory'] = $sysInfo['memTotal'] . " MB";
            $result['UsedMemory'] = $sysInfo['memUsed'] . " MB";
            $result['FreeMemory'] = $sysInfo['memFree'] . " MB";
            $result['CachedMemory'] = $sysInfo['memCached'] . " MB";    //cache化内存
            $result['Buffers'] = $sysInfo['memBuffers'] . " MB";    //缓冲
            $result['TotalSwap'] = $sysInfo['swapTotal'] . " MB";
            $result['swapUsed'] = $sysInfo['swapUsed'] . " MB";
            $result['swapFree'] = $sysInfo['swapFree'] . " MB";
            $result['swapPercent'] = $sysInfo['swapPercent'];
            $result['memRealUsed'] = $sysInfo['memRealUsed'] . " MB"; //真实内存使用
            $result['memRealFree'] = $sysInfo['memRealFree'] . " MB"; //真实内存空闲
            $result['memRealPercent'] = $sysInfo['memRealPercent']; //真实内存使用比率
            $result['memPercent'] = $sysInfo['memPercent'] . '%'; //内存总使用率
            $result['memCachedPercent'] = $sysInfo['memCachedPercent']; //cache内存使用率
        } else {
            $result['TotalMemory'] = round($sysInfo['memTotal'] / 1024, 3) . " GB";
            $result['UsedMemory'] = round($sysInfo['memUsed'] / 1024, 3) . " GB";
            $result['FreeMemory'] = round($sysInfo['memFree'] / 1024, 3) . " GB";
            $result['CachedMemory'] = round($sysInfo['memCached'] / 1024, 3) . " GB";
            $result['Buffers'] = round($sysInfo['memBuffers'] / 1024, 3) . " GB";
            $result['TotalSwap'] = round($sysInfo['swapTotal'] / 1024, 3) . " GB";
            $result['swapUsed'] = round($sysInfo['swapUsed'] / 1024, 3) . " GB";
            $result['swapFree'] = round($sysInfo['swapFree'] / 1024, 3) . " GB";
            $result['swapPercent'] = $sysInfo['swapPercent'];
            $result['memRealUsed'] = round($sysInfo['memRealUsed'] / 1024, 3) . " GB"; //真实内存使用
            $result['memRealFree'] = round($sysInfo['memRealFree'] / 1024, 3) . " GB"; //真实内存空闲
            $result['memRealPercent'] = $sysInfo['memRealPercent']; //真实内存使用比率
            $result['memPercent'] = $sysInfo['memPercent'] . '%'; //内存总使用率
            $result['memCachedPercent'] = $sysInfo['memCachedPercent']; //cache内存使用率
        }
        $result['barmemCachedPercent'] = $result['memCachedPercent'] . '%';
        $result['barswapPercent'] = $result['swapPercent'] . '%';
        $result['barmemRealPercent'] = $result['memRealPercent'] . '%';
        $result['NetOut2'] = $NetOut[2];
        $result['NetOut3'] = $NetOut[3];
        $result['NetOut4'] = $NetOut[4];
        $result['NetOut5'] = $NetOut[5];
        $result['NetOut6'] = $NetOut[6];
        $result['NetOut7'] = $NetOut[7];
        $result['NetOut8'] = $NetOut[8];
        $result['NetOut9'] = $NetOut[9];
        $result['NetOut10'] = $NetOut[10];
        $result['NetInput2'] = $NetInput[2];
        $result['NetInput3'] = $NetInput[3];
        $result['NetInput4'] = $NetInput[4];
        $result['NetInput5'] = $NetInput[5];
        $result['NetInput6'] = $NetInput[6];
        $result['NetInput7'] = $NetInput[7];
        $result['NetInput8'] = $NetInput[8];
        $result['NetInput9'] = $NetInput[9];
        $result['NetInput10'] = $NetInput[10];

        return $result;
    }