public function __construct()
 {
     // Initialize Dropbox Application configuration
     $this->appInfo = Dropbox\AppInfo::loadFromJson(['key' => Config::get('dropbox.key'), 'secret' => Config::get('dropbox.secret')]);
     if (Config::has('queue.postfix')) {
         $this->sync_queue_id .= '.' . Config::get('queue.postfix');
         $this->file_queue_id .= '.' . Config::get('queue.postfix');
     }
 }
 public function __construct()
 {
     // Initialize Dropbox Application configuration
     $this->appInfo = Dropbox\AppInfo::loadFromJson(['key' => Config::get('dropbox.key'), 'secret' => Config::get('dropbox.secret')]);
     $this->csrfStore = new DbxCSRFSessionStore();
     if (Input::has('state')) {
         $this->csrfStore->set(Input::get('state'));
     }
     if (Config::has('queue.postfix')) {
         $this->sync_queue_id .= '.' . Config::get('queue.postfix');
         $this->file_queue_id .= '.' . Config::get('queue.postfix');
     }
 }
コード例 #3
0
ファイル: Main.php プロジェクト: kokkez/shineisp
 /**
  * Constructor of the class
  *
  * @param $email string       	
  * @param $password string|null       	
  * @throws Exception
  */
 public function __construct()
 {
     // Check requirements
     if (!extension_loaded('curl')) {
         Shineisp_Commons_Utilities::log("Dropbox module: Dropbox requires the cURL extension.");
         throw new Exception('Dropbox requires the cURL extension.');
     }
     $key = Settings::findbyParam('dropbox_key');
     $secret = Settings::findbyParam('dropbox_secret');
     if (!empty($key) && !empty($secret)) {
         self::$appInfo = Dropbox\AppInfo::loadFromJson(array("key" => $key, "secret" => $secret));
         $clientIdentifier = "shineisp/1.0";
         self::$webAuth = new Dropbox\WebAuthNoRedirect(self::$appInfo, $clientIdentifier);
     }
 }
コード例 #4
0
ファイル: autoload.php プロジェクト: themexpand/xpand-buddy
function Dropbox_WebAuthNoRedirect($_key, $_secret)
{
    $appInfo = Dropbox\AppInfo::loadFromJson(array("key" => $_key, "secret" => $_secret));
    return new Dropbox\WebAuthNoRedirect($appInfo, "PHP-Example/1.0");
}