getConfig() public static method

public static getConfig ( $name, $defaultValue = null )
Esempio n. 1
0
 public static function init()
 {
     if (empty(self::$cache)) {
         $config = Kernel::getConfig('cache', array('class' => 'PFinal\\Cache\\FileCache', 'keyPrefix' => 'pfinal.wechat'));
         $class = $config['class'];
         unset($config['class']);
         self::$cache = new $class($config);
     }
 }
Esempio n. 2
0
 protected static function init()
 {
     if (static::$session === null) {
         $config = Kernel::getConfig('session', array('class' => 'PFinal\\Session\\NativeSession', 'keyPrefix' => 'pfinal.wechat'));
         $class = $config['class'];
         unset($config['class']);
         static::$session = new $class($config);
     }
 }
Esempio n. 3
0
 private static function init()
 {
     if (static::$logger === null) {
         $config = Kernel::getConfig('log', array('class' => 'PFinal\\Wechat\\Support\\Logger'));
         $class = $config['class'];
         unset($config['class']);
         static::$logger = new $class($config);
     }
 }
Esempio n. 4
0
 public static function getConfig()
 {
     return array('mch_id' => Kernel::getConfig('mchId'), 'appid' => Kernel::getConfig('appId'), 'key' => Kernel::getConfig('apiSecret'));
 }