XeroPHP\Application::__construct PHP 메소드

__construct() 공개 메소드

public __construct ( array $user_config )
$user_config array
    public function __construct(array $user_config)
    {
        //better here for overriding
        $this->config = array_replace_recursive(self::$_config_defaults, static::$_type_config_defaults, $user_config);
        $this->oauth_client = new Client($this->config['oauth']);
    }

Usage Example

예제 #1
0
 public function __construct($config)
 {
     //As we don't need to Authorize/RequestToken, it's populated here.
     $config['oauth']['token'] = $config['oauth']['consumer_key'];
     parent::__construct($config);
 }