Пример #1
0
 public function getRoot()
 {
     if ($this->iss) {
         $this->driver = 'FTPIIS';
     }
     $options = parent::getRoot();
     $options['host'] = $this->host;
     $options['port'] = $this->port;
     $options['user'] = $this->user;
     $options['pass'] = $this->pass;
     $options['mode'] = $this->mode;
     $options['path'] = $this->getRealPath();
     $options['URL'] = $this->getUrl();
     return $options;
 }
Пример #2
0
 public function getRoot()
 {
     $options = parent::getRoot();
     $options['separator'] = '/';
     $options['s3'] = ['key' => $this->accessKey, 'secret' => $this->secretKey, 'region' => $this->region, 'scheme' => 'http', 'ssl.certificate_authority' => false];
     $options['bucket'] = $this->bucket;
     if (empty($this->path)) {
         $options['path'] = './';
         $options['URL'] = 'http://' . $this->bucket . '.s3-website-' . $this->region . '.amazonaws.com/';
     } else {
         $this->path = trim($this->path, '/');
         $options['path'] = $this->path;
         $options['URL'] = 'http://' . $this->bucket . '.s3-website-' . $this->region . '.amazonaws.com/' . $this->path;
     }
     $options['acl'] = 'public';
     if ($options['defaults']['read']) {
         $options['acl'] .= '-read';
     }
     if ($options['defaults']['write']) {
         $options['acl'] .= '-write';
     }
     return $options;
 }