Constructor.
public __construct ( array $config = [] ) : void | ||
$config | array | Available configuration options are: - `'request'` _object|null_: Either a request object or `null`. - `'response'` _array_: Options for constructing the response object. - `'render'` _array_: Rendering control options. - `'classes'` _array_ |
return | void |
public function __construct($config = null) { $this->api = new ApontadorApi(); $this->location = new Location(); if (!empty($config)) { parent::__construct($config); } }
public function __construct(array $config = array()) { $this->api = new ApontadorApi(); $apiConfig = new Config(); $apiConfig->setBaseUrl(APONTADOR_URL); $apiConfig->setBasicAuth(new BasicAuth(APONTADOR_CONSUMER_KEY, APONTADOR_CONSUMER_SECRET)); $apiConfig->setRestClient(new RestClient()); $this->userRepository = new UserRepository($apiConfig); parent::__construct($config); }
public function __construct(array $config = array()) { $this->api = new ApontadorApi(); parent::__construct($config); }