public function __construct() { $httpConfig = Config::get('http'); if (!$httpConfig) { $httpConfig = []; } self::$timeout = isset($httpConfig['timeout']) ? abs(intval($httpConfig['timeout'])) : 10; if (self::$timeout < 1) { self::$timeout = 10; } self::$engine = isset($httpConfig['engine']) ? trim($httpConfig['engine']) : 'curl'; }
<?php \Quick\Core\Config::load(CONF_PATH . DS . 'routers.php'); \Quick\Core\Config::load(CONF_PATH . DS . 'cache.php'); \Quick\Core\Config::load(CONF_PATH . DS . 'database.php'); return ['logger' => ['level' => \Quick\Core\Logger::DEBUG, 'prefix' => 'near_openapi_service'], 'timezone' => 'Asia/Shanghai', 'charset' => 'UTF-8', 'session_enable' => FALSE, 'env_dev' => FALSE, 'serialize' => 'json', 'http' => ['timeout' => 10, 'engine' => 'curl']];
private static function getNodes() { $config = Config::get('database'); return isset($config['nodes']) ? $config['nodes'] : array(); }