Exemplo n.º 1
0
 /**
  * Build the app
  * @param AbstractStorage $storage
  * @param string $clientId
  * @param string $clientSecret
  */
 private function __construct(AbstractStorage $storage, $clientId, $clientSecret)
 {
     $this->storage = $storage;
     $this->_clientId = $clientId;
     $this->_clientSecret = $clientSecret;
     if (class_exists(Whoops::class)) {
         ErrorHandler::register();
     }
     //Set the accessToken from the cache if it is available
     if ($this->storage->get('token') !== false) {
         $this->_accessToken = $this->storage->get('token');
     }
 }