protected function checkLogin() { if (!$this->_uploadImported) { $setting = Yii::app()->params["accounts"]["rackspace"]; require_once "OpenCloud/vendor/autoload.php"; $client = new OpenCloud\Rackspace(OpenCloud\Rackspace::US_IDENTITY_ENDPOINT, array('username' => $setting["username"], 'apiKey' => $setting["apiKey"])); $ostore = $client->ObjectStoreService('cloudFiles', $setting["container_region"]); // now, connect to the ObjectStore service $this->cloudContainer = $ostore->getContainer($setting["container"]); $this->_uploadImported = true; } }