Exemplo n.º 1
0
 /**
  * Constructor
  *
  * @param array $options
  */
 public function __construct($options)
 {
     if (!is_array($options)) {
         throw new Exception\InvalidArgumentException(sprintf('"%s" expects an array; received "%s"', __METHOD__, is_object($options) ? get_class($options) : gettype($options)));
     }
     parent::__construct($options);
 }
Exemplo n.º 2
0
 /**
  * @param S3Client $client
  * @param array    $options
  */
 public function __construct(S3Client $client, $options = [])
 {
     parent::__construct($options);
     // We need to register the S3 stream wrapper so that we can take advantage of the base class
     $this->client = $client;
     $this->client->registerStreamWrapper();
 }
 /**
  * {@inheritdoc}
  */
 public function __construct(array $options = array())
 {
     // Change default options (e.g. test.png will become test_4b3403665fea6.png
     $options = array_merge(array('use_upload_name' => true, 'randomize' => true), $options);
     parent::__construct($options);
 }