예제 #1
0
 /**
  * {@inheritdoc}
  */
 public function __construct(FilesInterface $files, array $options)
 {
     parent::__construct($files, $options);
     if (!extension_loaded('ftp')) {
         throw new ServerException("Unable to initialize ftp storage server, extension 'ftp' not found.");
     }
     $this->connect();
 }
예제 #2
0
 /**
  * {@inheritdoc}
  */
 public function __construct(FilesInterface $files, array $options)
 {
     parent::__construct($files, $options);
     if (!extension_loaded('ssh2')) {
         throw new ServerException("Unable to initialize sftp storage server, extension 'ssh2' not found.");
     }
     //Let's automatically connect!
     $this->connect();
 }
예제 #3
0
 /**
  * @param FilesInterface $files
  * @param StoreInterface $store
  * @param array          $options
  */
 public function __construct(FilesInterface $files, StoreInterface $store, array $options)
 {
     parent::__construct($files, $options);
     $this->store = $store;
     if ($this->options['cache']) {
         $this->authToken = $this->store->get($this->options['username'] . '@rackspace-token');
         $this->regions = (array) $this->store->get($this->options['username'] . '@rackspace-regions');
     }
     //This code is going to use additional abstraction layer to connect storage and guzzle
     $this->client = new Client($this->options);
     $this->connect();
 }
예제 #4
0
 /**
  * {@inheritdoc}
  */
 public function __construct(FilesInterface $files, array $options)
 {
     parent::__construct($files, $options);
     //This code is going to use additional abstraction layer to connect storage and guzzle
     $this->client = new Client($this->options);
 }
예제 #5
0
 /**
  * @param FilesInterface $files
  * @param ODM            $odm
  * @param array          $options
  */
 public function __construct(FilesInterface $files, ODM $odm, array $options)
 {
     parent::__construct($files, $options);
     $this->database = $odm->database($this->options['database']);
 }