PFinal\Wechat\Kernel::getConfig PHP Method

getConfig() public static method

public static getConfig ( $name, $defaultValue = null )
    public static function getConfig($name, $defaultValue = null)
    {
        if (array_key_exists($name, static::$config)) {
            return static::$config[$name];
        }
        return $defaultValue;
    }

Usage Example

Exemplo 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);
     }
 }
All Usage Examples Of PFinal\Wechat\Kernel::getConfig