Ejemplo n.º 1
0
 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';
 }
Ejemplo n.º 2
0
<?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']];
Ejemplo n.º 3
0
 private static function getNodes()
 {
     $config = Config::get('database');
     return isset($config['nodes']) ? $config['nodes'] : array();
 }