XeroPHP\Application::__construct PHP Method

__construct() public method

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);
 }