diff options
Diffstat (limited to 'apps/files_external/3rdparty/aws-sdk-php/Aws/S3')
141 files changed, 0 insertions, 13382 deletions
diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/AcpListener.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/AcpListener.php deleted file mode 100644 index 2d28407e129..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/AcpListener.php +++ /dev/null @@ -1,75 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3; - -use Aws\Common\Exception\InvalidArgumentException; -use Aws\S3\Model\Acp; -use Guzzle\Common\Event; -use Symfony\Component\EventDispatcher\EventSubscriberInterface; - -/** - * Listener used to add an Access Control Policy to a request - */ -class AcpListener implements EventSubscriberInterface -{ - /** - * {@inheritdoc} - */ - public static function getSubscribedEvents() - { - return array('command.before_prepare' => array('onCommandBeforePrepare', -255)); - } - - /** - * An event handler for constructing ACP definitions. - * - * @param Event $event The event to respond to. - * - * @throws InvalidArgumentException - */ - public function onCommandBeforePrepare(Event $event) - { - /** @var $command \Guzzle\Service\Command\AbstractCommand */ - $command = $event['command']; - $operation = $command->getOperation(); - if ($operation->hasParam('ACP') && $command->hasKey('ACP')) { - if ($acp = $command->get('ACP')) { - // Ensure that the correct object was passed - if (!($acp instanceof Acp)) { - throw new InvalidArgumentException('ACP must be an instance of Aws\S3\Model\Acp'); - } - - // Check if the user specified both an ACP and Grants - if ($command->hasKey('Grants')) { - throw new InvalidArgumentException( - 'Use either the ACP parameter or the Grants parameter. Do not use both.' - ); - } - - // Add the correct headers/body based parameters to the command - if ($operation->hasParam('Grants')) { - $command->overwriteWith($acp->toArray()); - } else { - $acp->updateCommand($command); - } - } - - // Remove the ACP parameter - $command->remove('ACP'); - } - } -} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/BucketStyleListener.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/BucketStyleListener.php deleted file mode 100644 index 6bb5bb42cd9..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/BucketStyleListener.php +++ /dev/null @@ -1,85 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3; - -use Guzzle\Common\Event; -use Symfony\Component\EventDispatcher\EventSubscriberInterface; - -/** - * Listener used to change the way in which buckets are referenced (path/virtual style) based on context - */ -class BucketStyleListener implements EventSubscriberInterface -{ - /** - * {@inheritdoc} - */ - public static function getSubscribedEvents() - { - return array('command.after_prepare' => array('onCommandAfterPrepare', -255)); - } - - /** - * Changes how buckets are referenced in the HTTP request - * - * @param Event $event Event emitted - */ - public function onCommandAfterPrepare(Event $event) - { - $command = $event['command']; - $bucket = $command['Bucket']; - $request = $command->getRequest(); - $pathStyle = false; - - if ($key = $command['Key']) { - // Modify the command Key to account for the {/Key*} explosion into an array - if (is_array($key)) { - $command['Key'] = $key = implode('/', $key); - } - } - - // Set the key and bucket on the request - $request->getParams()->set('bucket', $bucket)->set('key', $key); - - // Switch to virtual if PathStyle is disabled, or not a DNS compatible bucket name, or the scheme is - // http, or the scheme is https and there are no dots in the host header (avoids SSL issues) - if (!$command['PathStyle'] && $command->getClient()->isValidBucketName($bucket) - && !($command->getRequest()->getScheme() == 'https' && strpos($bucket, '.')) - ) { - // Switch to virtual hosted bucket - $request->setHost($bucket . '.' . $request->getHost()); - $request->setPath(preg_replace("#^/{$bucket}#", '', $request->getPath())); - } else { - $pathStyle = true; - } - - if (!$bucket) { - $request->getParams()->set('s3.resource', '/'); - } elseif ($pathStyle) { - // Path style does not need a trailing slash - $request->getParams()->set( - 's3.resource', - '/' . rawurlencode($bucket) . ($key ? ('/' . S3Client::encodeKey($key)) : '') - ); - } else { - // Bucket style needs a trailing slash - $request->getParams()->set( - 's3.resource', - '/' . rawurlencode($bucket) . ($key ? ('/' . S3Client::encodeKey($key)) : '/') - ); - } - } -} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Command/S3Command.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Command/S3Command.php deleted file mode 100644 index d0d3b24b203..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Command/S3Command.php +++ /dev/null @@ -1,65 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Command; - -use Guzzle\Service\Command\OperationCommand; -use Guzzle\Service\Resource\Model; -use Guzzle\Common\Event; - -/** - * Adds functionality to Amazon S3 commands: - * - Adds the PutObject URL to a response - * - Allows creating a Pre-signed URL from any command - */ -class S3Command extends OperationCommand -{ - /** - * Create a pre-signed URL for the operation - * - * @param int|string $expires The Unix timestamp to expire at or a string that can be evaluated by strtotime - * - * @return string - */ - public function createPresignedUrl($expires) - { - return $this->client->createPresignedUrl($this->prepare(), $expires); - } - - /** - * {@inheritdoc} - */ - protected function process() - { - $request = $this->getRequest(); - $response = $this->getResponse(); - - // Dispatch an error if a 301 redirect occurred - if ($response->getStatusCode() == 301) { - $this->getClient()->getEventDispatcher()->dispatch('request.error', new Event(array( - 'request' => $this->getRequest(), - 'response' => $response - ))); - } - - parent::process(); - - // Set the GetObject URL if using the PutObject operation - if ($this->result instanceof Model && $this->getName() == 'PutObject') { - $this->result->set('ObjectURL', $request->getUrl()); - } - } -} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Enum/CannedAcl.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Enum/CannedAcl.php deleted file mode 100644 index da4704527bd..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Enum/CannedAcl.php +++ /dev/null @@ -1,32 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Enum; - -use Aws\Common\Enum; - -/** - * Contains enumerable CannedAcl values - */ -class CannedAcl extends Enum -{ - const PRIVATE_ACCESS = 'private'; - const PUBLIC_READ = 'public-read'; - const PUBLIC_READ_WRITE = 'public-read-write'; - const AUTHENTICATED_READ = 'authenticated-read'; - const BUCKET_OWNER_READ = 'bucket-owner-read'; - const BUCKET_OWNER_FULL_CONTROL = 'bucket-owner-full-control'; -} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Enum/EncodingType.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Enum/EncodingType.php deleted file mode 100644 index 0eaa3a44cf3..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Enum/EncodingType.php +++ /dev/null @@ -1,27 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Enum; - -use Aws\Common\Enum; - -/** - * Contains enumerable EncodingType values - */ -class EncodingType extends Enum -{ - const URL = 'url'; -} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Enum/Event.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Enum/Event.php deleted file mode 100644 index 05abcacb118..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Enum/Event.php +++ /dev/null @@ -1,27 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Enum; - -use Aws\Common\Enum; - -/** - * Contains enumerable Event values - */ -class Event extends Enum -{ - const REDUCED_REDUNDANCY_LOST_OBJECT = 's3:ReducedRedundancyLostObject'; -} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Enum/GranteeType.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Enum/GranteeType.php deleted file mode 100644 index 5370047426e..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Enum/GranteeType.php +++ /dev/null @@ -1,29 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Enum; - -use Aws\Common\Enum; - -/** - * Contains enumerable GranteeType values - */ -class GranteeType extends Enum -{ - const USER = 'CanonicalUser'; - const EMAIL = 'AmazonCustomerByEmail'; - const GROUP = 'Group'; -} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Enum/Group.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Enum/Group.php deleted file mode 100644 index 06971631713..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Enum/Group.php +++ /dev/null @@ -1,29 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Enum; - -use Aws\Common\Enum; - -/** - * Contains enumerable Amazon S3 group options for ACL grantees - */ -class Group extends Enum -{ - const AUTHENTICATED_USERS = 'http://acs.amazonaws.com/groups/global/AuthenticatedUsers'; - const ALL_USERS = 'http://acs.amazonaws.com/groups/global/AllUsers'; - const LOG_DELIVERY = 'http://acs.amazonaws.com/groups/s3/LogDelivery'; -} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Enum/MFADelete.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Enum/MFADelete.php deleted file mode 100644 index e92721e7353..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Enum/MFADelete.php +++ /dev/null @@ -1,28 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Enum; - -use Aws\Common\Enum; - -/** - * Contains enumerable MFADelete values - */ -class MFADelete extends Enum -{ - const ENABLED = 'Enabled'; - const DISABLED = 'Disabled'; -} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Enum/MetadataDirective.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Enum/MetadataDirective.php deleted file mode 100644 index 588ceed6d4f..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Enum/MetadataDirective.php +++ /dev/null @@ -1,28 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Enum; - -use Aws\Common\Enum; - -/** - * Contains enumerable MetadataDirective values - */ -class MetadataDirective extends Enum -{ - const COPY = 'COPY'; - const REPLACE = 'REPLACE'; -} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Enum/Payer.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Enum/Payer.php deleted file mode 100644 index 3016aa530f7..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Enum/Payer.php +++ /dev/null @@ -1,28 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Enum; - -use Aws\Common\Enum; - -/** - * Contains enumerable Payer values - */ -class Payer extends Enum -{ - const REQUESTER = 'Requester'; - const BUCKET_OWNER = 'BucketOwner'; -} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Enum/Permission.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Enum/Permission.php deleted file mode 100644 index bafd226eaa7..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Enum/Permission.php +++ /dev/null @@ -1,31 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Enum; - -use Aws\Common\Enum; - -/** - * Contains enumerable Permission values - */ -class Permission extends Enum -{ - const FULL_CONTROL = 'FULL_CONTROL'; - const WRITE = 'WRITE'; - const WRITE_ACP = 'WRITE_ACP'; - const READ = 'READ'; - const READ_ACP = 'READ_ACP'; -} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Enum/Protocol.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Enum/Protocol.php deleted file mode 100644 index 93b57e34a14..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Enum/Protocol.php +++ /dev/null @@ -1,28 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Enum; - -use Aws\Common\Enum; - -/** - * Contains enumerable Protocol values - */ -class Protocol extends Enum -{ - const HTTP = 'http'; - const HTTPS = 'https'; -} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Enum/ServerSideEncryption.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Enum/ServerSideEncryption.php deleted file mode 100644 index 53256a12a9e..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Enum/ServerSideEncryption.php +++ /dev/null @@ -1,27 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Enum; - -use Aws\Common\Enum; - -/** - * Contains enumerable ServerSideEncryption values - */ -class ServerSideEncryption extends Enum -{ - const AES256 = 'AES256'; -} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Enum/Status.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Enum/Status.php deleted file mode 100644 index ddf6d262158..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Enum/Status.php +++ /dev/null @@ -1,28 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Enum; - -use Aws\Common\Enum; - -/** - * Contains enumerable Status values - */ -class Status extends Enum -{ - const ENABLED = 'Enabled'; - const SUSPENDED = 'Suspended'; -} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Enum/Storage.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Enum/Storage.php deleted file mode 100644 index 5248a81cff5..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Enum/Storage.php +++ /dev/null @@ -1,29 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Enum; - -use Aws\Common\Enum; - -/** - * Contains enumerable Amazon S3 storage options - */ -class Storage extends Enum -{ - const STANDARD = 'STANDARD'; - const REDUCED = 'REDUCED_REDUNDANCY'; - const GLACIER = 'GLACIER'; -} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Enum/StorageClass.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Enum/StorageClass.php deleted file mode 100644 index 3b8ab117185..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Enum/StorageClass.php +++ /dev/null @@ -1,28 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Enum; - -use Aws\Common\Enum; - -/** - * Contains enumerable StorageClass values - */ -class StorageClass extends Enum -{ - const STANDARD = 'STANDARD'; - const REDUCED_REDUNDANCY = 'REDUCED_REDUNDANCY'; -} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/AccessDeniedException.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/AccessDeniedException.php deleted file mode 100644 index 7de2ef6447c..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/AccessDeniedException.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Exception; - -/** - * Access Denied - */ -class AccessDeniedException extends S3Exception {} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/AccountProblemException.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/AccountProblemException.php deleted file mode 100644 index 5e1c7acd1bc..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/AccountProblemException.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Exception; - -/** - * There is a problem with your AWS account that prevents the operation from completing successfully. Please use Contact Us. - */ -class AccountProblemException extends S3Exception {} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/AmbiguousGrantByEmailAddressException.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/AmbiguousGrantByEmailAddressException.php deleted file mode 100644 index 77a57f51dbf..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/AmbiguousGrantByEmailAddressException.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Exception; - -/** - * The e-mail address you provided is associated with more than one account. - */ -class AmbiguousGrantByEmailAddressException extends S3Exception {} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/BadDigestException.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/BadDigestException.php deleted file mode 100644 index 1cc642d3571..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/BadDigestException.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Exception; - -/** - * The Content-MD5 you specified did not match what we received. - */ -class BadDigestException extends S3Exception {} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/BucketAlreadyExistsException.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/BucketAlreadyExistsException.php deleted file mode 100644 index fade68bb1f7..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/BucketAlreadyExistsException.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Exception; - -/** - * The requested bucket name is not available. The bucket namespace is shared by all users of the system. Please select a different name and try again. - */ -class BucketAlreadyExistsException extends S3Exception {} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/BucketAlreadyOwnedByYouException.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/BucketAlreadyOwnedByYouException.php deleted file mode 100644 index 12462faab4d..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/BucketAlreadyOwnedByYouException.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Exception; - -/** - * Your previous request to create the named bucket succeeded and you already own it. - */ -class BucketAlreadyOwnedByYouException extends S3Exception {} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/BucketNotEmptyException.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/BucketNotEmptyException.php deleted file mode 100644 index e06bc30363f..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/BucketNotEmptyException.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Exception; - -/** - * The bucket you tried to delete is not empty. - */ -class BucketNotEmptyException extends S3Exception {} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/CredentialsNotSupportedException.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/CredentialsNotSupportedException.php deleted file mode 100644 index 2568b4c2b64..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/CredentialsNotSupportedException.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Exception; - -/** - * This request does not support credentials. - */ -class CredentialsNotSupportedException extends S3Exception {} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/CrossLocationLoggingProhibitedException.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/CrossLocationLoggingProhibitedException.php deleted file mode 100644 index 9a6780ecf57..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/CrossLocationLoggingProhibitedException.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Exception; - -/** - * Cross location logging not allowed. Buckets in one geographic location cannot log information to a bucket in another location. - */ -class CrossLocationLoggingProhibitedException extends S3Exception {} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/DeleteMultipleObjectsException.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/DeleteMultipleObjectsException.php deleted file mode 100644 index 44a3aa52849..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/DeleteMultipleObjectsException.php +++ /dev/null @@ -1,48 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Exception; - -/** - * Exception thrown when errors occur in a DeleteMultipleObjects request - */ -class DeleteMultipleObjectsException extends S3Exception -{ - /** - * @var array Array of errors - */ - protected $errors = array(); - - /** - * @param array $errors Array of errors - */ - public function __construct(array $errors = array()) - { - parent::__construct('Unable to delete certain keys when executing a DeleteMultipleObjects request'); - $this->errors = $errors; - } - - /** - * Get the errored objects - * - * @return array Returns an array of associative arrays, each containing - * a 'Code', 'Message', and 'Key' key. - */ - public function getErrors() - { - return $this->errors; - } -} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/EntityTooLargeException.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/EntityTooLargeException.php deleted file mode 100644 index 66e6da94900..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/EntityTooLargeException.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Exception; - -/** - * Your proposed upload exceeds the maximum allowed object size. - */ -class EntityTooLargeException extends S3Exception {} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/EntityTooSmallException.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/EntityTooSmallException.php deleted file mode 100644 index d4128dcc28a..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/EntityTooSmallException.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Exception; - -/** - * Your proposed upload is smaller than the minimum allowed object size. - */ -class EntityTooSmallException extends S3Exception {} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/ExpiredTokenException.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/ExpiredTokenException.php deleted file mode 100644 index 4ddeea4c4b6..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/ExpiredTokenException.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Exception; - -/** - * The provided token has expired. - */ -class ExpiredTokenException extends S3Exception {} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/IllegalVersioningConfigurationException.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/IllegalVersioningConfigurationException.php deleted file mode 100644 index 58185d7d76b..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/IllegalVersioningConfigurationException.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Exception; - -/** - * Indicates that the Versioning configuration specified in the request is invalid. - */ -class IllegalVersioningConfigurationException extends S3Exception {} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/IncompleteBodyException.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/IncompleteBodyException.php deleted file mode 100644 index b87a0647c90..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/IncompleteBodyException.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Exception; - -/** - * You did not provide the number of bytes specified by the Content-Length HTTP header - */ -class IncompleteBodyException extends S3Exception {} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/IncorrectNumberOfFilesInPostRequestException.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/IncorrectNumberOfFilesInPostRequestException.php deleted file mode 100644 index 6650722414a..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/IncorrectNumberOfFilesInPostRequestException.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Exception; - -/** - * POST requires exactly one file upload per request. - */ -class IncorrectNumberOfFilesInPostRequestException extends S3Exception {} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/InlineDataTooLargeException.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/InlineDataTooLargeException.php deleted file mode 100644 index ec263e1de60..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/InlineDataTooLargeException.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Exception; - -/** - * Inline data exceeds the maximum allowed size. - */ -class InlineDataTooLargeException extends S3Exception {} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/InternalErrorException.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/InternalErrorException.php deleted file mode 100644 index 6640cdb0ab1..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/InternalErrorException.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Exception; - -/** - * We encountered an internal error. Please try again. - */ -class InternalErrorException extends S3Exception {} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/InvalidAccessKeyIdException.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/InvalidAccessKeyIdException.php deleted file mode 100644 index f4d42f7c59a..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/InvalidAccessKeyIdException.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Exception; - -/** - * The AWS Access Key Id you provided does not exist in our records. - */ -class InvalidAccessKeyIdException extends S3Exception {} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/InvalidAddressingHeaderException.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/InvalidAddressingHeaderException.php deleted file mode 100644 index f49fd768dda..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/InvalidAddressingHeaderException.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Exception; - -/** - * You must specify the Anonymous role. - */ -class InvalidAddressingHeaderException extends S3Exception {} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/InvalidArgumentException.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/InvalidArgumentException.php deleted file mode 100644 index d540ffc3fa0..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/InvalidArgumentException.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Exception; - -/** - * Invalid Argument - */ -class InvalidArgumentException extends S3Exception {} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/InvalidBucketNameException.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/InvalidBucketNameException.php deleted file mode 100644 index 66b55d9afc9..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/InvalidBucketNameException.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Exception; - -/** - * The specified bucket is not valid. - */ -class InvalidBucketNameException extends S3Exception {} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/InvalidBucketStateException.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/InvalidBucketStateException.php deleted file mode 100644 index 91cf817adbf..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/InvalidBucketStateException.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Exception; - -/** - * The request is not valid with the current state of the bucket. - */ -class InvalidBucketStateException extends S3Exception {} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/InvalidDigestException.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/InvalidDigestException.php deleted file mode 100644 index 3c203b7683d..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/InvalidDigestException.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Exception; - -/** - * The Content-MD5 you specified was an invalid. - */ -class InvalidDigestException extends S3Exception {} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/InvalidLocationConstraintException.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/InvalidLocationConstraintException.php deleted file mode 100644 index b30a7e6e0a8..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/InvalidLocationConstraintException.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Exception; - -/** - * The specified location constraint is not valid. For more information about Regions, see How to Select a Region for Your Buckets. - */ -class InvalidLocationConstraintException extends S3Exception {} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/InvalidPartException.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/InvalidPartException.php deleted file mode 100644 index 200855288ed..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/InvalidPartException.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Exception; - -/** - * One or more of the specified parts could not be found. The part might not have been uploaded, or the specified entity tag might not have matched the part's entity tag. - */ -class InvalidPartException extends S3Exception {} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/InvalidPartOrderException.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/InvalidPartOrderException.php deleted file mode 100644 index a04acdcaef4..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/InvalidPartOrderException.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Exception; - -/** - * The list of parts was not in ascending order.Parts list must specified in order by part number. - */ -class InvalidPartOrderException extends S3Exception {} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/InvalidPayerException.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/InvalidPayerException.php deleted file mode 100644 index 048de9bd715..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/InvalidPayerException.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Exception; - -/** - * All access to this object has been disabled. - */ -class InvalidPayerException extends S3Exception {} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/InvalidPolicyDocumentException.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/InvalidPolicyDocumentException.php deleted file mode 100644 index 3fc24a3ca95..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/InvalidPolicyDocumentException.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Exception; - -/** - * The content of the form does not meet the conditions specified in the policy document. - */ -class InvalidPolicyDocumentException extends S3Exception {} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/InvalidRangeException.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/InvalidRangeException.php deleted file mode 100644 index 455b05277db..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/InvalidRangeException.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Exception; - -/** - * The requested range cannot be satisfied. - */ -class InvalidRangeException extends S3Exception {} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/InvalidRequestException.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/InvalidRequestException.php deleted file mode 100644 index 89e4c8f0038..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/InvalidRequestException.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Exception; - -/** - * SOAP requests must be made over an HTTPS connection. - */ -class InvalidRequestException extends S3Exception {} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/InvalidSOAPRequestException.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/InvalidSOAPRequestException.php deleted file mode 100644 index a8d8ce196e2..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/InvalidSOAPRequestException.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Exception; - -/** - * The SOAP request body is invalid. - */ -class InvalidSOAPRequestException extends S3Exception {} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/InvalidSecurityException.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/InvalidSecurityException.php deleted file mode 100644 index 08fadd00945..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/InvalidSecurityException.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Exception; - -/** - * The provided security credentials are not valid. - */ -class InvalidSecurityException extends S3Exception {} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/InvalidStorageClassException.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/InvalidStorageClassException.php deleted file mode 100644 index 09e66efba38..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/InvalidStorageClassException.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Exception; - -/** - * The storage class you specified is not valid. - */ -class InvalidStorageClassException extends S3Exception {} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/InvalidTagErrorException.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/InvalidTagErrorException.php deleted file mode 100644 index 87f48ff82fd..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/InvalidTagErrorException.php +++ /dev/null @@ -1,23 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Exception; - -/** - * The Tag provided was not a valid tag. This can occur if the Tag did not pass input validation. See the - * CostAllocation docs for a description of valid tags. - */ -class InvalidTagErrorException extends S3Exception {} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/InvalidTargetBucketForLoggingException.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/InvalidTargetBucketForLoggingException.php deleted file mode 100644 index d81eab0195e..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/InvalidTargetBucketForLoggingException.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Exception; - -/** - * The target bucket for logging does not exist, is not owned by you, or does not have the appropriate grants for the log-delivery group. - */ -class InvalidTargetBucketForLoggingException extends S3Exception {} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/InvalidTokenException.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/InvalidTokenException.php deleted file mode 100644 index b359ec04b73..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/InvalidTokenException.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Exception; - -/** - * The provided token is malformed or otherwise invalid. - */ -class InvalidTokenException extends S3Exception {} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/InvalidURIException.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/InvalidURIException.php deleted file mode 100644 index cb3694e5668..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/InvalidURIException.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Exception; - -/** - * Couldn't parse the specified URI. - */ -class InvalidURIException extends S3Exception {} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/KeyTooLongException.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/KeyTooLongException.php deleted file mode 100644 index e5a654a33c3..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/KeyTooLongException.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Exception; - -/** - * Your key is too long. - */ -class KeyTooLongException extends S3Exception {} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/MalformedACLErrorException.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/MalformedACLErrorException.php deleted file mode 100644 index d1876c6342f..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/MalformedACLErrorException.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Exception; - -/** - * The XML you provided was not well-formed or did not validate against our published schema. - */ -class MalformedACLErrorException extends S3Exception {} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/MalformedPOSTRequestException.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/MalformedPOSTRequestException.php deleted file mode 100644 index ed0d572f184..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/MalformedPOSTRequestException.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Exception; - -/** - * The body of your POST request is not well-formed multipart/form-data. - */ -class MalformedPOSTRequestException extends S3Exception {} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/MalformedXMLException.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/MalformedXMLException.php deleted file mode 100644 index f23d96515a9..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/MalformedXMLException.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Exception; - -/** - * This happens when the user sends a malformed xml (xml that doesn't conform to the published xsd) for the configuration. The error message is, "The XML you provided was not well-formed or did not validate against our published schema." - */ -class MalformedXMLException extends S3Exception {} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/MaxMessageLengthExceededException.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/MaxMessageLengthExceededException.php deleted file mode 100644 index e8f9bce7bcb..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/MaxMessageLengthExceededException.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Exception; - -/** - * Your request was too big. - */ -class MaxMessageLengthExceededException extends S3Exception {} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/MaxPostPreDataLengthExceededErrorException.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/MaxPostPreDataLengthExceededErrorException.php deleted file mode 100644 index 3fe204316ea..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/MaxPostPreDataLengthExceededErrorException.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Exception; - -/** - * Your POST request fields preceding the upload file were too large. - */ -class MaxPostPreDataLengthExceededErrorException extends S3Exception {} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/MetadataTooLargeException.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/MetadataTooLargeException.php deleted file mode 100644 index 584d3fdcdc4..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/MetadataTooLargeException.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Exception; - -/** - * Your metadata headers exceed the maximum allowed metadata size. - */ -class MetadataTooLargeException extends S3Exception {} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/MethodNotAllowedException.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/MethodNotAllowedException.php deleted file mode 100644 index 21dc7315558..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/MethodNotAllowedException.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Exception; - -/** - * The specified method is not allowed against this resource. - */ -class MethodNotAllowedException extends S3Exception {} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/MissingAttachmentException.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/MissingAttachmentException.php deleted file mode 100644 index e90e1a781e4..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/MissingAttachmentException.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Exception; - -/** - * A SOAP attachment was expected, but none were found. - */ -class MissingAttachmentException extends S3Exception {} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/MissingContentLengthException.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/MissingContentLengthException.php deleted file mode 100644 index 19429f3090d..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/MissingContentLengthException.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Exception; - -/** - * You must provide the Content-Length HTTP header. - */ -class MissingContentLengthException extends S3Exception {} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/MissingRequestBodyErrorException.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/MissingRequestBodyErrorException.php deleted file mode 100644 index 9b3f38e3af0..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/MissingRequestBodyErrorException.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Exception; - -/** - * This happens when the user sends an empty xml document as a request. The error message is, "Request body is empty." - */ -class MissingRequestBodyErrorException extends S3Exception {} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/MissingSecurityElementException.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/MissingSecurityElementException.php deleted file mode 100644 index 8c74a8729e6..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/MissingSecurityElementException.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Exception; - -/** - * The SOAP 1.1 request is missing a security element. - */ -class MissingSecurityElementException extends S3Exception {} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/MissingSecurityHeaderException.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/MissingSecurityHeaderException.php deleted file mode 100644 index 4de9cfc9b42..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/MissingSecurityHeaderException.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Exception; - -/** - * Your request was missing a required header. - */ -class MissingSecurityHeaderException extends S3Exception {} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/NoLoggingStatusForKeyException.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/NoLoggingStatusForKeyException.php deleted file mode 100644 index 339cb7677da..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/NoLoggingStatusForKeyException.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Exception; - -/** - * There is no such thing as a logging status sub-resource for a key. - */ -class NoLoggingStatusForKeyException extends S3Exception {} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/NoSuchBucketException.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/NoSuchBucketException.php deleted file mode 100644 index c13c16dcaa7..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/NoSuchBucketException.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Exception; - -/** - * The specified bucket does not exist. - */ -class NoSuchBucketException extends S3Exception {} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/NoSuchBucketPolicyException.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/NoSuchBucketPolicyException.php deleted file mode 100644 index 57f648a5f81..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/NoSuchBucketPolicyException.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Exception; - -/** - * The specified bucket policy does not exist. - */ -class NoSuchBucketPolicyException extends S3Exception {} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/NoSuchCORSConfigurationException.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/NoSuchCORSConfigurationException.php deleted file mode 100644 index 9aed8d9719b..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/NoSuchCORSConfigurationException.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Exception; - -/** - * The specified bucket does not have a CORs configuration. - */ -class NoSuchCORSConfigurationException extends S3Exception {} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/NoSuchKeyException.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/NoSuchKeyException.php deleted file mode 100644 index 3b3124320f1..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/NoSuchKeyException.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Exception; - -/** - * The specified key does not exist. - */ -class NoSuchKeyException extends S3Exception {} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/NoSuchLifecycleConfigurationException.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/NoSuchLifecycleConfigurationException.php deleted file mode 100644 index 075b7c56efd..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/NoSuchLifecycleConfigurationException.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Exception; - -/** - * The lifecycle configuration does not exist. - */ -class NoSuchLifecycleConfigurationException extends S3Exception {} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/NoSuchTagSetErrorException.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/NoSuchTagSetErrorException.php deleted file mode 100644 index 12369bd19c9..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/NoSuchTagSetErrorException.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Exception; - -/** - * There is no TagSet associated with the bucket. - */ -class NoSuchTagSetErrorException extends S3Exception {} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/NoSuchUploadException.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/NoSuchUploadException.php deleted file mode 100644 index 75789e4e4a8..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/NoSuchUploadException.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Exception; - -/** - * The specified multipart upload does not exist. - */ -class NoSuchUploadException extends S3Exception {} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/NoSuchVersionException.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/NoSuchVersionException.php deleted file mode 100644 index 3eb54db0373..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/NoSuchVersionException.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Exception; - -/** - * Indicates that the version ID specified in the request does not match an existing version. - */ -class NoSuchVersionException extends S3Exception {} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/NoSuchWebsiteConfigurationException.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/NoSuchWebsiteConfigurationException.php deleted file mode 100644 index b20c443ea27..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/NoSuchWebsiteConfigurationException.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Exception; - -/** - * The specified bucket does not have a website configuration. - */ -class NoSuchWebsiteConfigurationException extends S3Exception {} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/NotImplementedException.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/NotImplementedException.php deleted file mode 100644 index 065e49e5f32..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/NotImplementedException.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Exception; - -/** - * A header you provided implies functionality that is not implemented. - */ -class NotImplementedException extends S3Exception {} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/NotSignedUpException.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/NotSignedUpException.php deleted file mode 100644 index 086fa3bdc43..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/NotSignedUpException.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Exception; - -/** - * Your account is not signed up for the Amazon S3 service. You must sign up before you can use Amazon S3. You can sign up at the following URL: http://aws.amazon.com/s3 - */ -class NotSignedUpException extends S3Exception {} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/NotSuchBucketPolicyException.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/NotSuchBucketPolicyException.php deleted file mode 100644 index 48f376af66a..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/NotSuchBucketPolicyException.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Exception; - -/** - * The specified bucket does not have a bucket policy. - */ -class NotSuchBucketPolicyException extends S3Exception {} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/ObjectAlreadyInActiveTierErrorException.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/ObjectAlreadyInActiveTierErrorException.php deleted file mode 100644 index 4361d521459..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/ObjectAlreadyInActiveTierErrorException.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Exception; - -/** - * This operation is not allowed against this storage tier - */ -class ObjectAlreadyInActiveTierErrorException extends S3Exception {} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/ObjectNotInActiveTierErrorException.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/ObjectNotInActiveTierErrorException.php deleted file mode 100644 index 26ee3996a64..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/ObjectNotInActiveTierErrorException.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Exception; - -/** - * The source object of the COPY operation is not in the active tier and is only stored in Amazon Glacier. - */ -class ObjectNotInActiveTierErrorException extends S3Exception {} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/OperationAbortedException.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/OperationAbortedException.php deleted file mode 100644 index 245279aef5c..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/OperationAbortedException.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Exception; - -/** - * A conflicting conditional operation is currently in progress against this resource. Please try again. - */ -class OperationAbortedException extends S3Exception {} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/Parser/S3ExceptionParser.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/Parser/S3ExceptionParser.php deleted file mode 100644 index a914204a87b..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/Parser/S3ExceptionParser.php +++ /dev/null @@ -1,72 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Exception\Parser; - -use Aws\Common\Exception\Parser\DefaultXmlExceptionParser; -use Guzzle\Http\Message\RequestInterface; -use Guzzle\Http\Message\Response; - -/** - * Parses S3 exception responses - */ -class S3ExceptionParser extends DefaultXmlExceptionParser -{ - /** - * {@inheritdoc} - */ - public function parse(RequestInterface $request, Response $response) - { - $data = parent::parse($request, $response); - - if ($response->getStatusCode() === 301) { - $data['type'] = 'client'; - if (isset($data['message'], $data['parsed'])) { - $data['message'] = rtrim($data['message'], '.') . ': "' . $data['parsed']->Endpoint . '".'; - } - } - - return $data; - } - - /** - * {@inheritdoc} - */ - protected function parseHeaders(RequestInterface $request, Response $response, array &$data) - { - parent::parseHeaders($request, $response, $data); - - // Get the request - $status = $response->getStatusCode(); - $method = $request->getMethod(); - - // Attempt to determine code for 403s and 404s - if ($status === 403) { - $data['code'] = 'AccessDenied'; - } elseif ($method === 'HEAD' && $status === 404) { - $path = explode('/', trim($request->getPath(), '/')); - $host = explode('.', $request->getHost()); - $bucket = (count($host) === 4) ? $host[0] : array_shift($path); - $object = array_shift($path); - - if ($bucket && $object) { - $data['code'] = 'NoSuchKey'; - } elseif ($bucket) { - $data['code'] = 'NoSuchBucket'; - } - } - } -} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/PermanentRedirectException.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/PermanentRedirectException.php deleted file mode 100644 index d2af82076c4..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/PermanentRedirectException.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Exception; - -/** - * The bucket you are attempting to access must be addressed using the specified endpoint. Please send all future requests to this endpoint. - */ -class PermanentRedirectException extends S3Exception {} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/PreconditionFailedException.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/PreconditionFailedException.php deleted file mode 100644 index 8805432c342..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/PreconditionFailedException.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Exception; - -/** - * At least one of the preconditions you specified did not hold. - */ -class PreconditionFailedException extends S3Exception {} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/RedirectException.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/RedirectException.php deleted file mode 100644 index e89c816d480..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/RedirectException.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Exception; - -/** - * Temporary redirect. - */ -class RedirectException extends S3Exception {} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/RequestIsNotMultiPartContentException.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/RequestIsNotMultiPartContentException.php deleted file mode 100644 index b539feed64f..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/RequestIsNotMultiPartContentException.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Exception; - -/** - * Bucket POST must be of the enclosure-type multipart/form-data. - */ -class RequestIsNotMultiPartContentException extends S3Exception {} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/RequestTimeTooSkewedException.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/RequestTimeTooSkewedException.php deleted file mode 100644 index 37253901824..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/RequestTimeTooSkewedException.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Exception; - -/** - * The difference between the request time and the server's time is too large. - */ -class RequestTimeTooSkewedException extends S3Exception {} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/RequestTimeoutException.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/RequestTimeoutException.php deleted file mode 100644 index a00d50f0f26..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/RequestTimeoutException.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Exception; - -/** - * Your socket connection to the server was not read from or written to within the timeout period. - */ -class RequestTimeoutException extends S3Exception {} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/RequestTorrentOfBucketErrorException.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/RequestTorrentOfBucketErrorException.php deleted file mode 100644 index 8d46e150942..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/RequestTorrentOfBucketErrorException.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Exception; - -/** - * Requesting the torrent file of a bucket is not permitted. - */ -class RequestTorrentOfBucketErrorException extends S3Exception {} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/S3Exception.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/S3Exception.php deleted file mode 100644 index 29e82ed256b..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/S3Exception.php +++ /dev/null @@ -1,24 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Exception; - -use Aws\Common\Exception\ServiceResponseException; - -/** - * Default service exception class - */ -class S3Exception extends ServiceResponseException {} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/ServiceUnavailableException.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/ServiceUnavailableException.php deleted file mode 100644 index 390a30a3fea..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/ServiceUnavailableException.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Exception; - -/** - * Please reduce your request rate. - */ -class ServiceUnavailableException extends S3Exception {} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/SignatureDoesNotMatchException.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/SignatureDoesNotMatchException.php deleted file mode 100644 index 3dfe98c78ce..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/SignatureDoesNotMatchException.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Exception; - -/** - * The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. For more information, see REST Authentication and SOAP Authentication for details. - */ -class SignatureDoesNotMatchException extends S3Exception {} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/SlowDownException.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/SlowDownException.php deleted file mode 100644 index 4e3aea7c439..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/SlowDownException.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Exception; - -/** - * Please reduce your request rate. - */ -class SlowDownException extends S3Exception {} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/TemporaryRedirectException.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/TemporaryRedirectException.php deleted file mode 100644 index 37abedf0807..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/TemporaryRedirectException.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Exception; - -/** - * You are being redirected to the bucket while DNS updates. - */ -class TemporaryRedirectException extends S3Exception {} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/TokenRefreshRequiredException.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/TokenRefreshRequiredException.php deleted file mode 100644 index 31f29dd57bf..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/TokenRefreshRequiredException.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Exception; - -/** - * The provided token must be refreshed. - */ -class TokenRefreshRequiredException extends S3Exception {} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/TooManyBucketsException.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/TooManyBucketsException.php deleted file mode 100644 index c49605c40ac..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/TooManyBucketsException.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Exception; - -/** - * You have attempted to create more buckets than allowed. - */ -class TooManyBucketsException extends S3Exception {} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/UnexpectedContentException.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/UnexpectedContentException.php deleted file mode 100644 index ea105ca494d..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/UnexpectedContentException.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Exception; - -/** - * This request does not support content. - */ -class UnexpectedContentException extends S3Exception {} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/UnresolvableGrantByEmailAddressException.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/UnresolvableGrantByEmailAddressException.php deleted file mode 100644 index 2138a57fc1a..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/UnresolvableGrantByEmailAddressException.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Exception; - -/** - * The e-mail address you provided does not match any account on record. - */ -class UnresolvableGrantByEmailAddressException extends S3Exception {} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/UserKeyMustBeSpecifiedException.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/UserKeyMustBeSpecifiedException.php deleted file mode 100644 index f1bcc9c07ad..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Exception/UserKeyMustBeSpecifiedException.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Exception; - -/** - * The bucket POST must contain the specified field name. If it is specified, please check the order of the fields. - */ -class UserKeyMustBeSpecifiedException extends S3Exception {} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Iterator/ListBucketsIterator.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Iterator/ListBucketsIterator.php deleted file mode 100644 index 7437cf9f3d2..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Iterator/ListBucketsIterator.php +++ /dev/null @@ -1,48 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Iterator; - -use Aws\Common\Iterator\AwsResourceIterator; -use Guzzle\Service\Resource\Model; - -/** - * Iterator for the S3 ListBuckets command - * - * This iterator includes the following additional options: - * - * - names_only: Set to true to receive only the object/prefix names - */ -class ListBucketsIterator extends AwsResourceIterator -{ - /** - * {@inheritdoc} - */ - protected function handleResults(Model $result) - { - // Get the results - $buckets = $result->get('Buckets') ?: array(); - - // If only the names_only set, change arrays to a string - if ($this->get('names_only')) { - foreach ($buckets as &$bucket) { - $bucket = $bucket['Name']; - } - } - - return $buckets; - } -} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Iterator/ListMultipartUploadsIterator.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Iterator/ListMultipartUploadsIterator.php deleted file mode 100644 index 592aa0a9b99..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Iterator/ListMultipartUploadsIterator.php +++ /dev/null @@ -1,46 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Iterator; - -use Guzzle\Service\Resource\Model; -use Aws\Common\Iterator\AwsResourceIterator; - -/** - * Iterator for the S3 ListMultipartUploads command - * - * This iterator includes the following additional options: - * - * - return_prefixes: Set to true to return both prefixes and uploads - */ -class ListMultipartUploadsIterator extends AwsResourceIterator -{ - /** - * {@inheritdoc} - */ - protected function handleResults(Model $result) - { - // Get the list of uploads - $uploads = $result->get('Uploads') ?: array(); - - // If there are prefixes and we want them, merge them in - if ($this->get('return_prefixes') && $result->hasKey('CommonPrefixes')) { - $uploads = array_merge($uploads, $result->get('CommonPrefixes')); - } - - return $uploads; - } -} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Iterator/ListObjectVersionsIterator.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Iterator/ListObjectVersionsIterator.php deleted file mode 100644 index 991a77e1f22..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Iterator/ListObjectVersionsIterator.php +++ /dev/null @@ -1,48 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Iterator; - -use Aws\Common\Iterator\AwsResourceIterator; -use Guzzle\Service\Resource\Model; - -/** - * Iterator for an S3 ListObjectVersions command - * - * This iterator includes the following additional options: - * - * - return_prefixes: Set to true to receive both prefixes and versions in results - */ -class ListObjectVersionsIterator extends AwsResourceIterator -{ - /** - * {@inheritdoc} - */ - protected function handleResults(Model $result) - { - // Get the list of object versions - $versions = $result->get('Versions') ?: array(); - $deleteMarkers = $result->get('DeleteMarkers') ?: array(); - $versions = array_merge($versions, $deleteMarkers); - - // If there are prefixes and we want them, merge them in - if ($this->get('return_prefixes') && $result->hasKey('CommonPrefixes')) { - $versions = array_merge($versions, $result->get('CommonPrefixes')); - } - - return $versions; - } -} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Iterator/ListObjectsIterator.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Iterator/ListObjectsIterator.php deleted file mode 100644 index 852b2a992fa..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Iterator/ListObjectsIterator.php +++ /dev/null @@ -1,68 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Iterator; - -use Aws\Common\Iterator\AwsResourceIterator; -use Guzzle\Service\Resource\Model; - -/** - * Iterator for an S3 ListObjects command - * - * This iterator includes the following additional options: - * - * - return_prefixes: Set to true to receive both prefixes and objects in results - * - sort_results: Set to true to sort mixed (object/prefix) results - * - names_only: Set to true to receive only the object/prefix names - */ -class ListObjectsIterator extends AwsResourceIterator -{ - protected function handleResults(Model $result) - { - // Get the list of objects and record the last key - $objects = $result->get('Contents') ?: array(); - $numObjects = count($objects); - $lastKey = $numObjects ? $objects[$numObjects - 1]['Key'] : false; - if ($lastKey && !$result->hasKey($this->get('output_token'))) { - $result->set($this->get('output_token'), $lastKey); - } - - // Closure for getting the name of an object or prefix - $getName = function ($object) { - return isset($object['Key']) ? $object['Key'] : $object['Prefix']; - }; - - // If common prefixes returned (i.e. a delimiter was set) and they need to be returned, there is more to do - if ($this->get('return_prefixes') && $result->hasKey('CommonPrefixes')) { - // Collect and format the prefixes to include with the objects - $objects = array_merge($objects, $result->get('CommonPrefixes')); - - // Sort the objects and prefixes to maintain alphabetical order, but only if some of each were returned - if ($this->get('sort_results') && $lastKey && $objects) { - usort($objects, function ($object1, $object2) use ($getName) { - return strcmp($getName($object1), $getName($object2)); - }); - } - } - - // If only the names are desired, iterate through the results and convert the arrays to the object/prefix names - if ($this->get('names_only')) { - $objects = array_map($getName, $objects); - } - - return $objects; - } -} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Iterator/OpendirIterator.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Iterator/OpendirIterator.php deleted file mode 100644 index 82c0153ed51..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Iterator/OpendirIterator.php +++ /dev/null @@ -1,86 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Iterator; - -/** - * Provides an iterator around an opendir resource. This is useful when you need to provide context to an opendir so - * you can't use RecursiveDirectoryIterator - */ -class OpendirIterator implements \Iterator -{ - /** @var resource */ - protected $dirHandle; - - /** @var \SplFileInfo */ - protected $currentFile; - - /** @var int */ - protected $key = -1; - - /** @var string */ - protected $filePrefix; - - /** - * @param resource $dirHandle Opened directory handled returned from opendir - * @param string $filePrefix Prefix to add to each filename - */ - public function __construct($dirHandle, $filePrefix = '') - { - $this->filePrefix = $filePrefix; - $this->dirHandle = $dirHandle; - $this->next(); - } - - public function __destruct() - { - if ($this->dirHandle) { - closedir($this->dirHandle); - } - } - - public function rewind() - { - $this->key = 0; - rewinddir($this->dirHandle); - } - - public function current() - { - return $this->currentFile; - } - - public function next() - { - if ($file = readdir($this->dirHandle)) { - $this->currentFile = new \SplFileInfo($this->filePrefix . $file); - } else { - $this->currentFile = false; - } - - $this->key++; - } - - public function key() - { - return $this->key; - } - - public function valid() - { - return $this->currentFile !== false; - } -} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Model/Acp.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Model/Acp.php deleted file mode 100644 index 6c19f668400..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Model/Acp.php +++ /dev/null @@ -1,243 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Model; - -use Aws\Common\Exception\InvalidArgumentException; -use Aws\Common\Exception\OverflowException; -use Guzzle\Common\ToArrayInterface; -use Guzzle\Service\Command\AbstractCommand; - -/** - * Amazon S3 Access Control Policy (ACP) - */ -class Acp implements ToArrayInterface, \IteratorAggregate, \Countable -{ - /** - * @var \SplObjectStorage List of grants on the ACP - */ - protected $grants = array(); - - /** - * @var Grantee The owner of the ACP - */ - protected $owner; - - /** - * Constructs an ACP - * - * @param Grantee $owner ACP policy owner - * @param array|\Traversable $grants List of grants for the ACP - */ - public function __construct(Grantee $owner, $grants = null) - { - $this->setOwner($owner); - $this->setGrants($grants); - } - - /** - * Create an Acp object from an array. This can be used to create an ACP from a response to a GetObject/Bucket ACL - * operation. - * - * @param array $data Array of ACP data - * - * @return Acp - */ - public static function fromArray(array $data) - { - $builder = new AcpBuilder(); - $builder->setOwner((string) $data['Owner']['ID'], $data['Owner']['DisplayName']); - - // Add each Grantee to the ACP - foreach ($data['Grants'] as $grant) { - $permission = $grant['Permission']; - - // Determine the type for response bodies that are missing the Type parameter - if (!isset($grant['Grantee']['Type'])) { - if (isset($grant['Grantee']['ID'])) { - $grant['Grantee']['Type'] = 'CanonicalUser'; - } elseif (isset($grant['Grantee']['URI'])) { - $grant['Grantee']['Type'] = 'Group'; - } else { - $grant['Grantee']['Type'] = 'AmazonCustomerByEmail'; - } - } - - switch ($grant['Grantee']['Type']) { - case 'Group': - $builder->addGrantForGroup($permission, $grant['Grantee']['URI']); - break; - case 'AmazonCustomerByEmail': - $builder->addGrantForEmail($permission, $grant['Grantee']['EmailAddress']); - break; - case 'CanonicalUser': - $builder->addGrantForUser( - $permission, - $grant['Grantee']['ID'], - $grant['Grantee']['DisplayName'] - ); - } - } - - return $builder->build(); - } - - /** - * Set the owner of the ACP policy - * - * @param Grantee $owner ACP policy owner - * - * @return $this - * - * @throws InvalidArgumentException if the grantee does not have an ID set - */ - public function setOwner(Grantee $owner) - { - if (!$owner->isCanonicalUser()) { - throw new InvalidArgumentException('The owner must have an ID set.'); - } - - $this->owner = $owner; - - return $this; - } - - /** - * Get the owner of the ACP policy - * - * @return Grantee - */ - public function getOwner() - { - return $this->owner; - } - - /** - * Set the grants for the ACP - * - * @param array|\Traversable $grants List of grants for the ACP - * - * @return $this - * - * @throws InvalidArgumentException - */ - public function setGrants($grants = array()) - { - $this->grants = new \SplObjectStorage(); - - if ($grants) { - if (is_array($grants) || $grants instanceof \Traversable) { - /** @var $grant Grant */ - foreach ($grants as $grant) { - $this->addGrant($grant); - } - } else { - throw new InvalidArgumentException('Grants must be passed in as an array or Traversable object.'); - } - } - - return $this; - } - - /** - * Get all of the grants - * - * @return \SplObjectStorage - */ - public function getGrants() - { - return $this->grants; - } - - /** - * Add a Grant - * - * @param Grant $grant Grant to add - * - * @return $this - */ - public function addGrant(Grant $grant) - { - if (count($this->grants) < 100) { - $this->grants->attach($grant); - } else { - throw new OverflowException('An ACP may contain up to 100 grants.'); - } - - return $this; - } - - /** - * Get the total number of attributes - * - * @return int - */ - public function count() - { - return count($this->grants); - } - - /** - * Returns the grants for iteration - * - * @return \SplObjectStorage - */ - public function getIterator() - { - return $this->grants; - } - - /** - * Applies grant headers to a command's parameters - * - * @param AbstractCommand $command Command to be updated - * - * @return $this - */ - public function updateCommand(AbstractCommand $command) - { - $parameters = array(); - foreach ($this->grants as $grant) { - /** @var $grant Grant */ - $parameters = array_merge_recursive($parameters, $grant->getParameterArray()); - } - - foreach ($parameters as $name => $values) { - $command->set($name, implode(', ', (array) $values)); - } - - return $this; - } - - /** - * {@inheritdoc} - */ - public function toArray() - { - $grants = array(); - foreach ($this->grants as $grant) { - $grants[] = $grant->toArray(); - } - - return array( - 'Owner' => array( - 'ID' => $this->owner->getId(), - 'DisplayName' => $this->owner->getDisplayName() - ), - 'Grants' => $grants - ); - } -} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Model/AcpBuilder.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Model/AcpBuilder.php deleted file mode 100644 index b6d1be72167..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Model/AcpBuilder.php +++ /dev/null @@ -1,134 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Model; - -use Aws\S3\Enum\GranteeType; - -/** - * Builder for creating Access Control Policies - */ -class AcpBuilder -{ - /** - * @var Grantee The owner for the ACL - */ - protected $owner; - - /** - * @var array An array of Grant objects for the ACL - */ - protected $grants = array(); - - /** - * Static method for chainable instantiation - * - * @return static - */ - public static function newInstance() - { - return new static; - } - - /** - * Sets the owner to be set on the ACL - * - * @param string $id Owner identifier - * @param string $displayName Owner display name - * - * @return $this - */ - public function setOwner($id, $displayName = null) - { - $this->owner = new Grantee($id, $displayName ?: $id, GranteeType::USER); - - return $this; - } - - /** - * Create and store a Grant with a CanonicalUser Grantee for the ACL - * - * @param string $permission Permission for the Grant - * @param string $id Grantee identifier - * @param string $displayName Grantee display name - * - * @return $this - */ - public function addGrantForUser($permission, $id, $displayName = null) - { - $grantee = new Grantee($id, $displayName ?: $id, GranteeType::USER); - $this->addGrant($permission, $grantee); - - return $this; - } - - /** - * Create and store a Grant with a AmazonCustomerByEmail Grantee for the ACL - * - * @param string $permission Permission for the Grant - * @param string $email Grantee email address - * - * @return $this - */ - public function addGrantForEmail($permission, $email) - { - $grantee = new Grantee($email, null, GranteeType::EMAIL); - $this->addGrant($permission, $grantee); - - return $this; - } - - /** - * Create and store a Grant with a Group Grantee for the ACL - * - * @param string $permission Permission for the Grant - * @param string $group Grantee group - * - * @return $this - */ - public function addGrantForGroup($permission, $group) - { - $grantee = new Grantee($group, null, GranteeType::GROUP); - $this->addGrant($permission, $grantee); - - return $this; - } - - /** - * Create and store a Grant for the ACL - * - * @param string $permission Permission for the Grant - * @param Grantee $grantee The Grantee for the Grant - * - * @return $this - */ - public function addGrant($permission, Grantee $grantee) - { - $this->grants[] = new Grant($grantee, $permission); - - return $this; - } - - /** - * Builds the ACP and returns it - * - * @return Acp - */ - public function build() - { - return new Acp($this->owner, $this->grants); - } -} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Model/ClearBucket.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Model/ClearBucket.php deleted file mode 100644 index 09982d8ae7d..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Model/ClearBucket.php +++ /dev/null @@ -1,189 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Model; - -use Aws\Common\Client\AwsClientInterface; -use Guzzle\Common\AbstractHasDispatcher; -use Guzzle\Batch\FlushingBatch; -use Guzzle\Batch\ExceptionBufferingBatch; -use Guzzle\Batch\NotifyingBatch; -use Guzzle\Common\Exception\ExceptionCollection; - -/** - * Class used to clear the contents of a bucket or the results of an iterator - */ -class ClearBucket extends AbstractHasDispatcher -{ - /** - * @var string Event emitted when a batch request has completed - */ - const AFTER_DELETE = 'clear_bucket.after_delete'; - - /** - * @var string Event emitted before the bucket is cleared - */ - const BEFORE_CLEAR = 'clear_bucket.before_clear'; - - /** - * @var string Event emitted after the bucket is cleared - */ - const AFTER_CLEAR = 'clear_bucket.after_clear'; - - /** - * @var AwsClientInterface Client used to execute the requests - */ - protected $client; - - /** - * @var AbstractS3ResourceIterator Iterator used to yield keys - */ - protected $iterator; - - /** - * @var string MFA used with each request - */ - protected $mfa; - - /** - * @param AwsClientInterface $client Client used to execute requests - * @param string $bucket Name of the bucket to clear - */ - public function __construct(AwsClientInterface $client, $bucket) - { - $this->client = $client; - $this->bucket = $bucket; - } - - /** - * {@inheritdoc} - */ - public static function getAllEvents() - { - return array(self::AFTER_DELETE, self::BEFORE_CLEAR, self::AFTER_CLEAR); - } - - /** - * Set the bucket that is to be cleared - * - * @param string $bucket Name of the bucket to clear - * - * @return $this - */ - public function setBucket($bucket) - { - $this->bucket = $bucket; - - return $this; - } - - /** - * Get the iterator used to yield the keys to be deleted. A default iterator - * will be created and returned if no iterator has been explicitly set. - * - * @return \Iterator - */ - public function getIterator() - { - if (!$this->iterator) { - $this->iterator = $this->client->getIterator('ListObjectVersions', array( - 'Bucket' => $this->bucket - )); - } - - return $this->iterator; - } - - /** - * Sets a different iterator to use than the default iterator. This can be helpful when you wish to delete - * only specific keys from a bucket (e.g. keys that match a certain prefix or delimiter, or perhaps keys that - * pass through a filtered, decorated iterator). - * - * @param \Iterator $iterator Iterator used to yield the keys to be deleted - * - * @return $this - */ - public function setIterator(\Iterator $iterator) - { - $this->iterator = $iterator; - - return $this; - } - - /** - * Set the MFA token to send with each request - * - * @param string $mfa MFA token to send with each request. The value is the concatenation of the authentication - * device's serial number, a space, and the value displayed on your authentication device. - * - * @return $this - */ - public function setMfa($mfa) - { - $this->mfa = $mfa; - - return $this; - } - - /** - * Clear the bucket - * - * @return int Returns the number of deleted keys - * @throws ExceptionCollection - */ - public function clear() - { - $that = $this; - $batch = DeleteObjectsBatch::factory($this->client, $this->bucket, $this->mfa); - $batch = new NotifyingBatch($batch, function ($items) use ($that) { - $that->dispatch(ClearBucket::AFTER_DELETE, array('keys' => $items)); - }); - $batch = new FlushingBatch(new ExceptionBufferingBatch($batch), 1000); - - // Let any listeners know that the bucket is about to be cleared - $this->dispatch(self::BEFORE_CLEAR, array( - 'iterator' => $this->getIterator(), - 'batch' => $batch, - 'mfa' => $this->mfa - )); - - $deleted = 0; - foreach ($this->getIterator() as $object) { - if (isset($object['VersionId'])) { - $versionId = $object['VersionId'] == 'null' ? null : $object['VersionId']; - } else { - $versionId = null; - } - $batch->addKey($object['Key'], $versionId); - $deleted++; - } - $batch->flush(); - - // If any errors were encountered, then throw an ExceptionCollection - if (count($batch->getExceptions())) { - $e = new ExceptionCollection(); - foreach ($batch->getExceptions() as $exception) { - $e->add($exception->getPrevious()); - } - throw $e; - } - - // Let any listeners know that the bucket was cleared - $this->dispatch(self::AFTER_CLEAR, array('deleted' => $deleted)); - - return $deleted; - } -} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Model/DeleteObjectsBatch.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Model/DeleteObjectsBatch.php deleted file mode 100644 index ab6425bbb87..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Model/DeleteObjectsBatch.php +++ /dev/null @@ -1,87 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Model; - -use Aws\Common\Client\AwsClientInterface; -use Aws\Common\Exception\InvalidArgumentException; -use Guzzle\Service\Command\AbstractCommand; -use Guzzle\Batch\BatchBuilder; -use Guzzle\Batch\BatchSizeDivisor; -use Guzzle\Batch\AbstractBatchDecorator; - -/** - * The DeleteObjectsBatch is a BatchDecorator for Guzzle that implements a - * queue for deleting keys from an Amazon S3 bucket. You can add DeleteObject - * or an array of [Key => %s, VersionId => %s] and call flush when the objects - * should be deleted. - */ -class DeleteObjectsBatch extends AbstractBatchDecorator -{ - /** - * Factory for creating a DeleteObjectsBatch - * - * @param AwsClientInterface $client Client used to transfer requests - * @param string $bucket Bucket that contains the objects to delete - * @param string $mfa MFA token to use with the request - * - * @return static - */ - public static function factory(AwsClientInterface $client, $bucket, $mfa = null) - { - $batch = BatchBuilder::factory() - ->createBatchesWith(new BatchSizeDivisor(1000)) - ->transferWith(new DeleteObjectsTransfer($client, $bucket, $mfa)) - ->build(); - - return new static($batch); - } - - /** - * Add an object to be deleted - * - * @param string $key Key of the object - * @param string $versionId VersionID of the object - * - * @return $this - */ - public function addKey($key, $versionId = null) - { - return $this->add(array( - 'Key' => $key, - 'VersionId' => $versionId - )); - } - - /** - * {@inheritdoc} - */ - public function add($item) - { - if ($item instanceof AbstractCommand && $item->getName() == 'DeleteObject') { - $item = array( - 'Key' => $item['Key'], - 'VersionId' => $item['VersionId'] - ); - } - - if (!is_array($item) || (!isset($item['Key']))) { - throw new InvalidArgumentException('Item must be a DeleteObject command or array containing a Key and VersionId key.'); - } - - return parent::add($item); - } -} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Model/DeleteObjectsTransfer.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Model/DeleteObjectsTransfer.php deleted file mode 100644 index 5918ff18ff7..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Model/DeleteObjectsTransfer.php +++ /dev/null @@ -1,133 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Model; - -use Aws\Common\Client\AwsClientInterface; -use Aws\Common\Exception\OverflowException; -use Aws\Common\Enum\UaString as Ua; -use Aws\S3\Exception\InvalidArgumentException; -use Aws\S3\Exception\DeleteMultipleObjectsException; -use Guzzle\Batch\BatchTransferInterface; -use Guzzle\Service\Command\CommandInterface; - -/** - * Transfer logic for deleting multiple objects from an Amazon S3 bucket in a - * single request - */ -class DeleteObjectsTransfer implements BatchTransferInterface -{ - /** - * @var AwsClientInterface The Amazon S3 client for doing transfers - */ - protected $client; - - /** - * @var string Bucket from which to delete the objects - */ - protected $bucket; - - /** - * @var string MFA token to apply to the request - */ - protected $mfa; - - /** - * Constructs a transfer using the injected client - * - * @param AwsClientInterface $client Client used to transfer the requests - * @param string $bucket Name of the bucket that stores the objects - * @param string $mfa MFA token used when contacting the Amazon S3 API - */ - public function __construct(AwsClientInterface $client, $bucket, $mfa = null) - { - $this->client = $client; - $this->bucket = $bucket; - $this->mfa = $mfa; - } - - /** - * Set a new MFA token value - * - * @param string $token MFA token - * - * @return $this - */ - public function setMfa($token) - { - $this->mfa = $token; - - return $this; - } - - /** - * {@inheritdoc} - * @throws OverflowException if a batch has more than 1000 items - * @throws InvalidArgumentException when an invalid batch item is encountered - */ - public function transfer(array $batch) - { - if (empty($batch)) { - return; - } - - if (count($batch) > 1000) { - throw new OverflowException('Batches should be divided into chunks of no larger than 1000 keys'); - } - - $del = array(); - $command = $this->client->getCommand('DeleteObjects', array( - 'Bucket' => $this->bucket, - Ua::OPTION => Ua::BATCH - )); - - if ($this->mfa) { - $command->getRequestHeaders()->set('x-amz-mfa', $this->mfa); - } - - foreach ($batch as $object) { - // Ensure that the batch item is valid - if (!is_array($object) || !isset($object['Key'])) { - throw new InvalidArgumentException('Invalid batch item encountered: ' . var_export($batch, true)); - } - $del[] = array( - 'Key' => $object['Key'], - 'VersionId' => isset($object['VersionId']) ? $object['VersionId'] : null - ); - } - - $command['Objects'] = $del; - - $command->execute(); - $this->processResponse($command); - } - - /** - * Process the response of the DeleteMultipleObjects request - * - * @paramCommandInterface $command Command executed - */ - protected function processResponse(CommandInterface $command) - { - $result = $command->getResult(); - - // Ensure that the objects were deleted successfully - if (!empty($result['Errors'])) { - $errors = $result['Errors']; - throw new DeleteMultipleObjectsException($errors); - } - } -} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Model/Grant.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Model/Grant.php deleted file mode 100644 index 2e35f059511..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Model/Grant.php +++ /dev/null @@ -1,139 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Model; - -use Aws\S3\Enum\Permission; -use Aws\Common\Exception\InvalidArgumentException; -use Guzzle\Common\ToArrayInterface; - -/** - * Amazon S3 Grant model - */ -class Grant implements ToArrayInterface -{ - /** - * @var array A map of permissions to operation parameters - */ - protected static $parameterMap = array( - Permission::READ => 'GrantRead', - Permission::WRITE => 'GrantWrite', - Permission::READ_ACP => 'GrantReadACP', - Permission::WRITE_ACP => 'GrantWriteACP', - Permission::FULL_CONTROL => 'GrantFullControl' - ); - - /** - * @var Grantee The grantee affected by the grant - */ - protected $grantee; - - /** - * @var string The permission set by the grant - */ - protected $permission; - - /** - * Constructs an ACL - * - * @param Grantee $grantee Affected grantee - * @param string $permission Permission applied - */ - public function __construct(Grantee $grantee, $permission) - { - $this->setGrantee($grantee); - $this->setPermission($permission); - } - - /** - * Set the grantee affected by the grant - * - * @param Grantee $grantee Affected grantee - * - * @return $this - */ - public function setGrantee(Grantee $grantee) - { - $this->grantee = $grantee; - - return $this; - } - - /** - * Get the grantee affected by the grant - * - * @return Grantee - */ - public function getGrantee() - { - return $this->grantee; - } - - /** - * Set the permission set by the grant - * - * @param string $permission Permission applied - * - * @return $this - * - * @throws InvalidArgumentException - */ - public function setPermission($permission) - { - $valid = Permission::values(); - if (!in_array($permission, $valid)) { - throw new InvalidArgumentException('The permission must be one of ' - . 'the following: ' . implode(', ', $valid) . '.'); - } - - $this->permission = $permission; - - return $this; - } - - /** - * Get the permission set by the grant - * - * @return string - */ - public function getPermission() - { - return $this->permission; - } - - /** - * Returns an array of the operation parameter and value to set on the operation - * - * @return array - */ - public function getParameterArray() - { - return array( - self::$parameterMap[$this->permission] => $this->grantee->getHeaderValue() - ); - } - - /** - * {@inheritdoc} - */ - public function toArray() - { - return array( - 'Grantee' => $this->grantee->toArray(), - 'Permission' => $this->permission - ); - } -} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Model/Grantee.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Model/Grantee.php deleted file mode 100644 index 7634b84a350..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Model/Grantee.php +++ /dev/null @@ -1,245 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Model; - -use Aws\S3\Enum\Group; -use Aws\S3\Enum\GranteeType; -use Aws\Common\Exception\InvalidArgumentException; -use Aws\Common\Exception\UnexpectedValueException; -use Aws\Common\Exception\LogicException; -use Guzzle\Common\ToArrayInterface; - -/** - * Amazon S3 Grantee model - */ -class Grantee implements ToArrayInterface -{ - /** - * @var array A map of grantee types to grant header value prefixes - */ - protected static $headerMap = array( - GranteeType::USER => 'id', - GranteeType::EMAIL => 'emailAddress', - GranteeType::GROUP => 'uri' - ); - - /** - * @var string The account ID, email, or URL identifying the grantee - */ - protected $id; - - /** - * @var string The display name of the grantee - */ - protected $displayName; - - /** - * @var string The type of the grantee (CanonicalUser or Group) - */ - protected $type; - - /** - * Constructs a Grantee - * - * @param string $id Grantee identifier - * @param string $displayName Grantee display name - * @param string $expectedType The expected type of the grantee - */ - public function __construct($id, $displayName = null, $expectedType = null) - { - $this->type = GranteeType::USER; - $this->setId($id, $expectedType); - $this->setDisplayName($displayName); - } - - /** - * Sets the account ID, email, or URL identifying the grantee - * - * @param string $id Grantee identifier - * @param string $expectedType The expected type of the grantee - * - * @return Grantee - * - * @throws UnexpectedValueException if $expectedType is set and the grantee - * is not of that type after instantiation - * @throws InvalidArgumentException when the ID provided is not a string - */ - public function setId($id, $expectedType = null) - { - if (in_array($id, Group::values())) { - $this->type = GranteeType::GROUP; - } elseif (!is_string($id)) { - throw new InvalidArgumentException('The grantee ID must be provided as a string value.'); - } - - if (strpos($id, '@') !== false) { - $this->type = GranteeType::EMAIL; - } - - if ($expectedType && $expectedType !== $this->type) { - throw new UnexpectedValueException('The type of the grantee after ' - . 'setting the ID did not match the specified, expected type "' - . $expectedType . '" but received "' . $this->type . '".'); - } - - $this->id = $id; - - return $this; - } - - /** - * Gets the grantee identifier - * - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * Gets the grantee email address (if it is set) - * - * @return null|string - */ - public function getEmailAddress() - { - return $this->isAmazonCustomerByEmail() ? $this->id : null; - } - - /** - * Gets the grantee URI (if it is set) - * - * @return null|string - */ - public function getGroupUri() - { - return $this->isGroup() ? $this->id : null; - } - - /** - * Sets the display name of the grantee - * - * @param string $displayName Grantee name - * - * @return Grantee - * - * @throws LogicException when the grantee type not CanonicalUser - */ - public function setDisplayName($displayName) - { - if ($this->type === GranteeType::USER) { - if (empty($displayName) || !is_string($displayName)) { - $displayName = $this->id; - } - $this->displayName = $displayName; - } else { - if ($displayName) { - throw new LogicException('The display name can only be set ' - . 'for grantees specified by ID.'); - } - } - - return $this; - } - - /** - * Gets the grantee display name - * - * @return string - */ - public function getDisplayName() - { - return $this->displayName; - } - - /** - * Gets the grantee type (determined by ID) - * - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * Returns true if this grantee object represents a canonical user by ID - * - * @return bool - */ - public function isCanonicalUser() - { - return ($this->type === GranteeType::USER); - } - - /** - * Returns true if this grantee object represents a customer by email - * - * @return bool - */ - public function isAmazonCustomerByEmail() - { - return ($this->type === GranteeType::EMAIL); - } - - /** - * Returns true if this grantee object represents a group by URL - * - * @return bool - */ - public function isGroup() - { - return ($this->type === GranteeType::GROUP); - } - - /** - * Returns the value used in headers to specify this grantee - * - * @return string - */ - public function getHeaderValue() - { - $key = static::$headerMap[$this->type]; - - return "{$key}=\"{$this->id}\""; - } - - /** - * {@inheritdoc} - */ - public function toArray() - { - $result = array( - 'Type' => $this->type - ); - - switch ($this->type) { - case GranteeType::USER: - $result['ID'] = $this->id; - $result['DisplayName'] = $this->displayName; - break; - case GranteeType::EMAIL: - $result['EmailAddress'] = $this->id; - break; - case GranteeType::GROUP: - $result['URI'] = $this->id; - } - - return $result; - } -} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Model/MultipartUpload/AbstractTransfer.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Model/MultipartUpload/AbstractTransfer.php deleted file mode 100644 index c48232d492f..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Model/MultipartUpload/AbstractTransfer.php +++ /dev/null @@ -1,103 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Model\MultipartUpload; - -use Aws\Common\Enum\UaString as Ua; -use Aws\Common\Exception\RuntimeException; -use Aws\Common\Model\MultipartUpload\AbstractTransfer as CommonAbstractTransfer; -use Guzzle\Service\Command\OperationCommand; - -/** - * Abstract class for transfer commonalities - */ -abstract class AbstractTransfer extends CommonAbstractTransfer -{ - // An S3 upload part can be anywhere from 5 MB to 5 GB, but you can only have 10000 parts per upload - const MIN_PART_SIZE = 5242880; - const MAX_PART_SIZE = 5368709120; - const MAX_PARTS = 10000; - - /** - * {@inheritdoc} - * @throws RuntimeException if the part size can not be calculated from the provided data - */ - protected function init() - { - // Merge provided options onto the default option values - $this->options = array_replace(array( - 'min_part_size' => self::MIN_PART_SIZE, - 'part_md5' => true - ), $this->options); - - // Make sure the part size can be calculated somehow - if (!$this->options['min_part_size'] && !$this->source->getContentLength()) { - throw new RuntimeException('The ContentLength of the data source could not be determined, and no ' - . 'min_part_size option was provided'); - } - } - - /** - * {@inheritdoc} - */ - protected function calculatePartSize() - { - $partSize = $this->source->getContentLength() - ? (int) ceil(($this->source->getContentLength() / self::MAX_PARTS)) - : self::MIN_PART_SIZE; - $partSize = max($this->options['min_part_size'], $partSize); - $partSize = min($partSize, self::MAX_PART_SIZE); - $partSize = max($partSize, self::MIN_PART_SIZE); - - return $partSize; - } - - /** - * {@inheritdoc} - */ - protected function complete() - { - /** @var $part UploadPart */ - $parts = array(); - foreach ($this->state as $part) { - $parts[] = array( - 'PartNumber' => $part->getPartNumber(), - 'ETag' => $part->getETag(), - ); - } - - $params = $this->state->getUploadId()->toParams(); - $params[Ua::OPTION] = Ua::MULTIPART_UPLOAD; - $params['Parts'] = $parts; - $command = $this->client->getCommand('CompleteMultipartUpload', $params); - - return $command->getResult(); - } - - /** - * {@inheritdoc} - */ - protected function getAbortCommand() - { - $params = $this->state->getUploadId()->toParams(); - $params[Ua::OPTION] = Ua::MULTIPART_UPLOAD; - - /** @var $command OperationCommand */ - $command = $this->client->getCommand('AbortMultipartUpload', $params); - - return $command; - } -} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Model/MultipartUpload/ParallelTransfer.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Model/MultipartUpload/ParallelTransfer.php deleted file mode 100644 index caa9e888331..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Model/MultipartUpload/ParallelTransfer.php +++ /dev/null @@ -1,124 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Model\MultipartUpload; - -use Aws\Common\Exception\RuntimeException; -use Aws\Common\Enum\DateFormat; -use Aws\Common\Enum\UaString as Ua; -use Guzzle\Http\EntityBody; -use Guzzle\Http\ReadLimitEntityBody; - -/** - * Transfers multipart upload parts in parallel - */ -class ParallelTransfer extends AbstractTransfer -{ - /** - * {@inheritdoc} - */ - protected function init() - { - parent::init(); - - if (!$this->source->isLocal() || $this->source->getWrapper() != 'plainfile') { - throw new RuntimeException('The source data must be a local file stream when uploading in parallel.'); - } - - if (empty($this->options['concurrency'])) { - throw new RuntimeException('The `concurrency` option must be specified when instantiating.'); - } - } - - /** - * {@inheritdoc} - */ - protected function transfer() - { - $totalParts = (int) ceil($this->source->getContentLength() / $this->partSize); - $concurrency = min($totalParts, $this->options['concurrency']); - $partsToSend = $this->prepareParts($concurrency); - $eventData = $this->getEventData(); - - while (!$this->stopped && count($this->state) < $totalParts) { - - $currentTotal = count($this->state); - $commands = array(); - - for ($i = 0; $i < $concurrency && $i + $currentTotal < $totalParts; $i++) { - - // Move the offset to the correct position - $partsToSend[$i]->setOffset(($currentTotal + $i) * $this->partSize); - - // @codeCoverageIgnoreStart - if ($partsToSend[$i]->getContentLength() == 0) { - break; - } - // @codeCoverageIgnoreEnd - - $params = $this->state->getUploadId()->toParams(); - $eventData['command'] = $this->client->getCommand('UploadPart', array_replace($params, array( - 'PartNumber' => count($this->state) + 1 + $i, - 'Body' => $partsToSend[$i], - 'ContentMD5' => (bool) $this->options['part_md5'], - Ua::OPTION => Ua::MULTIPART_UPLOAD - ))); - $commands[] = $eventData['command']; - // Notify any listeners of the part upload - $this->dispatch(self::BEFORE_PART_UPLOAD, $eventData); - } - - // Allow listeners to stop the transfer if needed - if ($this->stopped) { - break; - } - - // Execute each command, iterate over the results, and add to the transfer state - /** @var $command \Guzzle\Service\Command\OperationCommand */ - foreach ($this->client->execute($commands) as $command) { - $this->state->addPart(UploadPart::fromArray(array( - 'PartNumber' => count($this->state) + 1, - 'ETag' => $command->getResponse()->getEtag(), - 'Size' => (int) $command->getResponse()->getContentLength(), - 'LastModified' => gmdate(DateFormat::RFC2822) - ))); - $eventData['command'] = $command; - // Notify any listeners the the part was uploaded - $this->dispatch(self::AFTER_PART_UPLOAD, $eventData); - } - } - } - - /** - * Prepare the entity body handles to use while transferring - * - * @param int $concurrency Number of parts to prepare - * - * @return array Parts to send - */ - protected function prepareParts($concurrency) - { - $url = $this->source->getUri(); - // Use the source EntityBody as the first part - $parts = array(new ReadLimitEntityBody($this->source, $this->partSize)); - // Open EntityBody handles for each part to upload in parallel - for ($i = 1; $i < $concurrency; $i++) { - $parts[] = new ReadLimitEntityBody(new EntityBody(fopen($url, 'r')), $this->partSize); - } - - return $parts; - } -} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Model/MultipartUpload/SerialTransfer.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Model/MultipartUpload/SerialTransfer.php deleted file mode 100644 index 4a5953f5b24..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Model/MultipartUpload/SerialTransfer.php +++ /dev/null @@ -1,86 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Model\MultipartUpload; - -use Aws\Common\Enum\DateFormat; -use Aws\Common\Enum\Size; -use Aws\Common\Enum\UaString as Ua; -use Guzzle\Http\EntityBody; -use Guzzle\Http\ReadLimitEntityBody; - -/** - * Transfers multipart upload parts serially - */ -class SerialTransfer extends AbstractTransfer -{ - /** - * {@inheritdoc} - */ - protected function transfer() - { - while (!$this->stopped && !$this->source->isConsumed()) { - - if ($this->source->getContentLength() && $this->source->isSeekable()) { - // If the stream is seekable and the Content-Length known, then stream from the data source - $body = new ReadLimitEntityBody($this->source, $this->partSize, $this->source->ftell()); - } else { - // We need to read the data source into a temporary buffer before streaming - $body = EntityBody::factory(); - while ($body->getContentLength() < $this->partSize - && $body->write( - $this->source->read(max(1, min(10 * Size::KB, $this->partSize - $body->getContentLength()))) - )); - } - - // @codeCoverageIgnoreStart - if ($body->getContentLength() == 0) { - break; - } - // @codeCoverageIgnoreEnd - - $params = $this->state->getUploadId()->toParams(); - $command = $this->client->getCommand('UploadPart', array_replace($params, array( - 'PartNumber' => count($this->state) + 1, - 'Body' => $body, - 'ContentMD5' => (bool) $this->options['part_md5'], - Ua::OPTION => Ua::MULTIPART_UPLOAD - ))); - - // Notify observers that the part is about to be uploaded - $eventData = $this->getEventData(); - $eventData['command'] = $command; - $this->dispatch(self::BEFORE_PART_UPLOAD, $eventData); - - // Allow listeners to stop the transfer if needed - if ($this->stopped) { - break; - } - - $response = $command->getResponse(); - - $this->state->addPart(UploadPart::fromArray(array( - 'PartNumber' => count($this->state) + 1, - 'ETag' => $response->getEtag(), - 'Size' => $body->getContentLength(), - 'LastModified' => gmdate(DateFormat::RFC2822) - ))); - - // Notify observers that the part was uploaded - $this->dispatch(self::AFTER_PART_UPLOAD, $eventData); - } - } -} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Model/MultipartUpload/TransferState.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Model/MultipartUpload/TransferState.php deleted file mode 100644 index c63663fd648..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Model/MultipartUpload/TransferState.php +++ /dev/null @@ -1,41 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Model\MultipartUpload; - -use Aws\Common\Client\AwsClientInterface; -use Aws\Common\Model\MultipartUpload\AbstractTransferState; -use Aws\Common\Model\MultipartUpload\UploadIdInterface; - -/** - * State of a multipart upload - */ -class TransferState extends AbstractTransferState -{ - /** - * {@inheritdoc} - */ - public static function fromUploadId(AwsClientInterface $client, UploadIdInterface $uploadId) - { - $transferState = new self($uploadId); - - foreach ($client->getIterator('ListParts', $uploadId->toParams()) as $part) { - $transferState->addPart(UploadPart::fromArray($part)); - } - - return $transferState; - } -} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Model/MultipartUpload/UploadBuilder.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Model/MultipartUpload/UploadBuilder.php deleted file mode 100644 index e30f23a36cf..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Model/MultipartUpload/UploadBuilder.php +++ /dev/null @@ -1,297 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Model\MultipartUpload; - -use Aws\Common\Enum\UaString as Ua; -use Aws\Common\Exception\InvalidArgumentException; -use Aws\Common\Model\MultipartUpload\AbstractUploadBuilder; -use Aws\S3\Model\Acp; - -/** - * Easily create a multipart uploader used to quickly and reliably upload a - * large file or data stream to Amazon S3 using multipart uploads - */ -class UploadBuilder extends AbstractUploadBuilder -{ - /** - * @var int Concurrency level to transfer the parts - */ - protected $concurrency = 1; - - /** - * @var int Minimum part size to upload - */ - protected $minPartSize = AbstractTransfer::MIN_PART_SIZE; - - /** - * @var string MD5 hash of the entire body to transfer - */ - protected $md5; - - /** - * @var bool Whether or not to calculate the entire MD5 hash of the object - */ - protected $calculateEntireMd5 = false; - - /** - * @var bool Whether or not to calculate MD5 hash of each part - */ - protected $calculatePartMd5 = true; - - /** - * @var array Array of initiate command options - */ - protected $commandOptions = array(); - - /** - * @var array Array of transfer options - */ - protected $transferOptions = array(); - - /** - * Set the bucket to upload the object to - * - * @param string $bucket Name of the bucket - * - * @return $this - */ - public function setBucket($bucket) - { - return $this->setOption('Bucket', $bucket); - } - - /** - * Set the key of the object - * - * @param string $key Key of the object to upload - * - * @return $this - */ - public function setKey($key) - { - return $this->setOption('Key', $key); - } - - /** - * Set the minimum acceptable part size - * - * @param int $minSize Minimum acceptable part size in bytes - * - * @return $this - */ - public function setMinPartSize($minSize) - { - $this->minPartSize = (int) max((int) $minSize, AbstractTransfer::MIN_PART_SIZE); - - return $this; - } - - /** - * Set the concurrency level to use when uploading parts. This affects how - * many parts are uploaded in parallel. You must use a local file as your - * data source when using a concurrency greater than 1 - * - * @param int $concurrency Concurrency level - * - * @return $this - */ - public function setConcurrency($concurrency) - { - $this->concurrency = $concurrency; - - return $this; - } - - /** - * Explicitly set the MD5 hash of the entire body - * - * @param string $md5 MD5 hash of the entire body - * - * @return $this - */ - public function setMd5($md5) - { - $this->md5 = $md5; - - return $this; - } - - /** - * Set to true to have the builder calculate the MD5 hash of the entire data - * source before initiating a multipart upload (this could be an expensive - * operation). This setting can ony be used with seekable data sources. - * - * @param bool $calculateMd5 Set to true to calculate the MD5 hash of the body - * - * @return $this - */ - public function calculateMd5($calculateMd5) - { - $this->calculateEntireMd5 = (bool) $calculateMd5; - - return $this; - } - - /** - * Specify whether or not to calculate the MD5 hash of each uploaded part. - * This setting defaults to true. - * - * @param bool $usePartMd5 Set to true to calculate the MD5 has of each part - * - * @return $this - */ - public function calculatePartMd5($usePartMd5) - { - $this->calculatePartMd5 = (bool) $usePartMd5; - - return $this; - } - - /** - * Set the ACP to use on the object - * - * @param Acp $acp ACP to set on the object - * - * @return $this - */ - public function setAcp(Acp $acp) - { - return $this->setOption('ACP', $acp); - } - - /** - * Set an option to pass to the initial CreateMultipartUpload operation - * - * @param string $name Option name - * @param string $value Option value - * - * @return $this - */ - public function setOption($name, $value) - { - $this->commandOptions[$name] = $value; - - return $this; - } - - /** - * Add an array of options to pass to the initial CreateMultipartUpload operation - * - * @param array $options Array of CreateMultipartUpload operation parameters - * - * @return $this - */ - public function addOptions(array $options) - { - $this->commandOptions = array_replace($this->commandOptions, $options); - - return $this; - } - - /** - * Set an array of transfer options to apply to the upload transfer object - * - * @param array $options Transfer options - * - * @return $this - */ - public function setTransferOptions(array $options) - { - $this->transferOptions = $options; - - return $this; - } - - /** - * {@inheritdoc} - * @throws InvalidArgumentException when attempting to resume a transfer using a non-seekable stream - * @throws InvalidArgumentException when missing required properties (bucket, key, client, source) - */ - public function build() - { - if ($this->state instanceof TransferState) { - $this->commandOptions = array_replace($this->commandOptions, $this->state->getUploadId()->toParams()); - } - - if (!isset($this->commandOptions['Bucket']) || !isset($this->commandOptions['Key']) - || !$this->client || !$this->source - ) { - throw new InvalidArgumentException('You must specify a Bucket, Key, client, and source.'); - } - - if ($this->state && !$this->source->isSeekable()) { - throw new InvalidArgumentException('You cannot resume a transfer using a non-seekable source.'); - } - - // If no state was set, then create one by initiating or loading a multipart upload - if (is_string($this->state)) { - $this->state = TransferState::fromUploadId($this->client, UploadId::fromParams(array( - 'Bucket' => $this->commandOptions['Bucket'], - 'Key' => $this->commandOptions['Key'], - 'UploadId' => $this->state - ))); - } elseif (!$this->state) { - $this->state = $this->initiateMultipartUpload(); - } - - $options = array_replace(array( - 'min_part_size' => $this->minPartSize, - 'part_md5' => (bool) $this->calculatePartMd5, - 'concurrency' => $this->concurrency - ), $this->transferOptions); - - return $this->concurrency > 1 - ? new ParallelTransfer($this->client, $this->state, $this->source, $options) - : new SerialTransfer($this->client, $this->state, $this->source, $options); - } - - /** - * {@inheritdoc} - */ - protected function initiateMultipartUpload() - { - // Determine Content-Type - if (!isset($this->commandOptions['ContentType'])) { - if ($mimeType = $this->source->getContentType()) { - $this->commandOptions['ContentType'] = $mimeType; - } - } - - $params = array_replace(array( - Ua::OPTION => Ua::MULTIPART_UPLOAD, - 'command.headers' => $this->headers, - 'Metadata' => array() - ), $this->commandOptions); - - // Calculate the MD5 hash if none was set and it is asked of the builder - if ($this->calculateEntireMd5) { - $this->md5 = $this->source->getContentMd5(); - } - - // If an MD5 is specified, then add it to the custom headers of the request - // so that it will be returned when downloading the object from Amazon S3 - if ($this->md5) { - $params['Metadata']['x-amz-Content-MD5'] = $this->md5; - } - - $result = $this->client->getCommand('CreateMultipartUpload', $params)->execute(); - // Create a new state based on the initiated upload - $params['UploadId'] = $result['UploadId']; - - return new TransferState(UploadId::fromParams($params)); - } -} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Model/MultipartUpload/UploadId.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Model/MultipartUpload/UploadId.php deleted file mode 100644 index 9d5f3842162..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Model/MultipartUpload/UploadId.php +++ /dev/null @@ -1,35 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Model\MultipartUpload; - -use Aws\Common\Model\MultipartUpload\AbstractUploadId; - -/** - * An object that encapsulates the identification for a Glacier upload part - * @codeCoverageIgnore - */ -class UploadId extends AbstractUploadId -{ - /** - * {@inheritdoc} - */ - protected static $expectedValues = array( - 'Bucket' => false, - 'Key' => false, - 'UploadId' => false - ); -} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Model/MultipartUpload/UploadPart.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Model/MultipartUpload/UploadPart.php deleted file mode 100644 index e0ded33abd4..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Model/MultipartUpload/UploadPart.php +++ /dev/null @@ -1,74 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Model\MultipartUpload; - -use Aws\Common\Model\MultipartUpload\AbstractUploadPart; - -/** - * An object that encapsulates the data for a Glacier upload operation - */ -class UploadPart extends AbstractUploadPart -{ - /** - * {@inheritdoc} - */ - protected static $keyMap = array( - 'PartNumber' => 'partNumber', - 'ETag' => 'eTag', - 'LastModified' => 'lastModified', - 'Size' => 'size' - ); - - /** - * @var string The ETag for this part - */ - protected $eTag; - - /** - * @var string The last modified date - */ - protected $lastModified; - - /** - * @var int The size (or content-length) in bytes of the upload body - */ - protected $size; - - /** - * @return string - */ - public function getETag() - { - return $this->eTag; - } - - /** - * @return string - */ - public function getLastModified() - { - return $this->lastModified; - } - - /** - * @return int - */ - public function getSize() - { - return $this->size; - } -} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Model/PostObject.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Model/PostObject.php deleted file mode 100644 index 0aa2dbcf7f2..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Model/PostObject.php +++ /dev/null @@ -1,275 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Model; - -use Aws\Common\Enum\DateFormat; -use Aws\S3\S3Client; -use Guzzle\Common\Collection; -use Guzzle\Http\Url; - -/** - * Encapsulates the logic for getting the data for an S3 object POST upload form - */ -class PostObject extends Collection -{ - /** - * @var S3Client The S3 client being used to sign the policy - */ - protected $client; - - /** - * @var string The bucket name where the object will be posted - */ - protected $bucket; - - /** - * @var array The <form> tag attributes as an array - */ - protected $formAttributes; - - /** - * @var array The form's <input> elements as an array - */ - protected $formInputs; - - /** - * @var string The raw json policy - */ - protected $jsonPolicy; - - /** - * Constructs the PostObject - * - * The options array accepts the following keys: - * - * - acl: The access control setting to apply to the uploaded file. Accepts any of the - * CannedAcl constants - * - Cache-Control: The Cache-Control HTTP header value to apply to the uploaded file - * - Content-Disposition: The Content-Disposition HTTP header value to apply to the uploaded file - * - Content-Encoding: The Content-Encoding HTTP header value to apply to the uploaded file - * - Content-Type: The Content-Type HTTP header value to apply to the uploaded file. The default - * value is `application/octet-stream` - * - Expires: The Expires HTTP header value to apply to the uploaded file - * - key: The location where the file should be uploaded to. The default value is - * `^${filename}` which will use the name of the uploaded file - * - policy: A raw policy in JSON format. By default, the PostObject creates one for you - * - policy_callback: A callback used to modify the policy before encoding and signing it. The - * method signature for the callback should accept an array of the policy data as - * the 1st argument, (optionally) the PostObject as the 2nd argument, and return - * the policy data with the desired modifications. - * - success_action_redirect: The URI for Amazon S3 to redirect to upon successful upload - * - success_action_status: The status code for Amazon S3 to return upon successful upload - * - ttd: The expiration time for the generated upload form data - * - x-amz-meta-*: Any custom meta tag that should be set to the object - * - x-amz-server-side-encryption: The server-side encryption mechanism to use - * - x-amz-storage-class: The storage setting to apply to the object - * - x-amz-server-side​-encryption​-customer-algorithm: The SSE-C algorithm - * - x-amz-server-side​-encryption​-customer-key: The SSE-C customer secret key - * - x-amz-server-side​-encryption​-customer-key-MD5: The MD5 hash of the SSE-C customer secret key - * - * For the Cache-Control, Content-Disposition, Content-Encoding, - * Content-Type, Expires, and key options, to use a "starts-with" comparison - * instead of an equals comparison, prefix the value with a ^ (carat) - * character - * - * @param S3Client $client - * @param $bucket - * @param array $options - */ - public function __construct(S3Client $client, $bucket, array $options = array()) - { - $this->setClient($client); - $this->setBucket($bucket); - parent::__construct($options); - } - - /** - * Analyzes the provided data and turns it into useful data that can be - * consumed and used to build an upload form - * - * @return PostObject - */ - public function prepareData() - { - // Validate required options - $options = Collection::fromConfig($this->data, array( - 'ttd' => '+1 hour', - 'key' => '^${filename}', - )); - - // Format ttd option - $ttd = $options['ttd']; - $ttd = is_numeric($ttd) ? (int) $ttd : strtotime($ttd); - unset($options['ttd']); - - // If a policy or policy callback were provided, extract those from the options - $rawJsonPolicy = $options['policy']; - $policyCallback = $options['policy_callback']; - unset($options['policy'], $options['policy_callback']); - - // Setup policy document - $policy = array( - 'expiration' => gmdate(DateFormat::ISO8601_S3, $ttd), - 'conditions' => array(array('bucket' => $this->bucket)) - ); - - // Configure the endpoint/action - $url = Url::factory($this->client->getBaseUrl()); - if ($url->getScheme() === 'https' && strpos($this->bucket, '.') !== false) { - // Use path-style URLs - $url->setPath($this->bucket); - } else { - // Use virtual-style URLs - $url->setHost($this->bucket . '.' . $url->getHost()); - } - - // Setup basic form - $this->formAttributes = array( - 'action' => (string) $url, - 'method' => 'POST', - 'enctype' => 'multipart/form-data' - ); - $this->formInputs = array( - 'AWSAccessKeyId' => $this->client->getCredentials()->getAccessKeyId() - ); - - // Add success action status - $status = (int) $options->get('success_action_status'); - if ($status && in_array($status, array(200, 201, 204))) { - $this->formInputs['success_action_status'] = (string) $status; - $policy['conditions'][] = array( - 'success_action_status' => (string) $status - ); - unset($options['success_action_status']); - } - - // Add other options - foreach ($options as $key => $value) { - $value = (string) $value; - if ($value[0] === '^') { - $value = substr($value, 1); - $this->formInputs[$key] = $value; - $value = preg_replace('/\$\{(\w*)\}/', '', $value); - $policy['conditions'][] = array('starts-with', '$' . $key, $value); - } else { - $this->formInputs[$key] = $value; - $policy['conditions'][] = array($key => $value); - } - } - - // Handle the policy - $policy = is_callable($policyCallback) ? $policyCallback($policy, $this) : $policy; - $this->jsonPolicy = $rawJsonPolicy ?: json_encode($policy); - $this->applyPolicy(); - - return $this; - } - - /** - * Sets the S3 client - * - * @param S3Client $client - * - * @return PostObject - */ - public function setClient(S3Client $client) - { - $this->client = $client; - - return $this; - } - - /** - * Gets the S3 client - * - * @return S3Client - */ - public function getClient() - { - return $this->client; - } - - /** - * Sets the bucket and makes sure it is a valid bucket name - * - * @param string $bucket - * - * @return PostObject - */ - public function setBucket($bucket) - { - $this->bucket = $bucket; - - return $this; - } - - /** - * Gets the bucket name - * - * @return string - */ - public function getBucket() - { - return $this->bucket; - } - - /** - * Gets the form attributes as an array - * - * @return array - */ - public function getFormAttributes() - { - return $this->formAttributes; - } - - /** - * Gets the form inputs as an array - * - * @return array - */ - public function getFormInputs() - { - return $this->formInputs; - } - - /** - * Gets the raw JSON policy - * - * @return string - */ - public function getJsonPolicy() - { - return $this->jsonPolicy; - } - - /** - * Handles the encoding, singing, and injecting of the policy - */ - protected function applyPolicy() - { - $jsonPolicy64 = base64_encode($this->jsonPolicy); - $this->formInputs['policy'] = $jsonPolicy64; - - $this->formInputs['signature'] = base64_encode(hash_hmac( - 'sha1', - $jsonPolicy64, - $this->client->getCredentials()->getSecretKey(), - true - )); - } -} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Resources/s3-2006-03-01.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Resources/s3-2006-03-01.php deleted file mode 100644 index 0d7b023f029..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Resources/s3-2006-03-01.php +++ /dev/null @@ -1,4711 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -return array ( - 'apiVersion' => '2006-03-01', - 'endpointPrefix' => 's3', - 'serviceFullName' => 'Amazon Simple Storage Service', - 'serviceAbbreviation' => 'Amazon S3', - 'serviceType' => 'rest-xml', - 'timestampFormat' => 'rfc822', - 'globalEndpoint' => 's3.amazonaws.com', - 'signatureVersion' => 's3', - 'namespace' => 'S3', - 'regions' => array( - 'us-east-1' => array( - 'http' => true, - 'https' => true, - 'hostname' => 's3.amazonaws.com', - ), - 'us-west-1' => array( - 'http' => true, - 'https' => true, - 'hostname' => 's3-us-west-1.amazonaws.com', - ), - 'us-west-2' => array( - 'http' => true, - 'https' => true, - 'hostname' => 's3-us-west-2.amazonaws.com', - ), - 'eu-west-1' => array( - 'http' => true, - 'https' => true, - 'hostname' => 's3-eu-west-1.amazonaws.com', - ), - 'eu-central-1' => array( - 'http' => true, - 'https' => true, - 'hostname' => 's3-eu-central-1.amazonaws.com', - ), - 'ap-northeast-1' => array( - 'http' => true, - 'https' => true, - 'hostname' => 's3-ap-northeast-1.amazonaws.com', - ), - 'ap-southeast-1' => array( - 'http' => true, - 'https' => true, - 'hostname' => 's3-ap-southeast-1.amazonaws.com', - ), - 'ap-southeast-2' => array( - 'http' => true, - 'https' => true, - 'hostname' => 's3-ap-southeast-2.amazonaws.com', - ), - 'sa-east-1' => array( - 'http' => true, - 'https' => true, - 'hostname' => 's3-sa-east-1.amazonaws.com', - ), - 'cn-north-1' => array( - 'http' => true, - 'https' => true, - 'hostname' => 's3.cn-north-1.amazonaws.com.cn', - ), - 'us-gov-west-1' => array( - 'http' => true, - 'https' => true, - 'hostname' => 's3-us-gov-west-1.amazonaws.com', - ), - ), - 'operations' => array( - 'AbortMultipartUpload' => array( - 'httpMethod' => 'DELETE', - 'uri' => '/{Bucket}{/Key*}', - 'class' => 'Aws\\S3\\Command\\S3Command', - 'responseClass' => 'AbortMultipartUploadOutput', - 'responseType' => 'model', - 'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/mpUploadAbort.html', - 'parameters' => array( - 'Bucket' => array( - 'required' => true, - 'type' => 'string', - 'location' => 'uri', - ), - 'Key' => array( - 'required' => true, - 'type' => 'string', - 'location' => 'uri', - 'filters' => array( - 'Aws\\S3\\S3Client::explodeKey', - ), - ), - 'UploadId' => array( - 'required' => true, - 'type' => 'string', - 'location' => 'query', - 'sentAs' => 'uploadId', - ), - ), - 'errorResponses' => array( - array( - 'reason' => 'The specified multipart upload does not exist.', - 'class' => 'NoSuchUploadException', - ), - ), - ), - 'CompleteMultipartUpload' => array( - 'httpMethod' => 'POST', - 'uri' => '/{Bucket}{/Key*}', - 'class' => 'Aws\\S3\\Command\\S3Command', - 'responseClass' => 'CompleteMultipartUploadOutput', - 'responseType' => 'model', - 'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/mpUploadComplete.html', - 'data' => array( - 'xmlRoot' => array( - 'name' => 'CompleteMultipartUpload', - 'namespaces' => array( - 'http://s3.amazonaws.com/doc/2006-03-01/', - ), - ), - ), - 'parameters' => array( - 'Bucket' => array( - 'required' => true, - 'type' => 'string', - 'location' => 'uri', - ), - 'Key' => array( - 'required' => true, - 'type' => 'string', - 'location' => 'uri', - 'filters' => array( - 'Aws\\S3\\S3Client::explodeKey', - ), - ), - 'Parts' => array( - 'type' => 'array', - 'location' => 'xml', - 'data' => array( - 'xmlFlattened' => true, - ), - 'items' => array( - 'name' => 'CompletedPart', - 'type' => 'object', - 'sentAs' => 'Part', - 'properties' => array( - 'ETag' => array( - 'type' => 'string', - ), - 'PartNumber' => array( - 'type' => 'numeric', - ), - ), - ), - ), - 'UploadId' => array( - 'required' => true, - 'type' => 'string', - 'location' => 'query', - 'sentAs' => 'uploadId', - ), - 'command.expects' => array( - 'static' => true, - 'default' => 'application/xml', - ), - ), - ), - 'CopyObject' => array( - 'httpMethod' => 'PUT', - 'uri' => '/{Bucket}{/Key*}', - 'class' => 'Aws\\S3\\Command\\S3Command', - 'responseClass' => 'CopyObjectOutput', - 'responseType' => 'model', - 'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectCOPY.html', - 'data' => array( - 'xmlRoot' => array( - 'name' => 'CopyObjectRequest', - 'namespaces' => array( - 'http://s3.amazonaws.com/doc/2006-03-01/', - ), - ), - ), - 'parameters' => array( - 'ACL' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-acl', - ), - 'Bucket' => array( - 'required' => true, - 'type' => 'string', - 'location' => 'uri', - ), - 'CacheControl' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'Cache-Control', - ), - 'ContentDisposition' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'Content-Disposition', - ), - 'ContentEncoding' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'Content-Encoding', - ), - 'ContentLanguage' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'Content-Language', - ), - 'ContentType' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'Content-Type', - ), - 'CopySource' => array( - 'required' => true, - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-copy-source', - ), - 'CopySourceIfMatch' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-copy-source-if-match', - ), - 'CopySourceIfModifiedSince' => array( - 'type' => array( - 'object', - 'string', - 'integer', - ), - 'format' => 'date-time-http', - 'location' => 'header', - 'sentAs' => 'x-amz-copy-source-if-modified-since', - ), - 'CopySourceIfNoneMatch' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-copy-source-if-none-match', - ), - 'CopySourceIfUnmodifiedSince' => array( - 'type' => array( - 'object', - 'string', - 'integer', - ), - 'format' => 'date-time-http', - 'location' => 'header', - 'sentAs' => 'x-amz-copy-source-if-unmodified-since', - ), - 'Expires' => array( - 'type' => array( - 'object', - 'string', - 'integer', - ), - 'format' => 'date-time-http', - 'location' => 'header', - ), - 'GrantFullControl' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-grant-full-control', - ), - 'GrantRead' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-grant-read', - ), - 'GrantReadACP' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-grant-read-acp', - ), - 'GrantWriteACP' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-grant-write-acp', - ), - 'Key' => array( - 'required' => true, - 'type' => 'string', - 'location' => 'uri', - 'filters' => array( - 'Aws\\S3\\S3Client::explodeKey', - ), - ), - 'Metadata' => array( - 'type' => 'object', - 'location' => 'header', - 'sentAs' => 'x-amz-meta-', - 'additionalProperties' => array( - 'type' => 'string', - ), - ), - 'MetadataDirective' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-metadata-directive', - ), - 'ServerSideEncryption' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-server-side-encryption', - ), - 'StorageClass' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-storage-class', - ), - 'WebsiteRedirectLocation' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-website-redirect-location', - ), - 'SSECustomerAlgorithm' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-server-side-encryption-customer-algorithm', - ), - 'SSECustomerKey' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-server-side-encryption-customer-key', - ), - 'SSECustomerKeyMD5' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-server-side-encryption-customer-key-MD5', - ), - 'CopySourceSSECustomerAlgorithm' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-copy-source-server-side-encryption-customer-algorithm', - ), - 'CopySourceSSECustomerKey' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-copy-source-server-side-encryption-customer-key', - ), - 'CopySourceSSECustomerKeyMD5' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-copy-source-server-side-encryption-customer-key-MD5', - ), - 'CopySourceSSEKMSKeyId' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-copy-source-server-side-encryption-aws-kms-key-id', - ), - 'ACP' => array( - 'type' => 'object', - 'additionalProperties' => true, - ), - 'command.expects' => array( - 'static' => true, - 'default' => 'application/xml', - ), - ), - 'errorResponses' => array( - array( - 'reason' => 'The source object of the COPY operation is not in the active tier and is only stored in Amazon Glacier.', - 'class' => 'ObjectNotInActiveTierErrorException', - ), - ), - ), - 'CreateBucket' => array( - 'httpMethod' => 'PUT', - 'uri' => '/{Bucket}', - 'class' => 'Aws\\S3\\Command\\S3Command', - 'responseClass' => 'CreateBucketOutput', - 'responseType' => 'model', - 'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUT.html', - 'data' => array( - 'xmlRoot' => array( - 'name' => 'CreateBucketConfiguration', - 'namespaces' => array( - 'http://s3.amazonaws.com/doc/2006-03-01/', - ), - ), - ), - 'parameters' => array( - 'ACL' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-acl', - ), - 'Bucket' => array( - 'required' => true, - 'type' => 'string', - 'location' => 'uri', - ), - 'LocationConstraint' => array( - 'type' => 'string', - 'location' => 'xml', - ), - 'GrantFullControl' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-grant-full-control', - ), - 'GrantRead' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-grant-read', - ), - 'GrantReadACP' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-grant-read-acp', - ), - 'GrantWrite' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-grant-write', - ), - 'GrantWriteACP' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-grant-write-acp', - ), - 'ACP' => array( - 'type' => 'object', - 'additionalProperties' => true, - ), - ), - 'errorResponses' => array( - array( - 'reason' => 'The requested bucket name is not available. The bucket namespace is shared by all users of the system. Please select a different name and try again.', - 'class' => 'BucketAlreadyExistsException', - ), - ), - ), - 'CreateMultipartUpload' => array( - 'httpMethod' => 'POST', - 'uri' => '/{Bucket}{/Key*}?uploads', - 'class' => 'Aws\\S3\\Command\\S3Command', - 'responseClass' => 'CreateMultipartUploadOutput', - 'responseType' => 'model', - 'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/mpUploadInitiate.html', - 'data' => array( - 'xmlRoot' => array( - 'name' => 'CreateMultipartUploadRequest', - 'namespaces' => array( - 'http://s3.amazonaws.com/doc/2006-03-01/', - ), - ), - ), - 'parameters' => array( - 'ACL' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-acl', - ), - 'Bucket' => array( - 'required' => true, - 'type' => 'string', - 'location' => 'uri', - ), - 'CacheControl' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'Cache-Control', - ), - 'ContentDisposition' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'Content-Disposition', - ), - 'ContentEncoding' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'Content-Encoding', - ), - 'ContentLanguage' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'Content-Language', - ), - 'ContentType' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'Content-Type', - ), - 'Expires' => array( - 'type' => array( - 'object', - 'string', - 'integer', - ), - 'format' => 'date-time-http', - 'location' => 'header', - ), - 'GrantFullControl' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-grant-full-control', - ), - 'GrantRead' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-grant-read', - ), - 'GrantReadACP' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-grant-read-acp', - ), - 'GrantWriteACP' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-grant-write-acp', - ), - 'Key' => array( - 'required' => true, - 'type' => 'string', - 'location' => 'uri', - 'filters' => array( - 'Aws\\S3\\S3Client::explodeKey', - ), - ), - 'Metadata' => array( - 'type' => 'object', - 'location' => 'header', - 'sentAs' => 'x-amz-meta-', - 'additionalProperties' => array( - 'type' => 'string', - ), - ), - 'ServerSideEncryption' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-server-side-encryption', - ), - 'StorageClass' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-storage-class', - ), - 'WebsiteRedirectLocation' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-website-redirect-location', - ), - 'SSECustomerAlgorithm' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-server-side-encryption-customer-algorithm', - ), - 'SSECustomerKey' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-server-side-encryption-customer-key', - ), - 'SSECustomerKeyMD5' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-server-side-encryption-customer-key-MD5', - ), - 'SSEKMSKeyId' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-server-side-encryption-aws-kms-key-id', - ), - 'ACP' => array( - 'type' => 'object', - 'additionalProperties' => true, - ), - 'command.expects' => array( - 'static' => true, - 'default' => 'application/xml', - ), - ), - ), - 'DeleteBucket' => array( - 'httpMethod' => 'DELETE', - 'uri' => '/{Bucket}', - 'class' => 'Aws\\S3\\Command\\S3Command', - 'responseClass' => 'DeleteBucketOutput', - 'responseType' => 'model', - 'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketDELETE.html', - 'parameters' => array( - 'Bucket' => array( - 'required' => true, - 'type' => 'string', - 'location' => 'uri', - ), - ), - ), - 'DeleteBucketCors' => array( - 'httpMethod' => 'DELETE', - 'uri' => '/{Bucket}?cors', - 'class' => 'Aws\\S3\\Command\\S3Command', - 'responseClass' => 'DeleteBucketCorsOutput', - 'responseType' => 'model', - 'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketDELETEcors.html', - 'parameters' => array( - 'Bucket' => array( - 'required' => true, - 'type' => 'string', - 'location' => 'uri', - ), - ), - ), - 'DeleteBucketLifecycle' => array( - 'httpMethod' => 'DELETE', - 'uri' => '/{Bucket}?lifecycle', - 'class' => 'Aws\\S3\\Command\\S3Command', - 'responseClass' => 'DeleteBucketLifecycleOutput', - 'responseType' => 'model', - 'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketDELETElifecycle.html', - 'parameters' => array( - 'Bucket' => array( - 'required' => true, - 'type' => 'string', - 'location' => 'uri', - ), - ), - ), - 'DeleteBucketPolicy' => array( - 'httpMethod' => 'DELETE', - 'uri' => '/{Bucket}?policy', - 'class' => 'Aws\\S3\\Command\\S3Command', - 'responseClass' => 'DeleteBucketPolicyOutput', - 'responseType' => 'model', - 'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketDELETEpolicy.html', - 'parameters' => array( - 'Bucket' => array( - 'required' => true, - 'type' => 'string', - 'location' => 'uri', - ), - ), - ), - 'DeleteBucketTagging' => array( - 'httpMethod' => 'DELETE', - 'uri' => '/{Bucket}?tagging', - 'class' => 'Aws\\S3\\Command\\S3Command', - 'responseClass' => 'DeleteBucketTaggingOutput', - 'responseType' => 'model', - 'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketDELETEtagging.html', - 'parameters' => array( - 'Bucket' => array( - 'required' => true, - 'type' => 'string', - 'location' => 'uri', - ), - ), - ), - 'DeleteBucketWebsite' => array( - 'httpMethod' => 'DELETE', - 'uri' => '/{Bucket}?website', - 'class' => 'Aws\\S3\\Command\\S3Command', - 'responseClass' => 'DeleteBucketWebsiteOutput', - 'responseType' => 'model', - 'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketDELETEwebsite.html', - 'parameters' => array( - 'Bucket' => array( - 'required' => true, - 'type' => 'string', - 'location' => 'uri', - ), - ), - ), - 'DeleteObject' => array( - 'httpMethod' => 'DELETE', - 'uri' => '/{Bucket}{/Key*}', - 'class' => 'Aws\\S3\\Command\\S3Command', - 'responseClass' => 'DeleteObjectOutput', - 'responseType' => 'model', - 'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectDELETE.html', - 'parameters' => array( - 'Bucket' => array( - 'required' => true, - 'type' => 'string', - 'location' => 'uri', - ), - 'Key' => array( - 'required' => true, - 'type' => 'string', - 'location' => 'uri', - 'filters' => array( - 'Aws\\S3\\S3Client::explodeKey', - ), - ), - 'MFA' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-mfa', - ), - 'VersionId' => array( - 'type' => 'string', - 'location' => 'query', - 'sentAs' => 'versionId', - ), - ), - ), - 'DeleteObjects' => array( - 'httpMethod' => 'POST', - 'uri' => '/{Bucket}?delete', - 'class' => 'Aws\\S3\\Command\\S3Command', - 'responseClass' => 'DeleteObjectsOutput', - 'responseType' => 'model', - 'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/multiobjectdeleteapi.html', - 'data' => array( - 'xmlRoot' => array( - 'name' => 'Delete', - 'namespaces' => array( - 'http://s3.amazonaws.com/doc/2006-03-01/', - ), - ), - 'contentMd5' => true, - ), - 'parameters' => array( - 'Bucket' => array( - 'required' => true, - 'type' => 'string', - 'location' => 'uri', - ), - 'Objects' => array( - 'required' => true, - 'type' => 'array', - 'location' => 'xml', - 'data' => array( - 'xmlFlattened' => true, - ), - 'items' => array( - 'name' => 'ObjectIdentifier', - 'type' => 'object', - 'sentAs' => 'Object', - 'properties' => array( - 'Key' => array( - 'required' => true, - 'type' => 'string', - ), - 'VersionId' => array( - 'type' => 'string', - ), - ), - ), - ), - 'Quiet' => array( - 'type' => 'boolean', - 'format' => 'boolean-string', - 'location' => 'xml', - ), - 'MFA' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-mfa', - ), - 'command.expects' => array( - 'static' => true, - 'default' => 'application/xml', - ), - ), - ), - 'GetBucketAcl' => array( - 'httpMethod' => 'GET', - 'uri' => '/{Bucket}?acl', - 'class' => 'Aws\\S3\\Command\\S3Command', - 'responseClass' => 'GetBucketAclOutput', - 'responseType' => 'model', - 'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketGETacl.html', - 'parameters' => array( - 'Bucket' => array( - 'required' => true, - 'type' => 'string', - 'location' => 'uri', - ), - 'command.expects' => array( - 'static' => true, - 'default' => 'application/xml', - ), - ), - ), - 'GetBucketCors' => array( - 'httpMethod' => 'GET', - 'uri' => '/{Bucket}?cors', - 'class' => 'Aws\\S3\\Command\\S3Command', - 'responseClass' => 'GetBucketCorsOutput', - 'responseType' => 'model', - 'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketGETcors.html', - 'parameters' => array( - 'Bucket' => array( - 'required' => true, - 'type' => 'string', - 'location' => 'uri', - ), - 'command.expects' => array( - 'static' => true, - 'default' => 'application/xml', - ), - ), - ), - 'GetBucketLifecycle' => array( - 'httpMethod' => 'GET', - 'uri' => '/{Bucket}?lifecycle', - 'class' => 'Aws\\S3\\Command\\S3Command', - 'responseClass' => 'GetBucketLifecycleOutput', - 'responseType' => 'model', - 'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketGETlifecycle.html', - 'parameters' => array( - 'Bucket' => array( - 'required' => true, - 'type' => 'string', - 'location' => 'uri', - ), - 'command.expects' => array( - 'static' => true, - 'default' => 'application/xml', - ), - ), - ), - 'GetBucketLocation' => array( - 'httpMethod' => 'GET', - 'uri' => '/{Bucket}?location', - 'class' => 'Aws\\S3\\Command\\S3Command', - 'responseClass' => 'GetBucketLocationOutput', - 'responseType' => 'model', - 'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketGETlocation.html', - 'parameters' => array( - 'Bucket' => array( - 'required' => true, - 'type' => 'string', - 'location' => 'uri', - ), - ), - ), - 'GetBucketLogging' => array( - 'httpMethod' => 'GET', - 'uri' => '/{Bucket}?logging', - 'class' => 'Aws\\S3\\Command\\S3Command', - 'responseClass' => 'GetBucketLoggingOutput', - 'responseType' => 'model', - 'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketGETlogging.html', - 'parameters' => array( - 'Bucket' => array( - 'required' => true, - 'type' => 'string', - 'location' => 'uri', - ), - 'command.expects' => array( - 'static' => true, - 'default' => 'application/xml', - ), - ), - ), - 'GetBucketNotification' => array( - 'httpMethod' => 'GET', - 'uri' => '/{Bucket}?notification', - 'class' => 'Aws\\S3\\Command\\S3Command', - 'responseClass' => 'GetBucketNotificationOutput', - 'responseType' => 'model', - 'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketGETnotification.html', - 'parameters' => array( - 'Bucket' => array( - 'required' => true, - 'type' => 'string', - 'location' => 'uri', - ), - 'command.expects' => array( - 'static' => true, - 'default' => 'application/xml', - ), - ), - ), - 'GetBucketPolicy' => array( - 'httpMethod' => 'GET', - 'uri' => '/{Bucket}?policy', - 'class' => 'Aws\\S3\\Command\\S3Command', - 'responseClass' => 'GetBucketPolicyOutput', - 'responseType' => 'model', - 'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketGETpolicy.html', - 'parameters' => array( - 'Bucket' => array( - 'required' => true, - 'type' => 'string', - 'location' => 'uri', - ), - ), - ), - 'GetBucketRequestPayment' => array( - 'httpMethod' => 'GET', - 'uri' => '/{Bucket}?requestPayment', - 'class' => 'Aws\\S3\\Command\\S3Command', - 'responseClass' => 'GetBucketRequestPaymentOutput', - 'responseType' => 'model', - 'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/RESTrequestPaymentGET.html', - 'parameters' => array( - 'Bucket' => array( - 'required' => true, - 'type' => 'string', - 'location' => 'uri', - ), - 'command.expects' => array( - 'static' => true, - 'default' => 'application/xml', - ), - ), - ), - 'GetBucketTagging' => array( - 'httpMethod' => 'GET', - 'uri' => '/{Bucket}?tagging', - 'class' => 'Aws\\S3\\Command\\S3Command', - 'responseClass' => 'GetBucketTaggingOutput', - 'responseType' => 'model', - 'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketGETtagging.html', - 'parameters' => array( - 'Bucket' => array( - 'required' => true, - 'type' => 'string', - 'location' => 'uri', - ), - 'command.expects' => array( - 'static' => true, - 'default' => 'application/xml', - ), - ), - ), - 'GetBucketVersioning' => array( - 'httpMethod' => 'GET', - 'uri' => '/{Bucket}?versioning', - 'class' => 'Aws\\S3\\Command\\S3Command', - 'responseClass' => 'GetBucketVersioningOutput', - 'responseType' => 'model', - 'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketGETversioningStatus.html', - 'parameters' => array( - 'Bucket' => array( - 'required' => true, - 'type' => 'string', - 'location' => 'uri', - ), - 'command.expects' => array( - 'static' => true, - 'default' => 'application/xml', - ), - ), - ), - 'GetBucketWebsite' => array( - 'httpMethod' => 'GET', - 'uri' => '/{Bucket}?website', - 'class' => 'Aws\\S3\\Command\\S3Command', - 'responseClass' => 'GetBucketWebsiteOutput', - 'responseType' => 'model', - 'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketGETwebsite.html', - 'parameters' => array( - 'Bucket' => array( - 'required' => true, - 'type' => 'string', - 'location' => 'uri', - ), - 'command.expects' => array( - 'static' => true, - 'default' => 'application/xml', - ), - ), - ), - 'GetObject' => array( - 'httpMethod' => 'GET', - 'uri' => '/{Bucket}{/Key*}', - 'class' => 'Aws\\S3\\Command\\S3Command', - 'responseClass' => 'GetObjectOutput', - 'responseType' => 'model', - 'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectGET.html', - 'parameters' => array( - 'Bucket' => array( - 'required' => true, - 'type' => 'string', - 'location' => 'uri', - ), - 'IfMatch' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'If-Match', - ), - 'IfModifiedSince' => array( - 'type' => array( - 'object', - 'string', - 'integer', - ), - 'format' => 'date-time-http', - 'location' => 'header', - 'sentAs' => 'If-Modified-Since', - ), - 'IfNoneMatch' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'If-None-Match', - ), - 'IfUnmodifiedSince' => array( - 'type' => array( - 'object', - 'string', - 'integer', - ), - 'format' => 'date-time-http', - 'location' => 'header', - 'sentAs' => 'If-Unmodified-Since', - ), - 'Key' => array( - 'required' => true, - 'type' => 'string', - 'location' => 'uri', - 'filters' => array( - 'Aws\\S3\\S3Client::explodeKey', - ), - ), - 'Range' => array( - 'type' => 'string', - 'location' => 'header', - ), - 'ResponseCacheControl' => array( - 'type' => 'string', - 'location' => 'query', - 'sentAs' => 'response-cache-control', - ), - 'ResponseContentDisposition' => array( - 'type' => 'string', - 'location' => 'query', - 'sentAs' => 'response-content-disposition', - ), - 'ResponseContentEncoding' => array( - 'type' => 'string', - 'location' => 'query', - 'sentAs' => 'response-content-encoding', - ), - 'ResponseContentLanguage' => array( - 'type' => 'string', - 'location' => 'query', - 'sentAs' => 'response-content-language', - ), - 'ResponseContentType' => array( - 'type' => 'string', - 'location' => 'query', - 'sentAs' => 'response-content-type', - ), - 'ResponseExpires' => array( - 'type' => array( - 'object', - 'string', - 'integer', - ), - 'format' => 'date-time-http', - 'location' => 'query', - 'sentAs' => 'response-expires', - ), - 'VersionId' => array( - 'type' => 'string', - 'location' => 'query', - 'sentAs' => 'versionId', - ), - 'SSECustomerAlgorithm' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-server-side-encryption-customer-algorithm', - ), - 'SSECustomerKey' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-server-side-encryption-customer-key', - ), - 'SSECustomerKeyMD5' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-server-side-encryption-customer-key-MD5', - ), - 'SSEKMSKeyId' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-server-side-encryption-aws-kms-key-id', - ), - 'SaveAs' => array( - 'location' => 'response_body', - ), - ), - 'errorResponses' => array( - array( - 'reason' => 'The specified key does not exist.', - 'class' => 'NoSuchKeyException', - ), - ), - ), - 'GetObjectAcl' => array( - 'httpMethod' => 'GET', - 'uri' => '/{Bucket}{/Key*}?acl', - 'class' => 'Aws\\S3\\Command\\S3Command', - 'responseClass' => 'GetObjectAclOutput', - 'responseType' => 'model', - 'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectGETacl.html', - 'parameters' => array( - 'Bucket' => array( - 'required' => true, - 'type' => 'string', - 'location' => 'uri', - ), - 'Key' => array( - 'required' => true, - 'type' => 'string', - 'location' => 'uri', - 'filters' => array( - 'Aws\\S3\\S3Client::explodeKey', - ), - ), - 'VersionId' => array( - 'type' => 'string', - 'location' => 'query', - 'sentAs' => 'versionId', - ), - 'command.expects' => array( - 'static' => true, - 'default' => 'application/xml', - ), - ), - 'errorResponses' => array( - array( - 'reason' => 'The specified key does not exist.', - 'class' => 'NoSuchKeyException', - ), - ), - ), - 'GetObjectTorrent' => array( - 'httpMethod' => 'GET', - 'uri' => '/{Bucket}{/Key*}?torrent', - 'class' => 'Aws\\S3\\Command\\S3Command', - 'responseClass' => 'GetObjectTorrentOutput', - 'responseType' => 'model', - 'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectGETtorrent.html', - 'parameters' => array( - 'Bucket' => array( - 'required' => true, - 'type' => 'string', - 'location' => 'uri', - ), - 'Key' => array( - 'required' => true, - 'type' => 'string', - 'location' => 'uri', - 'filters' => array( - 'Aws\\S3\\S3Client::explodeKey', - ), - ), - ), - ), - 'HeadBucket' => array( - 'httpMethod' => 'HEAD', - 'uri' => '/{Bucket}', - 'class' => 'Aws\\S3\\Command\\S3Command', - 'responseClass' => 'HeadBucketOutput', - 'responseType' => 'model', - 'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketHEAD.html', - 'parameters' => array( - 'Bucket' => array( - 'required' => true, - 'type' => 'string', - 'location' => 'uri', - ), - ), - 'errorResponses' => array( - array( - 'reason' => 'The specified bucket does not exist.', - 'class' => 'NoSuchBucketException', - ), - ), - ), - 'HeadObject' => array( - 'httpMethod' => 'HEAD', - 'uri' => '/{Bucket}{/Key*}', - 'class' => 'Aws\\S3\\Command\\S3Command', - 'responseClass' => 'HeadObjectOutput', - 'responseType' => 'model', - 'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectHEAD.html', - 'parameters' => array( - 'Bucket' => array( - 'required' => true, - 'type' => 'string', - 'location' => 'uri', - ), - 'IfMatch' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'If-Match', - ), - 'IfModifiedSince' => array( - 'type' => array( - 'object', - 'string', - 'integer', - ), - 'format' => 'date-time-http', - 'location' => 'header', - 'sentAs' => 'If-Modified-Since', - ), - 'IfNoneMatch' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'If-None-Match', - ), - 'IfUnmodifiedSince' => array( - 'type' => array( - 'object', - 'string', - 'integer', - ), - 'format' => 'date-time-http', - 'location' => 'header', - 'sentAs' => 'If-Unmodified-Since', - ), - 'Key' => array( - 'required' => true, - 'type' => 'string', - 'location' => 'uri', - 'filters' => array( - 'Aws\\S3\\S3Client::explodeKey', - ), - ), - 'Range' => array( - 'type' => 'string', - 'location' => 'header', - ), - 'VersionId' => array( - 'type' => 'string', - 'location' => 'query', - 'sentAs' => 'versionId', - ), - 'SSECustomerAlgorithm' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-server-side-encryption-customer-algorithm', - ), - 'SSECustomerKey' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-server-side-encryption-customer-key', - ), - 'SSECustomerKeyMD5' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-server-side-encryption-customer-key-MD5', - ), - 'SSEKMSKeyId' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-server-side-encryption-aws-kms-key-id', - ), - ), - 'errorResponses' => array( - array( - 'reason' => 'The specified key does not exist.', - 'class' => 'NoSuchKeyException', - ), - ), - ), - 'ListBuckets' => array( - 'httpMethod' => 'GET', - 'uri' => '/', - 'class' => 'Aws\\S3\\Command\\S3Command', - 'responseClass' => 'ListBucketsOutput', - 'responseType' => 'model', - 'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/RESTServiceGET.html', - 'parameters' => array( - 'command.expects' => array( - 'static' => true, - 'default' => 'application/xml', - ), - ), - ), - 'ListMultipartUploads' => array( - 'httpMethod' => 'GET', - 'uri' => '/{Bucket}?uploads', - 'class' => 'Aws\\S3\\Command\\S3Command', - 'responseClass' => 'ListMultipartUploadsOutput', - 'responseType' => 'model', - 'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/mpUploadListMPUpload.html', - 'parameters' => array( - 'Bucket' => array( - 'required' => true, - 'type' => 'string', - 'location' => 'uri', - ), - 'Delimiter' => array( - 'type' => 'string', - 'location' => 'query', - 'sentAs' => 'delimiter', - ), - 'EncodingType' => array( - 'type' => 'string', - 'location' => 'query', - 'sentAs' => 'encoding-type', - ), - 'KeyMarker' => array( - 'type' => 'string', - 'location' => 'query', - 'sentAs' => 'key-marker', - ), - 'MaxUploads' => array( - 'type' => 'numeric', - 'location' => 'query', - 'sentAs' => 'max-uploads', - ), - 'Prefix' => array( - 'type' => 'string', - 'location' => 'query', - 'sentAs' => 'prefix', - ), - 'UploadIdMarker' => array( - 'type' => 'string', - 'location' => 'query', - 'sentAs' => 'upload-id-marker', - ), - 'command.expects' => array( - 'static' => true, - 'default' => 'application/xml', - ), - ), - ), - 'ListObjectVersions' => array( - 'httpMethod' => 'GET', - 'uri' => '/{Bucket}?versions', - 'class' => 'Aws\\S3\\Command\\S3Command', - 'responseClass' => 'ListObjectVersionsOutput', - 'responseType' => 'model', - 'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketGETVersion.html', - 'parameters' => array( - 'Bucket' => array( - 'required' => true, - 'type' => 'string', - 'location' => 'uri', - ), - 'Delimiter' => array( - 'type' => 'string', - 'location' => 'query', - 'sentAs' => 'delimiter', - ), - 'EncodingType' => array( - 'type' => 'string', - 'location' => 'query', - 'sentAs' => 'encoding-type', - ), - 'KeyMarker' => array( - 'type' => 'string', - 'location' => 'query', - 'sentAs' => 'key-marker', - ), - 'MaxKeys' => array( - 'type' => 'numeric', - 'location' => 'query', - 'sentAs' => 'max-keys', - ), - 'Prefix' => array( - 'type' => 'string', - 'location' => 'query', - 'sentAs' => 'prefix', - ), - 'VersionIdMarker' => array( - 'type' => 'string', - 'location' => 'query', - 'sentAs' => 'version-id-marker', - ), - 'command.expects' => array( - 'static' => true, - 'default' => 'application/xml', - ), - ), - ), - 'ListObjects' => array( - 'httpMethod' => 'GET', - 'uri' => '/{Bucket}', - 'class' => 'Aws\\S3\\Command\\S3Command', - 'responseClass' => 'ListObjectsOutput', - 'responseType' => 'model', - 'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketGET.html', - 'parameters' => array( - 'Bucket' => array( - 'required' => true, - 'type' => 'string', - 'location' => 'uri', - ), - 'Delimiter' => array( - 'type' => 'string', - 'location' => 'query', - 'sentAs' => 'delimiter', - ), - 'EncodingType' => array( - 'type' => 'string', - 'location' => 'query', - 'sentAs' => 'encoding-type', - ), - 'Marker' => array( - 'type' => 'string', - 'location' => 'query', - 'sentAs' => 'marker', - ), - 'MaxKeys' => array( - 'type' => 'numeric', - 'location' => 'query', - 'sentAs' => 'max-keys', - ), - 'Prefix' => array( - 'type' => 'string', - 'location' => 'query', - 'sentAs' => 'prefix', - ), - 'command.expects' => array( - 'static' => true, - 'default' => 'application/xml', - ), - ), - 'errorResponses' => array( - array( - 'reason' => 'The specified bucket does not exist.', - 'class' => 'NoSuchBucketException', - ), - ), - ), - 'ListParts' => array( - 'httpMethod' => 'GET', - 'uri' => '/{Bucket}{/Key*}', - 'class' => 'Aws\\S3\\Command\\S3Command', - 'responseClass' => 'ListPartsOutput', - 'responseType' => 'model', - 'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/mpUploadListParts.html', - 'parameters' => array( - 'Bucket' => array( - 'required' => true, - 'type' => 'string', - 'location' => 'uri', - ), - 'Key' => array( - 'required' => true, - 'type' => 'string', - 'location' => 'uri', - 'filters' => array( - 'Aws\\S3\\S3Client::explodeKey', - ), - ), - 'MaxParts' => array( - 'type' => 'numeric', - 'location' => 'query', - 'sentAs' => 'max-parts', - ), - 'PartNumberMarker' => array( - 'type' => 'numeric', - 'location' => 'query', - 'sentAs' => 'part-number-marker', - ), - 'UploadId' => array( - 'required' => true, - 'type' => 'string', - 'location' => 'query', - 'sentAs' => 'uploadId', - ), - 'command.expects' => array( - 'static' => true, - 'default' => 'application/xml', - ), - ), - ), - 'PutBucketAcl' => array( - 'httpMethod' => 'PUT', - 'uri' => '/{Bucket}?acl', - 'class' => 'Aws\\S3\\Command\\S3Command', - 'responseClass' => 'PutBucketAclOutput', - 'responseType' => 'model', - 'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTacl.html', - 'data' => array( - 'xmlRoot' => array( - 'name' => 'AccessControlPolicy', - 'namespaces' => array( - 'http://s3.amazonaws.com/doc/2006-03-01/', - ), - ), - ), - 'parameters' => array( - 'ACL' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-acl', - ), - 'Grants' => array( - 'type' => 'array', - 'location' => 'xml', - 'sentAs' => 'AccessControlList', - 'items' => array( - 'name' => 'Grant', - 'type' => 'object', - 'properties' => array( - 'Grantee' => array( - 'type' => 'object', - 'properties' => array( - 'DisplayName' => array( - 'type' => 'string', - ), - 'EmailAddress' => array( - 'type' => 'string', - ), - 'ID' => array( - 'type' => 'string', - ), - 'Type' => array( - 'required' => true, - 'type' => 'string', - 'sentAs' => 'xsi:type', - 'data' => array( - 'xmlAttribute' => true, - 'xmlNamespace' => 'http://www.w3.org/2001/XMLSchema-instance', - ), - ), - 'URI' => array( - 'type' => 'string', - ), - ), - ), - 'Permission' => array( - 'type' => 'string', - ), - ), - ), - ), - 'Owner' => array( - 'type' => 'object', - 'location' => 'xml', - 'properties' => array( - 'DisplayName' => array( - 'type' => 'string', - ), - 'ID' => array( - 'type' => 'string', - ), - ), - ), - 'Bucket' => array( - 'required' => true, - 'type' => 'string', - 'location' => 'uri', - ), - 'GrantFullControl' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-grant-full-control', - ), - 'GrantRead' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-grant-read', - ), - 'GrantReadACP' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-grant-read-acp', - ), - 'GrantWrite' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-grant-write', - ), - 'GrantWriteACP' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-grant-write-acp', - ), - 'ACP' => array( - 'type' => 'object', - 'additionalProperties' => true, - ), - ), - ), - 'PutBucketCors' => array( - 'httpMethod' => 'PUT', - 'uri' => '/{Bucket}?cors', - 'class' => 'Aws\\S3\\Command\\S3Command', - 'responseClass' => 'PutBucketCorsOutput', - 'responseType' => 'model', - 'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTcors.html', - 'data' => array( - 'xmlRoot' => array( - 'name' => 'CORSConfiguration', - 'namespaces' => array( - 'http://s3.amazonaws.com/doc/2006-03-01/', - ), - ), - 'contentMd5' => true, - ), - 'parameters' => array( - 'Bucket' => array( - 'required' => true, - 'type' => 'string', - 'location' => 'uri', - ), - 'CORSRules' => array( - 'type' => 'array', - 'location' => 'xml', - 'data' => array( - 'xmlFlattened' => true, - ), - 'items' => array( - 'name' => 'CORSRule', - 'type' => 'object', - 'sentAs' => 'CORSRule', - 'properties' => array( - 'AllowedHeaders' => array( - 'type' => 'array', - 'data' => array( - 'xmlFlattened' => true, - ), - 'items' => array( - 'name' => 'AllowedHeader', - 'type' => 'string', - 'sentAs' => 'AllowedHeader', - ), - ), - 'AllowedMethods' => array( - 'type' => 'array', - 'data' => array( - 'xmlFlattened' => true, - ), - 'items' => array( - 'name' => 'AllowedMethod', - 'type' => 'string', - 'sentAs' => 'AllowedMethod', - ), - ), - 'AllowedOrigins' => array( - 'type' => 'array', - 'data' => array( - 'xmlFlattened' => true, - ), - 'items' => array( - 'name' => 'AllowedOrigin', - 'type' => 'string', - 'sentAs' => 'AllowedOrigin', - ), - ), - 'ExposeHeaders' => array( - 'type' => 'array', - 'data' => array( - 'xmlFlattened' => true, - ), - 'items' => array( - 'name' => 'ExposeHeader', - 'type' => 'string', - 'sentAs' => 'ExposeHeader', - ), - ), - 'MaxAgeSeconds' => array( - 'type' => 'numeric', - ), - ), - ), - ), - ), - ), - 'PutBucketLifecycle' => array( - 'httpMethod' => 'PUT', - 'uri' => '/{Bucket}?lifecycle', - 'class' => 'Aws\\S3\\Command\\S3Command', - 'responseClass' => 'PutBucketLifecycleOutput', - 'responseType' => 'model', - 'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTlifecycle.html', - 'data' => array( - 'xmlRoot' => array( - 'name' => 'LifecycleConfiguration', - 'namespaces' => array( - 'http://s3.amazonaws.com/doc/2006-03-01/', - ), - ), - 'contentMd5' => true, - ), - 'parameters' => array( - 'Bucket' => array( - 'required' => true, - 'type' => 'string', - 'location' => 'uri', - ), - 'Rules' => array( - 'required' => true, - 'type' => 'array', - 'location' => 'xml', - 'data' => array( - 'xmlFlattened' => true, - ), - 'items' => array( - 'name' => 'Rule', - 'type' => 'object', - 'sentAs' => 'Rule', - 'properties' => array( - 'Expiration' => array( - 'type' => 'object', - 'properties' => array( - 'Date' => array( - 'type' => array( - 'object', - 'string', - 'integer', - ), - 'format' => 'date-time', - ), - 'Days' => array( - 'type' => 'numeric', - ), - ), - ), - 'ID' => array( - 'type' => 'string', - ), - 'Prefix' => array( - 'required' => true, - 'type' => 'string', - ), - 'Status' => array( - 'required' => true, - 'type' => 'string', - ), - 'Transition' => array( - 'type' => 'object', - 'properties' => array( - 'Date' => array( - 'type' => array( - 'object', - 'string', - 'integer', - ), - 'format' => 'date-time', - ), - 'Days' => array( - 'type' => 'numeric', - ), - 'StorageClass' => array( - 'type' => 'string', - ), - ), - ), - 'NoncurrentVersionTransition' => array( - 'type' => 'object', - 'properties' => array( - 'NoncurrentDays' => array( - 'type' => 'numeric', - ), - 'StorageClass' => array( - 'type' => 'string', - ), - ), - ), - 'NoncurrentVersionExpiration' => array( - 'type' => 'object', - 'properties' => array( - 'NoncurrentDays' => array( - 'type' => 'numeric', - ), - ), - ), - ), - ), - ), - ), - ), - 'PutBucketLogging' => array( - 'httpMethod' => 'PUT', - 'uri' => '/{Bucket}?logging', - 'class' => 'Aws\\S3\\Command\\S3Command', - 'responseClass' => 'PutBucketLoggingOutput', - 'responseType' => 'model', - 'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTlogging.html', - 'data' => array( - 'xmlRoot' => array( - 'name' => 'BucketLoggingStatus', - 'namespaces' => array( - 'http://s3.amazonaws.com/doc/2006-03-01/', - ), - ), - 'xmlAllowEmpty' => true, - ), - 'parameters' => array( - 'Bucket' => array( - 'required' => true, - 'type' => 'string', - 'location' => 'uri', - ), - 'LoggingEnabled' => array( - 'type' => 'object', - 'location' => 'xml', - 'properties' => array( - 'TargetBucket' => array( - 'type' => 'string', - ), - 'TargetGrants' => array( - 'type' => 'array', - 'items' => array( - 'name' => 'Grant', - 'type' => 'object', - 'properties' => array( - 'Grantee' => array( - 'type' => 'object', - 'properties' => array( - 'DisplayName' => array( - 'type' => 'string', - ), - 'EmailAddress' => array( - 'type' => 'string', - ), - 'ID' => array( - 'type' => 'string', - ), - 'Type' => array( - 'required' => true, - 'type' => 'string', - 'sentAs' => 'xsi:type', - 'data' => array( - 'xmlAttribute' => true, - 'xmlNamespace' => 'http://www.w3.org/2001/XMLSchema-instance', - ), - ), - 'URI' => array( - 'type' => 'string', - ), - ), - ), - 'Permission' => array( - 'type' => 'string', - ), - ), - ), - ), - 'TargetPrefix' => array( - 'type' => 'string', - ), - ), - ), - ), - ), - 'PutBucketNotification' => array( - 'httpMethod' => 'PUT', - 'uri' => '/{Bucket}?notification', - 'class' => 'Aws\\S3\\Command\\S3Command', - 'responseClass' => 'PutBucketNotificationOutput', - 'responseType' => 'model', - 'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTnotification.html', - 'data' => array( - 'xmlRoot' => array( - 'name' => 'NotificationConfiguration', - 'namespaces' => array( - 'http://s3.amazonaws.com/doc/2006-03-01/', - ), - ), - ), - 'parameters' => array( - 'Bucket' => array( - 'required' => true, - 'type' => 'string', - 'location' => 'uri', - ), - 'TopicConfiguration' => array( - 'type' => 'object', - 'location' => 'xml', - 'properties' => array( - 'Id' => array( - 'type' => 'string', - ), - 'Events' => array( - 'type' => 'array', - 'data' => array( - 'xmlFlattened' => true, - ), - 'items' => array( - 'name' => 'Event', - 'type' => 'string', - ), - ), - 'Event' => array( - 'type' => 'string', - ), - 'Topic' => array( - 'type' => 'string', - ), - ), - ), - 'QueueConfiguration' => array( - 'type' => 'object', - 'location' => 'xml', - 'properties' => array( - 'Id' => array( - 'type' => 'string', - ), - 'Event' => array( - 'type' => 'string', - ), - 'Events' => array( - 'type' => 'array', - 'data' => array( - 'xmlFlattened' => true, - ), - 'items' => array( - 'name' => 'Event', - 'type' => 'string', - ), - ), - 'Queue' => array( - 'type' => 'string', - ), - ), - ), - 'CloudFunctionConfiguration' => array( - 'type' => 'object', - 'location' => 'xml', - 'properties' => array( - 'Id' => array( - 'type' => 'string', - ), - 'Event' => array( - 'type' => 'string', - ), - 'Events' => array( - 'type' => 'array', - 'data' => array( - 'xmlFlattened' => true, - ), - 'items' => array( - 'name' => 'Event', - 'type' => 'string', - ), - ), - 'CloudFunction' => array( - 'type' => 'string', - ), - 'InvocationRole' => array( - 'type' => 'string', - ), - ), - ), - ), - ), - 'PutBucketPolicy' => array( - 'httpMethod' => 'PUT', - 'uri' => '/{Bucket}?policy', - 'class' => 'Aws\\S3\\Command\\S3Command', - 'responseClass' => 'PutBucketPolicyOutput', - 'responseType' => 'model', - 'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTpolicy.html', - 'data' => array( - 'xmlRoot' => array( - 'name' => 'PutBucketPolicyRequest', - 'namespaces' => array( - 'http://s3.amazonaws.com/doc/2006-03-01/', - ), - ), - ), - 'parameters' => array( - 'Bucket' => array( - 'required' => true, - 'type' => 'string', - 'location' => 'uri', - ), - 'Policy' => array( - 'required' => true, - 'type' => array( - 'string', - 'object', - ), - 'location' => 'body', - ), - ), - ), - 'PutBucketRequestPayment' => array( - 'httpMethod' => 'PUT', - 'uri' => '/{Bucket}?requestPayment', - 'class' => 'Aws\\S3\\Command\\S3Command', - 'responseClass' => 'PutBucketRequestPaymentOutput', - 'responseType' => 'model', - 'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/RESTrequestPaymentPUT.html', - 'data' => array( - 'xmlRoot' => array( - 'name' => 'RequestPaymentConfiguration', - 'namespaces' => array( - 'http://s3.amazonaws.com/doc/2006-03-01/', - ), - ), - ), - 'parameters' => array( - 'Bucket' => array( - 'required' => true, - 'type' => 'string', - 'location' => 'uri', - ), - 'Payer' => array( - 'required' => true, - 'type' => 'string', - 'location' => 'xml', - ), - ), - ), - 'PutBucketTagging' => array( - 'httpMethod' => 'PUT', - 'uri' => '/{Bucket}?tagging', - 'class' => 'Aws\\S3\\Command\\S3Command', - 'responseClass' => 'PutBucketTaggingOutput', - 'responseType' => 'model', - 'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTtagging.html', - 'data' => array( - 'xmlRoot' => array( - 'name' => 'Tagging', - 'namespaces' => array( - 'http://s3.amazonaws.com/doc/2006-03-01/', - ), - ), - 'contentMd5' => true, - ), - 'parameters' => array( - 'Bucket' => array( - 'required' => true, - 'type' => 'string', - 'location' => 'uri', - ), - 'TagSet' => array( - 'required' => true, - 'type' => 'array', - 'location' => 'xml', - 'items' => array( - 'name' => 'Tag', - 'type' => 'object', - 'properties' => array( - 'Key' => array( - 'required' => true, - 'type' => 'string', - ), - 'Value' => array( - 'required' => true, - 'type' => 'string', - ), - ), - ), - ), - ), - ), - 'PutBucketVersioning' => array( - 'httpMethod' => 'PUT', - 'uri' => '/{Bucket}?versioning', - 'class' => 'Aws\\S3\\Command\\S3Command', - 'responseClass' => 'PutBucketVersioningOutput', - 'responseType' => 'model', - 'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTVersioningStatus.html', - 'data' => array( - 'xmlRoot' => array( - 'name' => 'VersioningConfiguration', - 'namespaces' => array( - 'http://s3.amazonaws.com/doc/2006-03-01/', - ), - ), - ), - 'parameters' => array( - 'Bucket' => array( - 'required' => true, - 'type' => 'string', - 'location' => 'uri', - ), - 'MFA' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-mfa', - ), - 'MFADelete' => array( - 'type' => 'string', - 'location' => 'xml', - 'sentAs' => 'MfaDelete', - ), - 'Status' => array( - 'type' => 'string', - 'location' => 'xml', - ), - ), - ), - 'PutBucketWebsite' => array( - 'httpMethod' => 'PUT', - 'uri' => '/{Bucket}?website', - 'class' => 'Aws\\S3\\Command\\S3Command', - 'responseClass' => 'PutBucketWebsiteOutput', - 'responseType' => 'model', - 'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTwebsite.html', - 'data' => array( - 'xmlRoot' => array( - 'name' => 'WebsiteConfiguration', - 'namespaces' => array( - 'http://s3.amazonaws.com/doc/2006-03-01/', - ), - ), - 'xmlAllowEmpty' => true, - ), - 'parameters' => array( - 'Bucket' => array( - 'required' => true, - 'type' => 'string', - 'location' => 'uri', - ), - 'ErrorDocument' => array( - 'type' => 'object', - 'location' => 'xml', - 'properties' => array( - 'Key' => array( - 'required' => true, - 'type' => 'string', - ), - ), - ), - 'IndexDocument' => array( - 'type' => 'object', - 'location' => 'xml', - 'properties' => array( - 'Suffix' => array( - 'required' => true, - 'type' => 'string', - ), - ), - ), - 'RedirectAllRequestsTo' => array( - 'type' => 'object', - 'location' => 'xml', - 'properties' => array( - 'HostName' => array( - 'required' => true, - 'type' => 'string', - ), - 'Protocol' => array( - 'type' => 'string', - ), - ), - ), - 'RoutingRules' => array( - 'type' => 'array', - 'location' => 'xml', - 'items' => array( - 'name' => 'RoutingRule', - 'type' => 'object', - 'properties' => array( - 'Condition' => array( - 'type' => 'object', - 'properties' => array( - 'HttpErrorCodeReturnedEquals' => array( - 'type' => 'string', - ), - 'KeyPrefixEquals' => array( - 'type' => 'string', - ), - ), - ), - 'Redirect' => array( - 'required' => true, - 'type' => 'object', - 'properties' => array( - 'HostName' => array( - 'type' => 'string', - ), - 'HttpRedirectCode' => array( - 'type' => 'string', - ), - 'Protocol' => array( - 'type' => 'string', - ), - 'ReplaceKeyPrefixWith' => array( - 'type' => 'string', - ), - 'ReplaceKeyWith' => array( - 'type' => 'string', - ), - ), - ), - ), - ), - ), - ), - ), - 'PutObject' => array( - 'httpMethod' => 'PUT', - 'uri' => '/{Bucket}{/Key*}', - 'class' => 'Aws\\S3\\Command\\S3Command', - 'responseClass' => 'PutObjectOutput', - 'responseType' => 'model', - 'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectPUT.html', - 'data' => array( - 'xmlRoot' => array( - 'name' => 'PutObjectRequest', - 'namespaces' => array( - 'http://s3.amazonaws.com/doc/2006-03-01/', - ), - ), - ), - 'parameters' => array( - 'ACL' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-acl', - ), - 'Body' => array( - 'type' => array( - 'string', - 'object', - ), - 'location' => 'body', - ), - 'Bucket' => array( - 'required' => true, - 'type' => 'string', - 'location' => 'uri', - ), - 'CacheControl' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'Cache-Control', - ), - 'ContentDisposition' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'Content-Disposition', - ), - 'ContentEncoding' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'Content-Encoding', - ), - 'ContentLanguage' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'Content-Language', - ), - 'ContentLength' => array( - 'type' => 'numeric', - 'location' => 'header', - 'sentAs' => 'Content-Length', - ), - 'ContentMD5' => array( - 'type' => array( - 'string', - 'boolean', - ), - 'location' => 'header', - 'sentAs' => 'Content-MD5', - ), - 'ContentType' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'Content-Type', - ), - 'Expires' => array( - 'type' => array( - 'object', - 'string', - 'integer', - ), - 'format' => 'date-time-http', - 'location' => 'header', - ), - 'GrantFullControl' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-grant-full-control', - ), - 'GrantRead' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-grant-read', - ), - 'GrantReadACP' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-grant-read-acp', - ), - 'GrantWriteACP' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-grant-write-acp', - ), - 'Key' => array( - 'required' => true, - 'type' => 'string', - 'location' => 'uri', - 'filters' => array( - 'Aws\\S3\\S3Client::explodeKey', - ), - ), - 'Metadata' => array( - 'type' => 'object', - 'location' => 'header', - 'sentAs' => 'x-amz-meta-', - 'additionalProperties' => array( - 'type' => 'string', - ), - ), - 'ServerSideEncryption' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-server-side-encryption', - ), - 'StorageClass' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-storage-class', - ), - 'WebsiteRedirectLocation' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-website-redirect-location', - ), - 'SSECustomerAlgorithm' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-server-side-encryption-customer-algorithm', - ), - 'SSECustomerKey' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-server-side-encryption-customer-key', - ), - 'SSECustomerKeyMD5' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-server-side-encryption-customer-key-MD5', - ), - 'SSEKMSKeyId' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-server-side-encryption-aws-kms-key-id', - ), - 'ACP' => array( - 'type' => 'object', - 'additionalProperties' => true, - ), - ), - ), - 'PutObjectAcl' => array( - 'httpMethod' => 'PUT', - 'uri' => '/{Bucket}{/Key*}?acl', - 'class' => 'Aws\\S3\\Command\\S3Command', - 'responseClass' => 'PutObjectAclOutput', - 'responseType' => 'model', - 'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectPUTacl.html', - 'data' => array( - 'xmlRoot' => array( - 'name' => 'AccessControlPolicy', - 'namespaces' => array( - 'http://s3.amazonaws.com/doc/2006-03-01/', - ), - ), - ), - 'parameters' => array( - 'ACL' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-acl', - ), - 'Grants' => array( - 'type' => 'array', - 'location' => 'xml', - 'sentAs' => 'AccessControlList', - 'items' => array( - 'name' => 'Grant', - 'type' => 'object', - 'properties' => array( - 'Grantee' => array( - 'type' => 'object', - 'properties' => array( - 'DisplayName' => array( - 'type' => 'string', - ), - 'EmailAddress' => array( - 'type' => 'string', - ), - 'ID' => array( - 'type' => 'string', - ), - 'Type' => array( - 'required' => true, - 'type' => 'string', - 'sentAs' => 'xsi:type', - 'data' => array( - 'xmlAttribute' => true, - 'xmlNamespace' => 'http://www.w3.org/2001/XMLSchema-instance', - ), - ), - 'URI' => array( - 'type' => 'string', - ), - ), - ), - 'Permission' => array( - 'type' => 'string', - ), - ), - ), - ), - 'Owner' => array( - 'type' => 'object', - 'location' => 'xml', - 'properties' => array( - 'DisplayName' => array( - 'type' => 'string', - ), - 'ID' => array( - 'type' => 'string', - ), - ), - ), - 'Bucket' => array( - 'required' => true, - 'type' => 'string', - 'location' => 'uri', - ), - 'GrantFullControl' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-grant-full-control', - ), - 'GrantRead' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-grant-read', - ), - 'GrantReadACP' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-grant-read-acp', - ), - 'GrantWrite' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-grant-write', - ), - 'GrantWriteACP' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-grant-write-acp', - ), - 'Key' => array( - 'required' => true, - 'type' => 'string', - 'location' => 'uri', - 'filters' => array( - 'Aws\\S3\\S3Client::explodeKey', - ), - ), - 'ACP' => array( - 'type' => 'object', - 'additionalProperties' => true, - ), - ), - 'errorResponses' => array( - array( - 'reason' => 'The specified key does not exist.', - 'class' => 'NoSuchKeyException', - ), - ), - ), - 'RestoreObject' => array( - 'httpMethod' => 'POST', - 'uri' => '/{Bucket}{/Key*}?restore', - 'class' => 'Aws\\S3\\Command\\S3Command', - 'responseClass' => 'RestoreObjectOutput', - 'responseType' => 'model', - 'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectRestore.html', - 'data' => array( - 'xmlRoot' => array( - 'name' => 'RestoreRequest', - 'namespaces' => array( - 'http://s3.amazonaws.com/doc/2006-03-01/', - ), - ), - ), - 'parameters' => array( - 'Bucket' => array( - 'required' => true, - 'type' => 'string', - 'location' => 'uri', - ), - 'Key' => array( - 'required' => true, - 'type' => 'string', - 'location' => 'uri', - 'filters' => array( - 'Aws\\S3\\S3Client::explodeKey', - ), - ), - 'VersionId' => array( - 'type' => 'string', - 'location' => 'query', - 'sentAs' => 'versionId', - ), - 'Days' => array( - 'required' => true, - 'type' => 'numeric', - 'location' => 'xml', - ), - ), - 'errorResponses' => array( - array( - 'reason' => 'This operation is not allowed against this storage tier', - 'class' => 'ObjectAlreadyInActiveTierErrorException', - ), - ), - ), - 'UploadPart' => array( - 'httpMethod' => 'PUT', - 'uri' => '/{Bucket}{/Key*}', - 'class' => 'Aws\\S3\\Command\\S3Command', - 'responseClass' => 'UploadPartOutput', - 'responseType' => 'model', - 'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/mpUploadUploadPart.html', - 'data' => array( - 'xmlRoot' => array( - 'name' => 'UploadPartRequest', - 'namespaces' => array( - 'http://s3.amazonaws.com/doc/2006-03-01/', - ), - ), - ), - 'parameters' => array( - 'Body' => array( - 'type' => array( - 'string', - 'object', - ), - 'location' => 'body', - ), - 'Bucket' => array( - 'required' => true, - 'type' => 'string', - 'location' => 'uri', - ), - 'ContentLength' => array( - 'type' => 'numeric', - 'location' => 'header', - 'sentAs' => 'Content-Length', - ), - 'ContentMD5' => array( - 'type' => array( - 'string', - 'boolean', - ), - 'location' => 'header', - 'sentAs' => 'Content-MD5', - ), - 'Key' => array( - 'required' => true, - 'type' => 'string', - 'location' => 'uri', - 'filters' => array( - 'Aws\\S3\\S3Client::explodeKey', - ), - ), - 'PartNumber' => array( - 'required' => true, - 'type' => 'numeric', - 'location' => 'query', - 'sentAs' => 'partNumber', - ), - 'UploadId' => array( - 'required' => true, - 'type' => 'string', - 'location' => 'query', - 'sentAs' => 'uploadId', - ), - 'SSECustomerAlgorithm' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-server-side-encryption-customer-algorithm', - ), - 'SSECustomerKey' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-server-side-encryption-customer-key', - ), - 'SSECustomerKeyMD5' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-server-side-encryption-customer-key-MD5', - ), - 'SSEKMSKeyId' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-server-side-encryption-aws-kms-key-id', - ), - ), - ), - 'UploadPartCopy' => array( - 'httpMethod' => 'PUT', - 'uri' => '/{Bucket}{/Key*}', - 'class' => 'Aws\\S3\\Command\\S3Command', - 'responseClass' => 'UploadPartCopyOutput', - 'responseType' => 'model', - 'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/mpUploadUploadPartCopy.html', - 'data' => array( - 'xmlRoot' => array( - 'name' => 'UploadPartCopyRequest', - 'namespaces' => array( - 'http://s3.amazonaws.com/doc/2006-03-01/', - ), - ), - ), - 'parameters' => array( - 'Bucket' => array( - 'required' => true, - 'type' => 'string', - 'location' => 'uri', - ), - 'CopySource' => array( - 'required' => true, - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-copy-source', - ), - 'CopySourceIfMatch' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-copy-source-if-match', - ), - 'CopySourceIfModifiedSince' => array( - 'type' => array( - 'object', - 'string', - 'integer', - ), - 'format' => 'date-time-http', - 'location' => 'header', - 'sentAs' => 'x-amz-copy-source-if-modified-since', - ), - 'CopySourceIfNoneMatch' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-copy-source-if-none-match', - ), - 'CopySourceIfUnmodifiedSince' => array( - 'type' => array( - 'object', - 'string', - 'integer', - ), - 'format' => 'date-time-http', - 'location' => 'header', - 'sentAs' => 'x-amz-copy-source-if-unmodified-since', - ), - 'CopySourceRange' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-copy-source-range', - ), - 'Key' => array( - 'required' => true, - 'type' => 'string', - 'location' => 'uri', - 'filters' => array( - 'Aws\\S3\\S3Client::explodeKey', - ), - ), - 'PartNumber' => array( - 'required' => true, - 'type' => 'numeric', - 'location' => 'query', - 'sentAs' => 'partNumber', - ), - 'UploadId' => array( - 'required' => true, - 'type' => 'string', - 'location' => 'query', - 'sentAs' => 'uploadId', - ), - 'SSECustomerAlgorithm' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-server-side-encryption-customer-algorithm', - ), - 'SSECustomerKey' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-server-side-encryption-customer-key', - ), - 'SSECustomerKeyMD5' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-server-side-encryption-customer-key-MD5', - ), - 'CopySourceSSECustomerAlgorithm' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-copy-source-server-side-encryption-customer-algorithm', - ), - 'CopySourceSSECustomerKey' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-copy-source-server-side-encryption-customer-key', - ), - 'CopySourceSSECustomerKeyMD5' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-copy-source-server-side-encryption-customer-key-MD5', - ), - 'CopySourceSSEKMSKeyId' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-server-side-encryption-aws-kms-key-id', - ), - 'command.expects' => array( - 'static' => true, - 'default' => 'application/xml', - ), - ), - ), - ), - 'models' => array( - 'AbortMultipartUploadOutput' => array( - 'type' => 'object', - 'additionalProperties' => true, - 'properties' => array( - 'RequestId' => array( - 'location' => 'header', - 'sentAs' => 'x-amz-request-id', - ), - ), - ), - 'CompleteMultipartUploadOutput' => array( - 'type' => 'object', - 'additionalProperties' => true, - 'properties' => array( - 'Location' => array( - 'type' => 'string', - 'location' => 'xml', - ), - 'Bucket' => array( - 'type' => 'string', - 'location' => 'xml', - ), - 'Key' => array( - 'type' => 'string', - 'location' => 'xml', - ), - 'Expiration' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-expiration', - ), - 'ETag' => array( - 'type' => 'string', - 'location' => 'xml', - ), - 'ServerSideEncryption' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-server-side-encryption', - ), - 'VersionId' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-version-id', - ), - 'SSEKMSKeyId' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-server-side-encryption-aws-kms-key-id', - ), - 'RequestId' => array( - 'location' => 'header', - 'sentAs' => 'x-amz-request-id', - ), - ), - ), - 'CopyObjectOutput' => array( - 'type' => 'object', - 'additionalProperties' => true, - 'properties' => array( - 'ETag' => array( - 'type' => 'string', - 'location' => 'xml', - ), - 'LastModified' => array( - 'type' => 'string', - 'location' => 'xml', - ), - 'Expiration' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-expiration', - ), - 'CopySourceVersionId' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-copy-source-version-id', - ), - 'ServerSideEncryption' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-server-side-encryption', - ), - 'SSECustomerAlgorithm' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-server-side-encryption-customer-algorithm', - ), - 'SSECustomerKeyMD5' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-server-side-encryption-customer-key-MD5', - ), - 'SSEKMSKeyId' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-server-side-encryption-aws-kms-key-id', - ), - 'RequestId' => array( - 'location' => 'header', - 'sentAs' => 'x-amz-request-id', - ), - ), - ), - 'CreateBucketOutput' => array( - 'type' => 'object', - 'additionalProperties' => true, - 'properties' => array( - 'Location' => array( - 'type' => 'string', - 'location' => 'header', - ), - 'RequestId' => array( - 'location' => 'header', - 'sentAs' => 'x-amz-request-id', - ), - ), - ), - 'CreateMultipartUploadOutput' => array( - 'type' => 'object', - 'additionalProperties' => true, - 'properties' => array( - 'Bucket' => array( - 'type' => 'string', - 'location' => 'xml', - 'sentAs' => 'Bucket', - ), - 'Key' => array( - 'type' => 'string', - 'location' => 'xml', - ), - 'UploadId' => array( - 'type' => 'string', - 'location' => 'xml', - ), - 'ServerSideEncryption' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-server-side-encryption', - ), - 'SSECustomerAlgorithm' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-server-side-encryption-customer-algorithm', - ), - 'SSECustomerKeyMD5' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-server-side-encryption-customer-key-MD5', - ), - 'SSEKMSKeyId' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-server-side-encryption-aws-kms-key-id', - ), - 'RequestId' => array( - 'location' => 'header', - 'sentAs' => 'x-amz-request-id', - ), - ), - ), - 'DeleteBucketOutput' => array( - 'type' => 'object', - 'additionalProperties' => true, - 'properties' => array( - 'RequestId' => array( - 'location' => 'header', - 'sentAs' => 'x-amz-request-id', - ), - ), - ), - 'DeleteBucketCorsOutput' => array( - 'type' => 'object', - 'additionalProperties' => true, - 'properties' => array( - 'RequestId' => array( - 'location' => 'header', - 'sentAs' => 'x-amz-request-id', - ), - ), - ), - 'DeleteBucketLifecycleOutput' => array( - 'type' => 'object', - 'additionalProperties' => true, - 'properties' => array( - 'RequestId' => array( - 'location' => 'header', - 'sentAs' => 'x-amz-request-id', - ), - ), - ), - 'DeleteBucketPolicyOutput' => array( - 'type' => 'object', - 'additionalProperties' => true, - 'properties' => array( - 'RequestId' => array( - 'location' => 'header', - 'sentAs' => 'x-amz-request-id', - ), - ), - ), - 'DeleteBucketTaggingOutput' => array( - 'type' => 'object', - 'additionalProperties' => true, - 'properties' => array( - 'RequestId' => array( - 'location' => 'header', - 'sentAs' => 'x-amz-request-id', - ), - ), - ), - 'DeleteBucketWebsiteOutput' => array( - 'type' => 'object', - 'additionalProperties' => true, - 'properties' => array( - 'RequestId' => array( - 'location' => 'header', - 'sentAs' => 'x-amz-request-id', - ), - ), - ), - 'DeleteObjectOutput' => array( - 'type' => 'object', - 'additionalProperties' => true, - 'properties' => array( - 'DeleteMarker' => array( - 'type' => 'boolean', - 'location' => 'header', - 'sentAs' => 'x-amz-delete-marker', - ), - 'VersionId' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-version-id', - ), - 'RequestId' => array( - 'location' => 'header', - 'sentAs' => 'x-amz-request-id', - ), - ), - ), - 'DeleteObjectsOutput' => array( - 'type' => 'object', - 'additionalProperties' => true, - 'properties' => array( - 'Deleted' => array( - 'type' => 'array', - 'location' => 'xml', - 'data' => array( - 'xmlFlattened' => true, - ), - 'items' => array( - 'name' => 'DeletedObject', - 'type' => 'object', - 'properties' => array( - 'Key' => array( - 'type' => 'string', - ), - 'VersionId' => array( - 'type' => 'string', - ), - 'DeleteMarker' => array( - 'type' => 'boolean', - ), - 'DeleteMarkerVersionId' => array( - 'type' => 'string', - ), - ), - ), - ), - 'Errors' => array( - 'type' => 'array', - 'location' => 'xml', - 'sentAs' => 'Error', - 'data' => array( - 'xmlFlattened' => true, - ), - 'items' => array( - 'name' => 'Error', - 'type' => 'object', - 'sentAs' => 'Error', - 'properties' => array( - 'Key' => array( - 'type' => 'string', - ), - 'VersionId' => array( - 'type' => 'string', - ), - 'Code' => array( - 'type' => 'string', - ), - 'Message' => array( - 'type' => 'string', - ), - ), - ), - ), - 'RequestId' => array( - 'location' => 'header', - 'sentAs' => 'x-amz-request-id', - ), - ), - ), - 'GetBucketAclOutput' => array( - 'type' => 'object', - 'additionalProperties' => true, - 'properties' => array( - 'Owner' => array( - 'type' => 'object', - 'location' => 'xml', - 'properties' => array( - 'DisplayName' => array( - 'type' => 'string', - ), - 'ID' => array( - 'type' => 'string', - ), - ), - ), - 'Grants' => array( - 'type' => 'array', - 'location' => 'xml', - 'sentAs' => 'AccessControlList', - 'items' => array( - 'name' => 'Grant', - 'type' => 'object', - 'sentAs' => 'Grant', - 'properties' => array( - 'Grantee' => array( - 'type' => 'object', - 'properties' => array( - 'DisplayName' => array( - 'type' => 'string', - ), - 'EmailAddress' => array( - 'type' => 'string', - ), - 'ID' => array( - 'type' => 'string', - ), - 'Type' => array( - 'type' => 'string', - 'sentAs' => 'xsi:type', - 'data' => array( - 'xmlAttribute' => true, - 'xmlNamespace' => 'http://www.w3.org/2001/XMLSchema-instance', - ), - ), - 'URI' => array( - 'type' => 'string', - ), - ), - ), - 'Permission' => array( - 'type' => 'string', - ), - ), - ), - ), - 'RequestId' => array( - 'location' => 'header', - 'sentAs' => 'x-amz-request-id', - ), - ), - ), - 'GetBucketCorsOutput' => array( - 'type' => 'object', - 'additionalProperties' => true, - 'properties' => array( - 'CORSRules' => array( - 'type' => 'array', - 'location' => 'xml', - 'sentAs' => 'CORSRule', - 'data' => array( - 'xmlFlattened' => true, - ), - 'items' => array( - 'name' => 'CORSRule', - 'type' => 'object', - 'sentAs' => 'CORSRule', - 'properties' => array( - 'AllowedHeaders' => array( - 'type' => 'array', - 'sentAs' => 'AllowedHeader', - 'data' => array( - 'xmlFlattened' => true, - ), - 'items' => array( - 'name' => 'AllowedHeader', - 'type' => 'string', - 'sentAs' => 'AllowedHeader', - ), - ), - 'AllowedMethods' => array( - 'type' => 'array', - 'sentAs' => 'AllowedMethod', - 'data' => array( - 'xmlFlattened' => true, - ), - 'items' => array( - 'name' => 'AllowedMethod', - 'type' => 'string', - 'sentAs' => 'AllowedMethod', - ), - ), - 'AllowedOrigins' => array( - 'type' => 'array', - 'sentAs' => 'AllowedOrigin', - 'data' => array( - 'xmlFlattened' => true, - ), - 'items' => array( - 'name' => 'AllowedOrigin', - 'type' => 'string', - 'sentAs' => 'AllowedOrigin', - ), - ), - 'ExposeHeaders' => array( - 'type' => 'array', - 'sentAs' => 'ExposeHeader', - 'data' => array( - 'xmlFlattened' => true, - ), - 'items' => array( - 'name' => 'ExposeHeader', - 'type' => 'string', - 'sentAs' => 'ExposeHeader', - ), - ), - 'MaxAgeSeconds' => array( - 'type' => 'numeric', - ), - ), - ), - ), - 'RequestId' => array( - 'location' => 'header', - 'sentAs' => 'x-amz-request-id', - ), - ), - ), - 'GetBucketLifecycleOutput' => array( - 'type' => 'object', - 'additionalProperties' => true, - 'properties' => array( - 'Rules' => array( - 'type' => 'array', - 'location' => 'xml', - 'sentAs' => 'Rule', - 'data' => array( - 'xmlFlattened' => true, - ), - 'items' => array( - 'name' => 'Rule', - 'type' => 'object', - 'sentAs' => 'Rule', - 'properties' => array( - 'Expiration' => array( - 'type' => 'object', - 'properties' => array( - 'Date' => array( - 'type' => 'string', - ), - 'Days' => array( - 'type' => 'numeric', - ), - ), - ), - 'ID' => array( - 'type' => 'string', - ), - 'Prefix' => array( - 'type' => 'string', - ), - 'Status' => array( - 'type' => 'string', - ), - 'Transition' => array( - 'type' => 'object', - 'properties' => array( - 'Date' => array( - 'type' => 'string', - ), - 'Days' => array( - 'type' => 'numeric', - ), - 'StorageClass' => array( - 'type' => 'string', - ), - ), - ), - 'NoncurrentVersionTransition' => array( - 'type' => 'object', - 'properties' => array( - 'NoncurrentDays' => array( - 'type' => 'numeric', - ), - 'StorageClass' => array( - 'type' => 'string', - ), - ), - ), - 'NoncurrentVersionExpiration' => array( - 'type' => 'object', - 'properties' => array( - 'NoncurrentDays' => array( - 'type' => 'numeric', - ), - ), - ), - ), - ), - ), - 'RequestId' => array( - 'location' => 'header', - 'sentAs' => 'x-amz-request-id', - ), - ), - ), - 'GetBucketLocationOutput' => array( - 'type' => 'object', - 'additionalProperties' => true, - 'properties' => array( - 'Location' => array( - 'type' => 'string', - 'location' => 'body', - 'filters' => array( - 'strval', - 'strip_tags', - 'trim', - ), - ), - ), - ), - 'GetBucketLoggingOutput' => array( - 'type' => 'object', - 'additionalProperties' => true, - 'properties' => array( - 'LoggingEnabled' => array( - 'type' => 'object', - 'location' => 'xml', - 'properties' => array( - 'TargetBucket' => array( - 'type' => 'string', - ), - 'TargetGrants' => array( - 'type' => 'array', - 'items' => array( - 'name' => 'Grant', - 'type' => 'object', - 'sentAs' => 'Grant', - 'properties' => array( - 'Grantee' => array( - 'type' => 'object', - 'properties' => array( - 'DisplayName' => array( - 'type' => 'string', - ), - 'EmailAddress' => array( - 'type' => 'string', - ), - 'ID' => array( - 'type' => 'string', - ), - 'Type' => array( - 'type' => 'string', - 'sentAs' => 'xsi:type', - 'data' => array( - 'xmlAttribute' => true, - 'xmlNamespace' => 'http://www.w3.org/2001/XMLSchema-instance', - ), - ), - 'URI' => array( - 'type' => 'string', - ), - ), - ), - 'Permission' => array( - 'type' => 'string', - ), - ), - ), - ), - 'TargetPrefix' => array( - 'type' => 'string', - ), - ), - ), - 'RequestId' => array( - 'location' => 'header', - 'sentAs' => 'x-amz-request-id', - ), - ), - ), - 'GetBucketNotificationOutput' => array( - 'type' => 'object', - 'additionalProperties' => true, - 'properties' => array( - 'TopicConfiguration' => array( - 'type' => 'object', - 'location' => 'xml', - 'properties' => array( - 'Id' => array( - 'type' => 'string', - ), - 'Events' => array( - 'type' => 'array', - 'sentAs' => 'Event', - 'data' => array( - 'xmlFlattened' => true, - ), - 'items' => array( - 'name' => 'Event', - 'type' => 'string', - 'sentAs' => 'Event', - ), - ), - 'Event' => array( - 'type' => 'string', - ), - 'Topic' => array( - 'type' => 'string', - ), - ), - ), - 'QueueConfiguration' => array( - 'type' => 'object', - 'location' => 'xml', - 'properties' => array( - 'Id' => array( - 'type' => 'string', - ), - 'Event' => array( - 'type' => 'string', - ), - 'Events' => array( - 'type' => 'array', - 'sentAs' => 'Event', - 'data' => array( - 'xmlFlattened' => true, - ), - 'items' => array( - 'name' => 'Event', - 'type' => 'string', - 'sentAs' => 'Event', - ), - ), - 'Queue' => array( - 'type' => 'string', - ), - ), - ), - 'CloudFunctionConfiguration' => array( - 'type' => 'object', - 'location' => 'xml', - 'properties' => array( - 'Id' => array( - 'type' => 'string', - ), - 'Event' => array( - 'type' => 'string', - ), - 'Events' => array( - 'type' => 'array', - 'sentAs' => 'Event', - 'data' => array( - 'xmlFlattened' => true, - ), - 'items' => array( - 'name' => 'Event', - 'type' => 'string', - 'sentAs' => 'Event', - ), - ), - 'CloudFunction' => array( - 'type' => 'string', - ), - 'InvocationRole' => array( - 'type' => 'string', - ), - ), - ), - 'RequestId' => array( - 'location' => 'header', - 'sentAs' => 'x-amz-request-id', - ), - ), - ), - 'GetBucketPolicyOutput' => array( - 'type' => 'object', - 'additionalProperties' => true, - 'properties' => array( - 'Policy' => array( - 'type' => 'string', - 'instanceOf' => 'Guzzle\\Http\\EntityBody', - 'location' => 'body', - ), - 'RequestId' => array( - 'location' => 'header', - 'sentAs' => 'x-amz-request-id', - ), - ), - ), - 'GetBucketRequestPaymentOutput' => array( - 'type' => 'object', - 'additionalProperties' => true, - 'properties' => array( - 'Payer' => array( - 'type' => 'string', - 'location' => 'xml', - ), - 'RequestId' => array( - 'location' => 'header', - 'sentAs' => 'x-amz-request-id', - ), - ), - ), - 'GetBucketTaggingOutput' => array( - 'type' => 'object', - 'additionalProperties' => true, - 'properties' => array( - 'TagSet' => array( - 'type' => 'array', - 'location' => 'xml', - 'items' => array( - 'name' => 'Tag', - 'type' => 'object', - 'sentAs' => 'Tag', - 'properties' => array( - 'Key' => array( - 'type' => 'string', - ), - 'Value' => array( - 'type' => 'string', - ), - ), - ), - ), - 'RequestId' => array( - 'location' => 'header', - 'sentAs' => 'x-amz-request-id', - ), - ), - ), - 'GetBucketVersioningOutput' => array( - 'type' => 'object', - 'additionalProperties' => true, - 'properties' => array( - 'Status' => array( - 'type' => 'string', - 'location' => 'xml', - ), - 'MFADelete' => array( - 'type' => 'string', - 'location' => 'xml', - 'sentAs' => 'MfaDelete', - ), - 'RequestId' => array( - 'location' => 'header', - 'sentAs' => 'x-amz-request-id', - ), - ), - ), - 'GetBucketWebsiteOutput' => array( - 'type' => 'object', - 'additionalProperties' => true, - 'properties' => array( - 'RedirectAllRequestsTo' => array( - 'type' => 'object', - 'location' => 'xml', - 'properties' => array( - 'HostName' => array( - 'type' => 'string', - ), - 'Protocol' => array( - 'type' => 'string', - ), - ), - ), - 'IndexDocument' => array( - 'type' => 'object', - 'location' => 'xml', - 'properties' => array( - 'Suffix' => array( - 'type' => 'string', - ), - ), - ), - 'ErrorDocument' => array( - 'type' => 'object', - 'location' => 'xml', - 'properties' => array( - 'Key' => array( - 'type' => 'string', - ), - ), - ), - 'RoutingRules' => array( - 'type' => 'array', - 'location' => 'xml', - 'items' => array( - 'name' => 'RoutingRule', - 'type' => 'object', - 'sentAs' => 'RoutingRule', - 'properties' => array( - 'Condition' => array( - 'type' => 'object', - 'properties' => array( - 'HttpErrorCodeReturnedEquals' => array( - 'type' => 'string', - ), - 'KeyPrefixEquals' => array( - 'type' => 'string', - ), - ), - ), - 'Redirect' => array( - 'type' => 'object', - 'properties' => array( - 'HostName' => array( - 'type' => 'string', - ), - 'HttpRedirectCode' => array( - 'type' => 'string', - ), - 'Protocol' => array( - 'type' => 'string', - ), - 'ReplaceKeyPrefixWith' => array( - 'type' => 'string', - ), - 'ReplaceKeyWith' => array( - 'type' => 'string', - ), - ), - ), - ), - ), - ), - 'RequestId' => array( - 'location' => 'header', - 'sentAs' => 'x-amz-request-id', - ), - ), - ), - 'GetObjectOutput' => array( - 'type' => 'object', - 'additionalProperties' => true, - 'properties' => array( - 'Body' => array( - 'type' => 'string', - 'instanceOf' => 'Guzzle\\Http\\EntityBody', - 'location' => 'body', - ), - 'DeleteMarker' => array( - 'type' => 'boolean', - 'location' => 'header', - 'sentAs' => 'x-amz-delete-marker', - ), - 'AcceptRanges' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'accept-ranges', - ), - 'Expiration' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-expiration', - ), - 'Restore' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-restore', - ), - 'LastModified' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'Last-Modified', - ), - 'ContentLength' => array( - 'type' => 'numeric', - 'location' => 'header', - 'sentAs' => 'Content-Length', - ), - 'ETag' => array( - 'type' => 'string', - 'location' => 'header', - ), - 'MissingMeta' => array( - 'type' => 'numeric', - 'location' => 'header', - 'sentAs' => 'x-amz-missing-meta', - ), - 'VersionId' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-version-id', - ), - 'CacheControl' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'Cache-Control', - ), - 'ContentDisposition' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'Content-Disposition', - ), - 'ContentEncoding' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'Content-Encoding', - ), - 'ContentLanguage' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'Content-Language', - ), - 'ContentType' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'Content-Type', - ), - 'Expires' => array( - 'type' => 'string', - 'location' => 'header', - ), - 'WebsiteRedirectLocation' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-website-redirect-location', - ), - 'ServerSideEncryption' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-server-side-encryption', - ), - 'Metadata' => array( - 'type' => 'object', - 'location' => 'header', - 'sentAs' => 'x-amz-meta-', - 'additionalProperties' => array( - 'type' => 'string', - ), - ), - 'SSECustomerAlgorithm' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-server-side-encryption-customer-algorithm', - ), - 'SSECustomerKeyMD5' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-server-side-encryption-customer-key-MD5', - ), - 'SSEKMSKeyId' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-server-side-encryption-aws-kms-key-id', - ), - 'RequestId' => array( - 'location' => 'header', - 'sentAs' => 'x-amz-request-id', - ), - ), - ), - 'GetObjectAclOutput' => array( - 'type' => 'object', - 'additionalProperties' => true, - 'properties' => array( - 'Owner' => array( - 'type' => 'object', - 'location' => 'xml', - 'properties' => array( - 'DisplayName' => array( - 'type' => 'string', - ), - 'ID' => array( - 'type' => 'string', - ), - ), - ), - 'Grants' => array( - 'type' => 'array', - 'location' => 'xml', - 'sentAs' => 'AccessControlList', - 'items' => array( - 'name' => 'Grant', - 'type' => 'object', - 'sentAs' => 'Grant', - 'properties' => array( - 'Grantee' => array( - 'type' => 'object', - 'properties' => array( - 'DisplayName' => array( - 'type' => 'string', - ), - 'EmailAddress' => array( - 'type' => 'string', - ), - 'ID' => array( - 'type' => 'string', - ), - 'Type' => array( - 'type' => 'string', - 'sentAs' => 'xsi:type', - 'data' => array( - 'xmlAttribute' => true, - 'xmlNamespace' => 'http://www.w3.org/2001/XMLSchema-instance', - ), - ), - 'URI' => array( - 'type' => 'string', - ), - ), - ), - 'Permission' => array( - 'type' => 'string', - ), - ), - ), - ), - 'RequestId' => array( - 'location' => 'header', - 'sentAs' => 'x-amz-request-id', - ), - ), - ), - 'GetObjectTorrentOutput' => array( - 'type' => 'object', - 'additionalProperties' => true, - 'properties' => array( - 'Body' => array( - 'type' => 'string', - 'instanceOf' => 'Guzzle\\Http\\EntityBody', - 'location' => 'body', - ), - 'RequestId' => array( - 'location' => 'header', - 'sentAs' => 'x-amz-request-id', - ), - ), - ), - 'HeadBucketOutput' => array( - 'type' => 'object', - 'additionalProperties' => true, - 'properties' => array( - 'RequestId' => array( - 'location' => 'header', - 'sentAs' => 'x-amz-request-id', - ), - ), - ), - 'HeadObjectOutput' => array( - 'type' => 'object', - 'additionalProperties' => true, - 'properties' => array( - 'DeleteMarker' => array( - 'type' => 'boolean', - 'location' => 'header', - 'sentAs' => 'x-amz-delete-marker', - ), - 'AcceptRanges' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'accept-ranges', - ), - 'Expiration' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-expiration', - ), - 'Restore' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-restore', - ), - 'LastModified' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'Last-Modified', - ), - 'ContentLength' => array( - 'type' => 'numeric', - 'location' => 'header', - 'sentAs' => 'Content-Length', - ), - 'ETag' => array( - 'type' => 'string', - 'location' => 'header', - ), - 'MissingMeta' => array( - 'type' => 'numeric', - 'location' => 'header', - 'sentAs' => 'x-amz-missing-meta', - ), - 'VersionId' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-version-id', - ), - 'CacheControl' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'Cache-Control', - ), - 'ContentDisposition' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'Content-Disposition', - ), - 'ContentEncoding' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'Content-Encoding', - ), - 'ContentLanguage' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'Content-Language', - ), - 'ContentType' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'Content-Type', - ), - 'Expires' => array( - 'type' => 'string', - 'location' => 'header', - ), - 'WebsiteRedirectLocation' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-website-redirect-location', - ), - 'ServerSideEncryption' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-server-side-encryption', - ), - 'Metadata' => array( - 'type' => 'object', - 'location' => 'header', - 'sentAs' => 'x-amz-meta-', - 'additionalProperties' => array( - 'type' => 'string', - ), - ), - 'SSECustomerAlgorithm' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-server-side-encryption-customer-algorithm', - ), - 'SSECustomerKeyMD5' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-server-side-encryption-customer-key-MD5', - ), - 'SSEKMSKeyId' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-server-side-encryption-aws-kms-key-id', - ), - 'RequestId' => array( - 'location' => 'header', - 'sentAs' => 'x-amz-request-id', - ), - ), - ), - 'ListBucketsOutput' => array( - 'type' => 'object', - 'additionalProperties' => true, - 'properties' => array( - 'Buckets' => array( - 'type' => 'array', - 'location' => 'xml', - 'items' => array( - 'name' => 'Bucket', - 'type' => 'object', - 'sentAs' => 'Bucket', - 'properties' => array( - 'Name' => array( - 'type' => 'string', - ), - 'CreationDate' => array( - 'type' => 'string', - ), - ), - ), - ), - 'Owner' => array( - 'type' => 'object', - 'location' => 'xml', - 'properties' => array( - 'DisplayName' => array( - 'type' => 'string', - ), - 'ID' => array( - 'type' => 'string', - ), - ), - ), - 'RequestId' => array( - 'location' => 'header', - 'sentAs' => 'x-amz-request-id', - ), - ), - ), - 'ListMultipartUploadsOutput' => array( - 'type' => 'object', - 'additionalProperties' => true, - 'properties' => array( - 'Bucket' => array( - 'type' => 'string', - 'location' => 'xml', - ), - 'KeyMarker' => array( - 'type' => 'string', - 'location' => 'xml', - ), - 'UploadIdMarker' => array( - 'type' => 'string', - 'location' => 'xml', - ), - 'NextKeyMarker' => array( - 'type' => 'string', - 'location' => 'xml', - ), - 'Prefix' => array( - 'type' => 'string', - 'location' => 'xml', - ), - 'Delimiter' => array( - 'type' => 'string', - 'location' => 'xml', - ), - 'NextUploadIdMarker' => array( - 'type' => 'string', - 'location' => 'xml', - ), - 'MaxUploads' => array( - 'type' => 'numeric', - 'location' => 'xml', - ), - 'IsTruncated' => array( - 'type' => 'boolean', - 'location' => 'xml', - ), - 'Uploads' => array( - 'type' => 'array', - 'location' => 'xml', - 'sentAs' => 'Upload', - 'data' => array( - 'xmlFlattened' => true, - ), - 'items' => array( - 'name' => 'MultipartUpload', - 'type' => 'object', - 'sentAs' => 'Upload', - 'properties' => array( - 'UploadId' => array( - 'type' => 'string', - ), - 'Key' => array( - 'type' => 'string', - ), - 'Initiated' => array( - 'type' => 'string', - ), - 'StorageClass' => array( - 'type' => 'string', - ), - 'Owner' => array( - 'type' => 'object', - 'properties' => array( - 'DisplayName' => array( - 'type' => 'string', - ), - 'ID' => array( - 'type' => 'string', - ), - ), - ), - 'Initiator' => array( - 'type' => 'object', - 'properties' => array( - 'ID' => array( - 'type' => 'string', - ), - 'DisplayName' => array( - 'type' => 'string', - ), - ), - ), - ), - ), - ), - 'CommonPrefixes' => array( - 'type' => 'array', - 'location' => 'xml', - 'data' => array( - 'xmlFlattened' => true, - ), - 'items' => array( - 'name' => 'CommonPrefix', - 'type' => 'object', - 'properties' => array( - 'Prefix' => array( - 'type' => 'string', - ), - ), - ), - ), - 'EncodingType' => array( - 'type' => 'string', - 'location' => 'xml', - ), - 'RequestId' => array( - 'location' => 'header', - 'sentAs' => 'x-amz-request-id', - ), - ), - ), - 'ListObjectVersionsOutput' => array( - 'type' => 'object', - 'additionalProperties' => true, - 'properties' => array( - 'IsTruncated' => array( - 'type' => 'boolean', - 'location' => 'xml', - ), - 'KeyMarker' => array( - 'type' => 'string', - 'location' => 'xml', - ), - 'VersionIdMarker' => array( - 'type' => 'string', - 'location' => 'xml', - ), - 'NextKeyMarker' => array( - 'type' => 'string', - 'location' => 'xml', - ), - 'NextVersionIdMarker' => array( - 'type' => 'string', - 'location' => 'xml', - ), - 'Versions' => array( - 'type' => 'array', - 'location' => 'xml', - 'sentAs' => 'Version', - 'data' => array( - 'xmlFlattened' => true, - ), - 'items' => array( - 'name' => 'ObjectVersion', - 'type' => 'object', - 'sentAs' => 'Version', - 'properties' => array( - 'ETag' => array( - 'type' => 'string', - ), - 'Size' => array( - 'type' => 'numeric', - ), - 'StorageClass' => array( - 'type' => 'string', - ), - 'Key' => array( - 'type' => 'string', - ), - 'VersionId' => array( - 'type' => 'string', - ), - 'IsLatest' => array( - 'type' => 'boolean', - ), - 'LastModified' => array( - 'type' => 'string', - ), - 'Owner' => array( - 'type' => 'object', - 'properties' => array( - 'DisplayName' => array( - 'type' => 'string', - ), - 'ID' => array( - 'type' => 'string', - ), - ), - ), - ), - ), - ), - 'DeleteMarkers' => array( - 'type' => 'array', - 'location' => 'xml', - 'sentAs' => 'DeleteMarker', - 'data' => array( - 'xmlFlattened' => true, - ), - 'items' => array( - 'name' => 'DeleteMarkerEntry', - 'type' => 'object', - 'sentAs' => 'DeleteMarker', - 'properties' => array( - 'Owner' => array( - 'type' => 'object', - 'properties' => array( - 'DisplayName' => array( - 'type' => 'string', - ), - 'ID' => array( - 'type' => 'string', - ), - ), - ), - 'Key' => array( - 'type' => 'string', - ), - 'VersionId' => array( - 'type' => 'string', - ), - 'IsLatest' => array( - 'type' => 'boolean', - ), - 'LastModified' => array( - 'type' => 'string', - ), - ), - ), - ), - 'Name' => array( - 'type' => 'string', - 'location' => 'xml', - ), - 'Prefix' => array( - 'type' => 'string', - 'location' => 'xml', - ), - 'Delimiter' => array( - 'type' => 'string', - 'location' => 'xml', - ), - 'MaxKeys' => array( - 'type' => 'numeric', - 'location' => 'xml', - ), - 'CommonPrefixes' => array( - 'type' => 'array', - 'location' => 'xml', - 'data' => array( - 'xmlFlattened' => true, - ), - 'items' => array( - 'name' => 'CommonPrefix', - 'type' => 'object', - 'properties' => array( - 'Prefix' => array( - 'type' => 'string', - ), - ), - ), - ), - 'EncodingType' => array( - 'type' => 'string', - 'location' => 'xml', - ), - 'RequestId' => array( - 'location' => 'header', - 'sentAs' => 'x-amz-request-id', - ), - ), - ), - 'ListObjectsOutput' => array( - 'type' => 'object', - 'additionalProperties' => true, - 'properties' => array( - 'IsTruncated' => array( - 'type' => 'boolean', - 'location' => 'xml', - ), - 'Marker' => array( - 'type' => 'string', - 'location' => 'xml', - ), - 'NextMarker' => array( - 'type' => 'string', - 'location' => 'xml', - ), - 'Contents' => array( - 'type' => 'array', - 'location' => 'xml', - 'data' => array( - 'xmlFlattened' => true, - ), - 'items' => array( - 'name' => 'Object', - 'type' => 'object', - 'properties' => array( - 'Key' => array( - 'type' => 'string', - ), - 'LastModified' => array( - 'type' => 'string', - ), - 'ETag' => array( - 'type' => 'string', - ), - 'Size' => array( - 'type' => 'numeric', - ), - 'StorageClass' => array( - 'type' => 'string', - ), - 'Owner' => array( - 'type' => 'object', - 'properties' => array( - 'DisplayName' => array( - 'type' => 'string', - ), - 'ID' => array( - 'type' => 'string', - ), - ), - ), - ), - ), - ), - 'Name' => array( - 'type' => 'string', - 'location' => 'xml', - ), - 'Prefix' => array( - 'type' => 'string', - 'location' => 'xml', - ), - 'Delimiter' => array( - 'type' => 'string', - 'location' => 'xml', - ), - 'MaxKeys' => array( - 'type' => 'numeric', - 'location' => 'xml', - ), - 'CommonPrefixes' => array( - 'type' => 'array', - 'location' => 'xml', - 'data' => array( - 'xmlFlattened' => true, - ), - 'items' => array( - 'name' => 'CommonPrefix', - 'type' => 'object', - 'properties' => array( - 'Prefix' => array( - 'type' => 'string', - ), - ), - ), - ), - 'EncodingType' => array( - 'type' => 'string', - 'location' => 'xml', - ), - 'RequestId' => array( - 'location' => 'header', - 'sentAs' => 'x-amz-request-id', - ), - ), - ), - 'ListPartsOutput' => array( - 'type' => 'object', - 'additionalProperties' => true, - 'properties' => array( - 'Bucket' => array( - 'type' => 'string', - 'location' => 'xml', - ), - 'Key' => array( - 'type' => 'string', - 'location' => 'xml', - ), - 'UploadId' => array( - 'type' => 'string', - 'location' => 'xml', - ), - 'PartNumberMarker' => array( - 'type' => 'numeric', - 'location' => 'xml', - ), - 'NextPartNumberMarker' => array( - 'type' => 'numeric', - 'location' => 'xml', - ), - 'MaxParts' => array( - 'type' => 'numeric', - 'location' => 'xml', - ), - 'IsTruncated' => array( - 'type' => 'boolean', - 'location' => 'xml', - ), - 'Parts' => array( - 'type' => 'array', - 'location' => 'xml', - 'sentAs' => 'Part', - 'data' => array( - 'xmlFlattened' => true, - ), - 'items' => array( - 'name' => 'Part', - 'type' => 'object', - 'sentAs' => 'Part', - 'properties' => array( - 'PartNumber' => array( - 'type' => 'numeric', - ), - 'LastModified' => array( - 'type' => 'string', - ), - 'ETag' => array( - 'type' => 'string', - ), - 'Size' => array( - 'type' => 'numeric', - ), - ), - ), - ), - 'Initiator' => array( - 'type' => 'object', - 'location' => 'xml', - 'properties' => array( - 'ID' => array( - 'type' => 'string', - ), - 'DisplayName' => array( - 'type' => 'string', - ), - ), - ), - 'Owner' => array( - 'type' => 'object', - 'location' => 'xml', - 'properties' => array( - 'DisplayName' => array( - 'type' => 'string', - ), - 'ID' => array( - 'type' => 'string', - ), - ), - ), - 'StorageClass' => array( - 'type' => 'string', - 'location' => 'xml', - ), - 'RequestId' => array( - 'location' => 'header', - 'sentAs' => 'x-amz-request-id', - ), - ), - ), - 'PutBucketAclOutput' => array( - 'type' => 'object', - 'additionalProperties' => true, - 'properties' => array( - 'RequestId' => array( - 'location' => 'header', - 'sentAs' => 'x-amz-request-id', - ), - ), - ), - 'PutBucketCorsOutput' => array( - 'type' => 'object', - 'additionalProperties' => true, - 'properties' => array( - 'RequestId' => array( - 'location' => 'header', - 'sentAs' => 'x-amz-request-id', - ), - ), - ), - 'PutBucketLifecycleOutput' => array( - 'type' => 'object', - 'additionalProperties' => true, - 'properties' => array( - 'RequestId' => array( - 'location' => 'header', - 'sentAs' => 'x-amz-request-id', - ), - ), - ), - 'PutBucketLoggingOutput' => array( - 'type' => 'object', - 'additionalProperties' => true, - 'properties' => array( - 'RequestId' => array( - 'location' => 'header', - 'sentAs' => 'x-amz-request-id', - ), - ), - ), - 'PutBucketNotificationOutput' => array( - 'type' => 'object', - 'additionalProperties' => true, - 'properties' => array( - 'RequestId' => array( - 'location' => 'header', - 'sentAs' => 'x-amz-request-id', - ), - ), - ), - 'PutBucketPolicyOutput' => array( - 'type' => 'object', - 'additionalProperties' => true, - 'properties' => array( - 'RequestId' => array( - 'location' => 'header', - 'sentAs' => 'x-amz-request-id', - ), - ), - ), - 'PutBucketRequestPaymentOutput' => array( - 'type' => 'object', - 'additionalProperties' => true, - 'properties' => array( - 'RequestId' => array( - 'location' => 'header', - 'sentAs' => 'x-amz-request-id', - ), - ), - ), - 'PutBucketTaggingOutput' => array( - 'type' => 'object', - 'additionalProperties' => true, - 'properties' => array( - 'RequestId' => array( - 'location' => 'header', - 'sentAs' => 'x-amz-request-id', - ), - ), - ), - 'PutBucketVersioningOutput' => array( - 'type' => 'object', - 'additionalProperties' => true, - 'properties' => array( - 'RequestId' => array( - 'location' => 'header', - 'sentAs' => 'x-amz-request-id', - ), - ), - ), - 'PutBucketWebsiteOutput' => array( - 'type' => 'object', - 'additionalProperties' => true, - 'properties' => array( - 'RequestId' => array( - 'location' => 'header', - 'sentAs' => 'x-amz-request-id', - ), - ), - ), - 'PutObjectOutput' => array( - 'type' => 'object', - 'additionalProperties' => true, - 'properties' => array( - 'Expiration' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-expiration', - ), - 'ETag' => array( - 'type' => 'string', - 'location' => 'header', - ), - 'ServerSideEncryption' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-server-side-encryption', - ), - 'VersionId' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-version-id', - ), - 'SSECustomerAlgorithm' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-server-side-encryption-customer-algorithm', - ), - 'SSECustomerKeyMD5' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-server-side-encryption-customer-key-MD5', - ), - 'SSEKMSKeyId' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-server-side-encryption-aws-kms-key-id', - ), - 'RequestId' => array( - 'location' => 'header', - 'sentAs' => 'x-amz-request-id', - ), - 'ObjectURL' => array( - ), - ), - ), - 'PutObjectAclOutput' => array( - 'type' => 'object', - 'additionalProperties' => true, - 'properties' => array( - 'RequestId' => array( - 'location' => 'header', - 'sentAs' => 'x-amz-request-id', - ), - ), - ), - 'RestoreObjectOutput' => array( - 'type' => 'object', - 'additionalProperties' => true, - 'properties' => array( - 'RequestId' => array( - 'location' => 'header', - 'sentAs' => 'x-amz-request-id', - ), - ), - ), - 'UploadPartOutput' => array( - 'type' => 'object', - 'additionalProperties' => true, - 'properties' => array( - 'ServerSideEncryption' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-server-side-encryption', - ), - 'ETag' => array( - 'type' => 'string', - 'location' => 'header', - ), - 'SSECustomerAlgorithm' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-server-side-encryption-customer-algorithm', - ), - 'SSECustomerKeyMD5' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-server-side-encryption-customer-key-MD5', - ), - 'SSEKMSKeyId' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-server-side-encryption-aws-kms-key-id', - ), - 'RequestId' => array( - 'location' => 'header', - 'sentAs' => 'x-amz-request-id', - ), - ), - ), - 'UploadPartCopyOutput' => array( - 'type' => 'object', - 'additionalProperties' => true, - 'properties' => array( - 'CopySourceVersionId' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-copy-source-version-id', - ), - 'ETag' => array( - 'type' => 'string', - 'location' => 'xml', - ), - 'LastModified' => array( - 'type' => 'string', - 'location' => 'xml', - ), - 'ServerSideEncryption' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-server-side-encryption', - ), - 'SSECustomerAlgorithm' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-server-side-encryption-customer-algorithm', - ), - 'SSECustomerKeyMD5' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-server-side-encryption-customer-key-MD5', - ), - 'SSEKMSKeyId' => array( - 'type' => 'string', - 'location' => 'header', - 'sentAs' => 'x-amz-server-side-encryption-aws-kms-key-id', - ), - 'RequestId' => array( - 'location' => 'header', - 'sentAs' => 'x-amz-request-id', - ), - ), - ), - ), - 'iterators' => array( - 'ListBuckets' => array( - 'result_key' => 'Buckets', - ), - 'ListMultipartUploads' => array( - 'limit_key' => 'MaxUploads', - 'more_results' => 'IsTruncated', - 'output_token' => array( - 'NextKeyMarker', - 'NextUploadIdMarker', - ), - 'input_token' => array( - 'KeyMarker', - 'UploadIdMarker', - ), - 'result_key' => array( - 'Uploads', - 'CommonPrefixes', - ), - ), - 'ListObjectVersions' => array( - 'more_results' => 'IsTruncated', - 'limit_key' => 'MaxKeys', - 'output_token' => array( - 'NextKeyMarker', - 'NextVersionIdMarker', - ), - 'input_token' => array( - 'KeyMarker', - 'VersionIdMarker', - ), - 'result_key' => array( - 'Versions', - 'DeleteMarkers', - 'CommonPrefixes', - ), - ), - 'ListObjects' => array( - 'more_results' => 'IsTruncated', - 'limit_key' => 'MaxKeys', - 'output_token' => 'NextMarker', - 'input_token' => 'Marker', - 'result_key' => array( - 'Contents', - 'CommonPrefixes', - ), - ), - 'ListParts' => array( - 'more_results' => 'IsTruncated', - 'limit_key' => 'MaxParts', - 'output_token' => 'NextPartNumberMarker', - 'input_token' => 'PartNumberMarker', - 'result_key' => 'Parts', - ), - ), - 'waiters' => array( - '__default__' => array( - 'interval' => 5, - 'max_attempts' => 20, - ), - 'BucketExists' => array( - 'operation' => 'HeadBucket', - 'success.type' => 'output', - 'ignore_errors' => array( - 'NoSuchBucket', - ), - ), - 'BucketNotExists' => array( - 'operation' => 'HeadBucket', - 'success.type' => 'error', - 'success.value' => 'NoSuchBucket', - ), - 'ObjectExists' => array( - 'operation' => 'HeadObject', - 'success.type' => 'output', - 'ignore_errors' => array( - 'NoSuchKey', - ), - ), - ), -); diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/ResumableDownload.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/ResumableDownload.php deleted file mode 100644 index 386a077370d..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/ResumableDownload.php +++ /dev/null @@ -1,176 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3; - -use Aws\Common\Exception\RuntimeException; -use Aws\Common\Exception\UnexpectedValueException; -use Guzzle\Http\EntityBody; -use Guzzle\Http\ReadLimitEntityBody; -use Guzzle\Http\EntityBodyInterface; -use Guzzle\Service\Resource\Model; - -/** - * Allows you to resume the download of a partially downloaded object. - * - * Downloads objects from Amazon S3 in using "Range" downloads. This allows a partially downloaded object to be resumed - * so that only the remaining portion of the object is downloaded. - */ -class ResumableDownload -{ - /** @var S3Client The S3 client to use to download objects and issue HEAD requests */ - protected $client; - - /** @var \Guzzle\Service\Resource\Model Model object returned when the initial HeadObject operation was called */ - protected $meta; - - /** @var array Array of parameters to pass to a GetObject operation */ - protected $params; - - /** @var \Guzzle\Http\EntityBody Where the object will be downloaded */ - protected $target; - - /** - * @param S3Client $client Client to use when executing requests - * @param string $bucket Bucket that holds the object - * @param string $key Key of the object - * @param string|resource|EntityBodyInterface $target Where the object should be downloaded to. Pass a string to - * save the object to a file, pass a resource returned by - * fopen() to save the object to a stream resource, or pass a - * Guzzle EntityBody object to save the contents to an - * EntityBody. - * @param array $params Any additional GetObject or HeadObject parameters to use - * with each command issued by the client. (e.g. pass "Version" - * to download a specific version of an object) - * @throws RuntimeException if the target variable points to a file that cannot be opened - */ - public function __construct(S3Client $client, $bucket, $key, $target, array $params = array()) - { - $this->params = $params; - $this->client = $client; - $this->params['Bucket'] = $bucket; - $this->params['Key'] = $key; - - // If a string is passed, then assume that the download should stream to a file on disk - if (is_string($target)) { - if (!($target = fopen($target, 'a+'))) { - throw new RuntimeException("Unable to open {$target} for writing"); - } - // Always append to the file - fseek($target, 0, SEEK_END); - } - - // Get the metadata and Content-MD5 of the object - $this->target = EntityBody::factory($target); - } - - /** - * Get the bucket of the download - * - * @return string - */ - public function getBucket() - { - return $this->params['Bucket']; - } - - /** - * Get the key of the download - * - * @return string - */ - public function getKey() - { - return $this->params['Key']; - } - - /** - * Get the file to which the contents are downloaded - * - * @return string - */ - public function getFilename() - { - return $this->target->getUri(); - } - - /** - * Download the remainder of the object from Amazon S3 - * - * Performs a message integrity check if possible - * - * @return Model - */ - public function __invoke() - { - $command = $this->client->getCommand('HeadObject', $this->params); - $this->meta = $command->execute(); - - if ($this->target->ftell() >= $this->meta['ContentLength']) { - return false; - } - - $this->meta['ContentMD5'] = (string) $command->getResponse()->getHeader('Content-MD5'); - - // Use a ReadLimitEntityBody so that rewinding the stream after an error does not cause the file pointer - // to enter an inconsistent state with the data being downloaded - $this->params['SaveAs'] = new ReadLimitEntityBody( - $this->target, - $this->meta['ContentLength'], - $this->target->ftell() - ); - - $result = $this->getRemaining(); - $this->checkIntegrity(); - - return $result; - } - - /** - * Send the command to get the remainder of the object - * - * @return Model - */ - protected function getRemaining() - { - $current = $this->target->ftell(); - $targetByte = $this->meta['ContentLength'] - 1; - $this->params['Range'] = "bytes={$current}-{$targetByte}"; - - // Set the starting offset so that the body is never seeked to before this point in the event of a retry - $this->params['SaveAs']->setOffset($current); - $command = $this->client->getCommand('GetObject', $this->params); - - return $command->execute(); - } - - /** - * Performs an MD5 message integrity check if possible - * - * @throws UnexpectedValueException if the message does not validate - */ - protected function checkIntegrity() - { - if ($this->target->isReadable() && $expected = $this->meta['ContentMD5']) { - $actual = $this->target->getContentMd5(); - if ($actual != $expected) { - throw new UnexpectedValueException( - "Message integrity check failed. Expected {$expected} but got {$actual}." - ); - } - } - } -} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/S3Client.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/S3Client.php deleted file mode 100644 index 7f7c7cf22c4..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/S3Client.php +++ /dev/null @@ -1,680 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3; - -use Aws\Common\Client\AbstractClient; -use Aws\Common\Client\ClientBuilder; -use Aws\Common\Client\ExpiredCredentialsChecker; -use Aws\Common\Client\UploadBodyListener; -use Aws\Common\Enum\ClientOptions as Options; -use Aws\Common\Exception\RuntimeException; -use Aws\Common\Exception\InvalidArgumentException; -use Aws\Common\Signature\SignatureV4; -use Aws\Common\Model\MultipartUpload\AbstractTransfer; -use Aws\S3\Exception\AccessDeniedException; -use Aws\S3\Exception\Parser\S3ExceptionParser; -use Aws\S3\Exception\S3Exception; -use Aws\S3\Model\ClearBucket; -use Aws\S3\Model\MultipartUpload\AbstractTransfer as AbstractMulti; -use Aws\S3\Model\MultipartUpload\UploadBuilder; -use Aws\S3\Sync\DownloadSyncBuilder; -use Aws\S3\Sync\UploadSyncBuilder; -use Guzzle\Common\Collection; -use Guzzle\Http\EntityBody; -use Guzzle\Http\Message\RequestInterface; -use Guzzle\Iterator\FilterIterator; -use Guzzle\Plugin\Backoff\BackoffPlugin; -use Guzzle\Plugin\Backoff\CurlBackoffStrategy; -use Guzzle\Plugin\Backoff\ExponentialBackoffStrategy; -use Guzzle\Plugin\Backoff\HttpBackoffStrategy; -use Guzzle\Plugin\Backoff\TruncatedBackoffStrategy; -use Guzzle\Service\Command\CommandInterface; -use Guzzle\Service\Command\Factory\AliasFactory; -use Guzzle\Service\Command\Factory\CompositeFactory; -use Guzzle\Service\Resource\Model; -use Guzzle\Service\Resource\ResourceIteratorInterface; - -/** - * Client to interact with Amazon Simple Storage Service - * - * @method S3SignatureInterface getSignature() Returns the signature implementation used with the client - * @method Model abortMultipartUpload(array $args = array()) {@command S3 AbortMultipartUpload} - * @method Model completeMultipartUpload(array $args = array()) {@command S3 CompleteMultipartUpload} - * @method Model copyObject(array $args = array()) {@command S3 CopyObject} - * @method Model createBucket(array $args = array()) {@command S3 CreateBucket} - * @method Model createMultipartUpload(array $args = array()) {@command S3 CreateMultipartUpload} - * @method Model deleteBucket(array $args = array()) {@command S3 DeleteBucket} - * @method Model deleteBucketCors(array $args = array()) {@command S3 DeleteBucketCors} - * @method Model deleteBucketLifecycle(array $args = array()) {@command S3 DeleteBucketLifecycle} - * @method Model deleteBucketPolicy(array $args = array()) {@command S3 DeleteBucketPolicy} - * @method Model deleteBucketTagging(array $args = array()) {@command S3 DeleteBucketTagging} - * @method Model deleteBucketWebsite(array $args = array()) {@command S3 DeleteBucketWebsite} - * @method Model deleteObject(array $args = array()) {@command S3 DeleteObject} - * @method Model deleteObjects(array $args = array()) {@command S3 DeleteObjects} - * @method Model getBucketAcl(array $args = array()) {@command S3 GetBucketAcl} - * @method Model getBucketCors(array $args = array()) {@command S3 GetBucketCors} - * @method Model getBucketLifecycle(array $args = array()) {@command S3 GetBucketLifecycle} - * @method Model getBucketLocation(array $args = array()) {@command S3 GetBucketLocation} - * @method Model getBucketLogging(array $args = array()) {@command S3 GetBucketLogging} - * @method Model getBucketNotification(array $args = array()) {@command S3 GetBucketNotification} - * @method Model getBucketPolicy(array $args = array()) {@command S3 GetBucketPolicy} - * @method Model getBucketRequestPayment(array $args = array()) {@command S3 GetBucketRequestPayment} - * @method Model getBucketTagging(array $args = array()) {@command S3 GetBucketTagging} - * @method Model getBucketVersioning(array $args = array()) {@command S3 GetBucketVersioning} - * @method Model getBucketWebsite(array $args = array()) {@command S3 GetBucketWebsite} - * @method Model getObject(array $args = array()) {@command S3 GetObject} - * @method Model getObjectAcl(array $args = array()) {@command S3 GetObjectAcl} - * @method Model getObjectTorrent(array $args = array()) {@command S3 GetObjectTorrent} - * @method Model headBucket(array $args = array()) {@command S3 HeadBucket} - * @method Model headObject(array $args = array()) {@command S3 HeadObject} - * @method Model listBuckets(array $args = array()) {@command S3 ListBuckets} - * @method Model listMultipartUploads(array $args = array()) {@command S3 ListMultipartUploads} - * @method Model listObjectVersions(array $args = array()) {@command S3 ListObjectVersions} - * @method Model listObjects(array $args = array()) {@command S3 ListObjects} - * @method Model listParts(array $args = array()) {@command S3 ListParts} - * @method Model putBucketAcl(array $args = array()) {@command S3 PutBucketAcl} - * @method Model putBucketCors(array $args = array()) {@command S3 PutBucketCors} - * @method Model putBucketLifecycle(array $args = array()) {@command S3 PutBucketLifecycle} - * @method Model putBucketLogging(array $args = array()) {@command S3 PutBucketLogging} - * @method Model putBucketNotification(array $args = array()) {@command S3 PutBucketNotification} - * @method Model putBucketPolicy(array $args = array()) {@command S3 PutBucketPolicy} - * @method Model putBucketRequestPayment(array $args = array()) {@command S3 PutBucketRequestPayment} - * @method Model putBucketTagging(array $args = array()) {@command S3 PutBucketTagging} - * @method Model putBucketVersioning(array $args = array()) {@command S3 PutBucketVersioning} - * @method Model putBucketWebsite(array $args = array()) {@command S3 PutBucketWebsite} - * @method Model putObject(array $args = array()) {@command S3 PutObject} - * @method Model putObjectAcl(array $args = array()) {@command S3 PutObjectAcl} - * @method Model restoreObject(array $args = array()) {@command S3 RestoreObject} - * @method Model uploadPart(array $args = array()) {@command S3 UploadPart} - * @method Model uploadPartCopy(array $args = array()) {@command S3 UploadPartCopy} - * @method waitUntilBucketExists(array $input) The input array uses the parameters of the HeadBucket operation and waiter specific settings - * @method waitUntilBucketNotExists(array $input) The input array uses the parameters of the HeadBucket operation and waiter specific settings - * @method waitUntilObjectExists(array $input) The input array uses the parameters of the HeadObject operation and waiter specific settings - * @method ResourceIteratorInterface getListBucketsIterator(array $args = array()) The input array uses the parameters of the ListBuckets operation - * @method ResourceIteratorInterface getListMultipartUploadsIterator(array $args = array()) The input array uses the parameters of the ListMultipartUploads operation - * @method ResourceIteratorInterface getListObjectVersionsIterator(array $args = array()) The input array uses the parameters of the ListObjectVersions operation - * @method ResourceIteratorInterface getListObjectsIterator(array $args = array()) The input array uses the parameters of the ListObjects operation - * @method ResourceIteratorInterface getListPartsIterator(array $args = array()) The input array uses the parameters of the ListParts operation - * - * @link http://docs.aws.amazon.com/aws-sdk-php/guide/latest/service-s3.html User guide - * @link http://docs.aws.amazon.com/aws-sdk-php/latest/class-Aws.S3.S3Client.html API docs - */ -class S3Client extends AbstractClient -{ - const LATEST_API_VERSION = '2006-03-01'; - - /** - * @var array Aliases for S3 operations - */ - protected static $commandAliases = array( - // REST API Docs Aliases - 'GetService' => 'ListBuckets', - 'GetBucket' => 'ListObjects', - 'PutBucket' => 'CreateBucket', - - // SDK 1.x Aliases - 'GetBucketHeaders' => 'HeadBucket', - 'GetObjectHeaders' => 'HeadObject', - 'SetBucketAcl' => 'PutBucketAcl', - 'CreateObject' => 'PutObject', - 'DeleteObjects' => 'DeleteMultipleObjects', - 'PutObjectCopy' => 'CopyObject', - 'SetObjectAcl' => 'PutObjectAcl', - 'GetLogs' => 'GetBucketLogging', - 'GetVersioningStatus' => 'GetBucketVersioning', - 'SetBucketPolicy' => 'PutBucketPolicy', - 'CreateBucketNotification' => 'PutBucketNotification', - 'GetBucketNotifications' => 'GetBucketNotification', - 'CopyPart' => 'UploadPartCopy', - 'CreateWebsiteConfig' => 'PutBucketWebsite', - 'GetWebsiteConfig' => 'GetBucketWebsite', - 'DeleteWebsiteConfig' => 'DeleteBucketWebsite', - 'CreateObjectExpirationConfig' => 'PutBucketLifecycle', - 'GetObjectExpirationConfig' => 'GetBucketLifecycle', - 'DeleteObjectExpirationConfig' => 'DeleteBucketLifecycle', - ); - - protected $directory = __DIR__; - - /** - * Factory method to create a new Amazon S3 client using an array of configuration options. - * - * @param array|Collection $config Client configuration data - * - * @return S3Client - * @link http://docs.aws.amazon.com/aws-sdk-php/guide/latest/configuration.html#client-configuration-options - */ - public static function factory($config = array()) - { - $exceptionParser = new S3ExceptionParser(); - - // Configure the custom exponential backoff plugin for retrying S3 specific errors - if (!isset($config[Options::BACKOFF])) { - $config[Options::BACKOFF] = static::createBackoffPlugin($exceptionParser); - } - - $config[Options::SIGNATURE] = $signature = static::createSignature($config); - - $client = ClientBuilder::factory(__NAMESPACE__) - ->setConfig($config) - ->setConfigDefaults(array( - Options::VERSION => self::LATEST_API_VERSION, - Options::SERVICE_DESCRIPTION => __DIR__ . '/Resources/s3-%s.php' - )) - ->setExceptionParser($exceptionParser) - ->setIteratorsConfig(array( - 'more_key' => 'IsTruncated', - 'operations' => array( - 'ListBuckets', - 'ListMultipartUploads' => array( - 'limit_param' => 'MaxUploads', - 'token_param' => array('KeyMarker', 'UploadIdMarker'), - 'token_key' => array('NextKeyMarker', 'NextUploadIdMarker'), - ), - 'ListObjects' => array( - 'limit_param' => 'MaxKeys', - 'token_param' => 'Marker', - 'token_key' => 'NextMarker', - ), - 'ListObjectVersions' => array( - 'limit_param' => 'MaxKeys', - 'token_param' => array('KeyMarker', 'VersionIdMarker'), - 'token_key' => array('nextKeyMarker', 'nextVersionIdMarker'), - ), - 'ListParts' => array( - 'limit_param' => 'MaxParts', - 'result_key' => 'Parts', - 'token_param' => 'PartNumberMarker', - 'token_key' => 'NextPartNumberMarker', - ), - ) - )) - ->build(); - - // Use virtual hosted buckets when possible - $client->addSubscriber(new BucketStyleListener()); - // Ensure that ACP headers are applied when needed - $client->addSubscriber(new AcpListener()); - // Validate and add required Content-MD5 hashes (e.g. DeleteObjects) - $client->addSubscriber(new S3Md5Listener($signature)); - - // Allow for specifying bodies with file paths and file handles - $client->addSubscriber(new UploadBodyListener(array('PutObject', 'UploadPart'))); - - // Ensures that if a SSE-CPK key is provided, the key and md5 are formatted correctly - $client->addSubscriber(new SseCpkListener); - - // Add aliases for some S3 operations - $default = CompositeFactory::getDefaultChain($client); - $default->add( - new AliasFactory($client, static::$commandAliases), - 'Guzzle\Service\Command\Factory\ServiceDescriptionFactory' - ); - $client->setCommandFactory($default); - - return $client; - } - - /** - * Create an Amazon S3 specific backoff plugin - * - * @param S3ExceptionParser $exceptionParser - * - * @return BackoffPlugin - */ - private static function createBackoffPlugin(S3ExceptionParser $exceptionParser) - { - return new BackoffPlugin( - new TruncatedBackoffStrategy(3, - new CurlBackoffStrategy(null, - new HttpBackoffStrategy(null, - new SocketTimeoutChecker( - new ExpiredCredentialsChecker($exceptionParser, - new ExponentialBackoffStrategy() - ) - ) - ) - ) - ) - ); - } - - /** - * Create an appropriate signature based on the configuration settings - * - * @param $config - * - * @return \Aws\Common\Signature\SignatureInterface - * @throws InvalidArgumentException - */ - private static function createSignature($config) - { - $currentValue = isset($config[Options::SIGNATURE]) ? $config[Options::SIGNATURE] : null; - - // Force v4 if no value is provided, a region is in the config, and - // the region starts with "cn-" or "eu-central-". - $requiresV4 = !$currentValue - && isset($config['region']) - && (strpos($config['region'], 'eu-central-') === 0 - || strpos($config['region'], 'cn-') === 0); - - // Use the Amazon S3 signature V4 when the value is set to "v4" or when - // the value is not set and the region starts with "cn-". - if ($currentValue == 'v4' || $requiresV4) { - // Force SignatureV4 for specific regions or if specified in the config - $currentValue = new S3SignatureV4('s3'); - } elseif (!$currentValue || $currentValue == 's3') { - // Use the Amazon S3 signature by default - $currentValue = new S3Signature(); - } - - // A region is require with v4 - if ($currentValue instanceof SignatureV4 && !isset($config['region'])) { - throw new InvalidArgumentException('A region must be specified ' - . 'when using signature version 4'); - } - - return $currentValue; - } - - /** - * Determine if a string is a valid name for a DNS compatible Amazon S3 - * bucket, meaning the bucket can be used as a subdomain in a URL (e.g., - * "<bucket>.s3.amazonaws.com"). - * - * @param string $bucket The name of the bucket to check. - * - * @return bool TRUE if the bucket name is valid or FALSE if it is invalid. - */ - public static function isValidBucketName($bucket) - { - $bucketLen = strlen($bucket); - if ($bucketLen < 3 || $bucketLen > 63 || - // Cannot look like an IP address - preg_match('/(\d+\.){3}\d+$/', $bucket) || - // Cannot include special characters, must start and end with lower alnum - !preg_match('/^[a-z0-9]([a-z0-9\-\.]*[a-z0-9])?$/', $bucket) - ) { - return false; - } - - return true; - } - - /** - * Create a pre-signed URL for a request - * - * @param RequestInterface $request Request to generate the URL for. Use the factory methods of the client to - * create this request object - * @param int|string|\DateTime $expires The time at which the URL should expire. This can be a Unix timestamp, a - * PHP DateTime object, or a string that can be evaluated by strtotime - * - * @return string - * @throws InvalidArgumentException if the request is not associated with this client object - */ - public function createPresignedUrl(RequestInterface $request, $expires) - { - if ($request->getClient() !== $this) { - throw new InvalidArgumentException('The request object must be associated with the client. Use the ' - . '$client->get(), $client->head(), $client->post(), $client->put(), etc. methods when passing in a ' - . 'request object'); - } - - return $this->signature->createPresignedUrl($request, $this->credentials, $expires); - } - - /** - * Returns the URL to an object identified by its bucket and key. If an expiration time is provided, the URL will - * be signed and set to expire at the provided time. - * - * @param string $bucket The name of the bucket where the object is located - * @param string $key The key of the object - * @param mixed $expires The time at which the URL should expire - * @param array $args Arguments to the GetObject command. Additionally you can specify a "Scheme" if you would - * like the URL to use a different scheme than what the client is configured to use - * - * @return string The URL to the object - */ - public function getObjectUrl($bucket, $key, $expires = null, array $args = array()) - { - $command = $this->getCommand('GetObject', $args + array('Bucket' => $bucket, 'Key' => $key)); - - if ($command->hasKey('Scheme')) { - $scheme = $command['Scheme']; - $request = $command->remove('Scheme')->prepare()->setScheme($scheme)->setPort(null); - } else { - $request = $command->prepare(); - } - - return $expires ? $this->createPresignedUrl($request, $expires) : $request->getUrl(); - } - - /** - * Helper used to clear the contents of a bucket. Use the {@see ClearBucket} object directly - * for more advanced options and control. - * - * @param string $bucket Name of the bucket to clear. - * - * @return int Returns the number of deleted keys - */ - public function clearBucket($bucket) - { - $clear = new ClearBucket($this, $bucket); - - return $clear->clear(); - } - - /** - * Determines whether or not a bucket exists by name - * - * @param string $bucket The name of the bucket - * @param bool $accept403 Set to true if 403s are acceptable - * @param array $options Additional options to add to the executed command - * - * @return bool - */ - public function doesBucketExist($bucket, $accept403 = true, array $options = array()) - { - return $this->checkExistenceWithCommand( - $this->getCommand('HeadBucket', array_merge($options, array( - 'Bucket' => $bucket - ))), $accept403 - ); - } - - /** - * Determines whether or not an object exists by name - * - * @param string $bucket The name of the bucket - * @param string $key The key of the object - * @param array $options Additional options to add to the executed command - * - * @return bool - */ - public function doesObjectExist($bucket, $key, array $options = array()) - { - return $this->checkExistenceWithCommand( - $this->getCommand('HeadObject', array_merge($options, array( - 'Bucket' => $bucket, - 'Key' => $key - ))) - ); - } - - /** - * Determines whether or not a bucket policy exists for a bucket - * - * @param string $bucket The name of the bucket - * @param array $options Additional options to add to the executed command - * - * @return bool - */ - public function doesBucketPolicyExist($bucket, array $options = array()) - { - return $this->checkExistenceWithCommand( - $this->getCommand('GetBucketPolicy', array_merge($options, array( - 'Bucket' => $bucket - ))) - ); - } - - /** - * Raw URL encode a key and allow for '/' characters - * - * @param string $key Key to encode - * - * @return string Returns the encoded key - */ - public static function encodeKey($key) - { - return str_replace('%2F', '/', rawurlencode($key)); - } - - /** - * Explode a prefixed key into an array of values - * - * @param string $key Key to explode - * - * @return array Returns the exploded - */ - public static function explodeKey($key) - { - // Remove a leading slash if one is found - return explode('/', $key && $key[0] == '/' ? substr($key, 1) : $key); - } - - /** - * Register the Amazon S3 stream wrapper and associates it with this client object - * - * @return $this - */ - public function registerStreamWrapper() - { - StreamWrapper::register($this); - - return $this; - } - - /** - * Upload a file, stream, or string to a bucket. If the upload size exceeds the specified threshold, the upload - * will be performed using parallel multipart uploads. - * - * @param string $bucket Bucket to upload the object - * @param string $key Key of the object - * @param mixed $body Object data to upload. Can be a Guzzle\Http\EntityBodyInterface, stream resource, or - * string of data to upload. - * @param string $acl ACL to apply to the object - * @param array $options Custom options used when executing commands: - * - params: Custom parameters to use with the upload. The parameters must map to a PutObject - * or InitiateMultipartUpload operation parameters. - * - min_part_size: Minimum size to allow for each uploaded part when performing a multipart upload. - * - concurrency: Maximum number of concurrent multipart uploads. - * - before_upload: Callback to invoke before each multipart upload. The callback will receive a - * Guzzle\Common\Event object with context. - * - * @see Aws\S3\Model\MultipartUpload\UploadBuilder for more options and customization - * @return \Guzzle\Service\Resource\Model Returns the modeled result of the performed operation - */ - public function upload($bucket, $key, $body, $acl = 'private', array $options = array()) - { - $body = EntityBody::factory($body); - $options = Collection::fromConfig(array_change_key_case($options), array( - 'min_part_size' => AbstractMulti::MIN_PART_SIZE, - 'params' => array(), - 'concurrency' => $body->getWrapper() == 'plainfile' ? 3 : 1 - )); - - if ($body->getSize() < $options['min_part_size']) { - // Perform a simple PutObject operation - return $this->putObject(array( - 'Bucket' => $bucket, - 'Key' => $key, - 'Body' => $body, - 'ACL' => $acl - ) + $options['params']); - } - - // Perform a multipart upload if the file is large enough - $transfer = UploadBuilder::newInstance() - ->setBucket($bucket) - ->setKey($key) - ->setMinPartSize($options['min_part_size']) - ->setConcurrency($options['concurrency']) - ->setClient($this) - ->setSource($body) - ->setTransferOptions($options->toArray()) - ->addOptions($options['params']) - ->setOption('ACL', $acl) - ->build(); - - if ($options['before_upload']) { - $transfer->getEventDispatcher()->addListener( - AbstractTransfer::BEFORE_PART_UPLOAD, - $options['before_upload'] - ); - } - - return $transfer->upload(); - } - - /** - * Recursively uploads all files in a given directory to a given bucket. - * - * @param string $directory Full path to a directory to upload - * @param string $bucket Name of the bucket - * @param string $keyPrefix Virtual directory key prefix to add to each upload - * @param array $options Associative array of upload options - * - params: Array of parameters to use with each PutObject operation performed during the transfer - * - base_dir: Base directory to remove from each object key - * - force: Set to true to upload every file, even if the file is already in Amazon S3 and has not changed - * - concurrency: Maximum number of parallel uploads (defaults to 10) - * - debug: Set to true or an fopen resource to enable debug mode to print information about each upload - * - multipart_upload_size: When the size of a file exceeds this value, the file will be uploaded using a - * multipart upload. - * - * @see Aws\S3\S3Sync\S3Sync for more options and customization - */ - public function uploadDirectory($directory, $bucket, $keyPrefix = null, array $options = array()) - { - $options = Collection::fromConfig( - $options, - array( - 'base_dir' => realpath($directory) ?: $directory - ) - ); - - $builder = $options['builder'] ?: UploadSyncBuilder::getInstance(); - $builder->uploadFromDirectory($directory) - ->setClient($this) - ->setBucket($bucket) - ->setKeyPrefix($keyPrefix) - ->setConcurrency($options['concurrency'] ?: 5) - ->setBaseDir($options['base_dir']) - ->force($options['force']) - ->setOperationParams($options['params'] ?: array()) - ->enableDebugOutput($options['debug']); - - if ($options->hasKey('multipart_upload_size')) { - $builder->setMultipartUploadSize($options['multipart_upload_size']); - } - - $builder->build()->transfer(); - } - - /** - * Downloads a bucket to the local filesystem - * - * @param string $directory Directory to download to - * @param string $bucket Bucket to download from - * @param string $keyPrefix Only download objects that use this key prefix - * @param array $options Associative array of download options - * - params: Array of parameters to use with each GetObject operation performed during the transfer - * - base_dir: Base directory to remove from each object key when storing in the local filesystem - * - force: Set to true to download every file, even if the file is already on the local filesystem and has not - * changed - * - concurrency: Maximum number of parallel downloads (defaults to 10) - * - debug: Set to true or a fopen resource to enable debug mode to print information about each download - * - allow_resumable: Set to true to allow previously interrupted downloads to be resumed using a Range GET - */ - public function downloadBucket($directory, $bucket, $keyPrefix = '', array $options = array()) - { - $options = new Collection($options); - $builder = $options['builder'] ?: DownloadSyncBuilder::getInstance(); - $builder->setDirectory($directory) - ->setClient($this) - ->setBucket($bucket) - ->setKeyPrefix($keyPrefix) - ->setConcurrency($options['concurrency'] ?: 10) - ->setBaseDir($options['base_dir']) - ->force($options['force']) - ->setOperationParams($options['params'] ?: array()) - ->enableDebugOutput($options['debug']); - - if ($options['allow_resumable']) { - $builder->allowResumableDownloads(); - } - - $builder->build()->transfer(); - } - - /** - * Deletes objects from Amazon S3 that match the result of a ListObjects operation. For example, this allows you - * to do things like delete all objects that match a specific key prefix. - * - * @param string $bucket Bucket that contains the object keys - * @param string $prefix Optionally delete only objects under this key prefix - * @param string $regex Delete only objects that match this regex - * @param array $options Options used when deleting the object: - * - before_delete: Callback to invoke before each delete. The callback will receive a - * Guzzle\Common\Event object with context. - * - * @see Aws\S3\S3Client::listObjects - * @see Aws\S3\Model\ClearBucket For more options or customization - * @return int Returns the number of deleted keys - * @throws RuntimeException if no prefix and no regex is given - */ - public function deleteMatchingObjects($bucket, $prefix = '', $regex = '', array $options = array()) - { - if (!$prefix && !$regex) { - throw new RuntimeException('A prefix or regex is required, or use S3Client::clearBucket().'); - } - - $clear = new ClearBucket($this, $bucket); - $iterator = $this->getIterator('ListObjects', array('Bucket' => $bucket, 'Prefix' => $prefix)); - - if ($regex) { - $iterator = new FilterIterator($iterator, function ($current) use ($regex) { - return preg_match($regex, $current['Key']); - }); - } - - $clear->setIterator($iterator); - if (isset($options['before_delete'])) { - $clear->getEventDispatcher()->addListener(ClearBucket::BEFORE_CLEAR, $options['before_delete']); - } - - return $clear->clear(); - } - - /** - * Determines whether or not a resource exists using a command - * - * @param CommandInterface $command Command used to poll for the resource - * @param bool $accept403 Set to true if 403s are acceptable - * - * @return bool - * @throws S3Exception|\Exception if there is an unhandled exception - */ - protected function checkExistenceWithCommand(CommandInterface $command, $accept403 = false) - { - try { - $command->execute(); - $exists = true; - } catch (AccessDeniedException $e) { - $exists = (bool) $accept403; - } catch (S3Exception $e) { - $exists = false; - if ($e->getResponse()->getStatusCode() >= 500) { - // @codeCoverageIgnoreStart - throw $e; - // @codeCoverageIgnoreEnd - } - } - - return $exists; - } -} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/S3Md5Listener.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/S3Md5Listener.php deleted file mode 100644 index 7558c477c25..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/S3Md5Listener.php +++ /dev/null @@ -1,73 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3; - -use Aws\Common\Signature\SignatureV4; -use Aws\Common\Signature\SignatureInterface; -use Guzzle\Common\Event; -use Guzzle\Service\Command\CommandInterface; -use Symfony\Component\EventDispatcher\EventSubscriberInterface; - -/** - * Adds required and optional Content-MD5 headers - */ -class S3Md5Listener implements EventSubscriberInterface -{ - /** @var S3SignatureInterface */ - private $signature; - - public static function getSubscribedEvents() - { - return array('command.after_prepare' => 'onCommandAfterPrepare'); - } - - public function __construct(SignatureInterface $signature) - { - $this->signature = $signature; - } - - public function onCommandAfterPrepare(Event $event) - { - $command = $event['command']; - $operation = $command->getOperation(); - - if ($operation->getData('contentMd5')) { - // Add the MD5 if it is required for all signers - $this->addMd5($command); - } elseif ($operation->hasParam('ContentMD5')) { - $value = $command['ContentMD5']; - // Add a computed MD5 if the parameter is set to true or if - // not using Signature V4 and the value is not set (null). - if ($value === true || - ($value === null && !($this->signature instanceof SignatureV4)) - ) { - $this->addMd5($command); - } - } - } - - private function addMd5(CommandInterface $command) - { - $request = $command->getRequest(); - $body = $request->getBody(); - if ($body && $body->getSize() > 0) { - if (false !== ($md5 = $body->getContentMd5(true, true))) { - $request->setHeader('Content-MD5', $md5); - } - } - } -} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/S3Signature.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/S3Signature.php deleted file mode 100644 index 4dcc2a8bdf8..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/S3Signature.php +++ /dev/null @@ -1,268 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3; - -use Aws\Common\Credentials\CredentialsInterface; -use Guzzle\Http\Message\RequestInterface; -use Guzzle\Http\QueryString; -use Guzzle\Http\Url; - -/** - * Default Amazon S3 signature implementation - * @link http://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html - */ -class S3Signature implements S3SignatureInterface -{ - /** - * @var array Query string values that must be signed - */ - protected $signableQueryString = array ( - 'acl', - 'cors', - 'delete', - 'lifecycle', - 'location', - 'logging', - 'notification', - 'partNumber', - 'policy', - 'requestPayment', - 'response-cache-control', - 'response-content-disposition', - 'response-content-encoding', - 'response-content-language', - 'response-content-type', - 'response-expires', - 'restore', - 'tagging', - 'torrent', - 'uploadId', - 'uploads', - 'versionId', - 'versioning', - 'versions', - 'website', - ); - - /** @var array Sorted headers that must be signed */ - private $signableHeaders = array('Content-MD5', 'Content-Type'); - - public function signRequest(RequestInterface $request, CredentialsInterface $credentials) - { - // Ensure that the signable query string parameters are sorted - sort($this->signableQueryString); - - // Add the security token header if one is being used by the credentials - if ($token = $credentials->getSecurityToken()) { - $request->setHeader('x-amz-security-token', $token); - } - - // Add a date header if one is not set - if (!$request->hasHeader('date') && !$request->hasHeader('x-amz-date')) { - $request->setHeader('Date', gmdate(\DateTime::RFC2822)); - } - - $stringToSign = $this->createCanonicalizedString($request); - $request->getParams()->set('aws.string_to_sign', $stringToSign); - - $request->setHeader( - 'Authorization', - 'AWS ' . $credentials->getAccessKeyId() . ':' . $this->signString($stringToSign, $credentials) - ); - } - - public function createPresignedUrl( - RequestInterface $request, - CredentialsInterface $credentials, - $expires - ) { - if ($expires instanceof \DateTime) { - $expires = $expires->getTimestamp(); - } elseif (!is_numeric($expires)) { - $expires = strtotime($expires); - } - - // Operate on a clone of the request, so the original is not altered - $request = clone $request; - - // URL encoding already occurs in the URI template expansion. Undo that and encode using the same encoding as - // GET object, PUT object, etc. - $path = S3Client::encodeKey(rawurldecode($request->getPath())); - $request->setPath($path); - - // Make sure to handle temporary credentials - if ($token = $credentials->getSecurityToken()) { - $request->setHeader('x-amz-security-token', $token); - $request->getQuery()->set('x-amz-security-token', $token); - } - - // Set query params required for pre-signed URLs - $request->getQuery() - ->set('AWSAccessKeyId', $credentials->getAccessKeyId()) - ->set('Expires', $expires) - ->set('Signature', $this->signString( - $this->createCanonicalizedString($request, $expires), - $credentials - )); - - // Move X-Amz-* headers to the query string - foreach ($request->getHeaders() as $name => $header) { - $name = strtolower($name); - if (strpos($name, 'x-amz-') === 0) { - $request->getQuery()->set($name, (string) $header); - $request->removeHeader($name); - } - } - - return $request->getUrl(); - } - - public function signString($string, CredentialsInterface $credentials) - { - return base64_encode(hash_hmac('sha1', $string, $credentials->getSecretKey(), true)); - } - - public function createCanonicalizedString(RequestInterface $request, $expires = null) - { - $buffer = $request->getMethod() . "\n"; - - // Add the interesting headers - foreach ($this->signableHeaders as $header) { - $buffer .= (string) $request->getHeader($header) . "\n"; - } - - // Choose dates from left to right based on what's set - $date = $expires ?: (string) $request->getHeader('date'); - - $buffer .= "{$date}\n" - . $this->createCanonicalizedAmzHeaders($request) - . $this->createCanonicalizedResource($request); - - return $buffer; - } - - /** - * Create a canonicalized AmzHeaders string for a signature. - * - * @param RequestInterface $request Request from which to gather headers - * - * @return string Returns canonicalized AMZ headers. - */ - private function createCanonicalizedAmzHeaders(RequestInterface $request) - { - $headers = array(); - foreach ($request->getHeaders() as $name => $header) { - $name = strtolower($name); - if (strpos($name, 'x-amz-') === 0) { - $value = trim((string) $header); - if ($value || $value === '0') { - $headers[$name] = $name . ':' . $value; - } - } - } - - if (!$headers) { - return ''; - } - - ksort($headers); - - return implode("\n", $headers) . "\n"; - } - - /** - * Create a canonicalized resource for a request - * - * @param RequestInterface $request Request for the resource - * - * @return string - */ - private function createCanonicalizedResource(RequestInterface $request) - { - $buffer = $request->getParams()->get('s3.resource'); - // When sending a raw HTTP request (e.g. $client->get()) - if (null === $buffer) { - $bucket = $request->getParams()->get('bucket') ?: $this->parseBucketName($request); - // Use any specified bucket name, the parsed bucket name, or no bucket name when interacting with GetService - $buffer = $bucket ? "/{$bucket}" : ''; - // Remove encoding from the path and use the S3 specific encoding - $path = S3Client::encodeKey(rawurldecode($request->getPath())); - // if the bucket was path style, then ensure that the bucket wasn't duplicated in the resource - $buffer .= preg_replace("#^/{$bucket}/{$bucket}#", "/{$bucket}", $path); - } - - // Remove double slashes - $buffer = str_replace('//', '/', $buffer); - - // Add sub resource parameters - $query = $request->getQuery(); - $first = true; - foreach ($this->signableQueryString as $key) { - if ($query->hasKey($key)) { - $value = $query[$key]; - $buffer .= $first ? '?' : '&'; - $first = false; - $buffer .= $key; - // Don't add values for empty sub-resources - if ($value !== '' && - $value !== false && - $value !== null && - $value !== QueryString::BLANK - ) { - $buffer .= "={$value}"; - } - } - } - - return $buffer; - } - - /** - * Parse the bucket name from a request object - * - * @param RequestInterface $request Request to parse - * - * @return string - */ - private function parseBucketName(RequestInterface $request) - { - $baseUrl = Url::factory($request->getClient()->getBaseUrl()); - $baseHost = $baseUrl->getHost(); - $host = $request->getHost(); - - if (strpos($host, $baseHost) === false) { - // Does not contain the base URL, so it's either a redirect, CNAME, or using a different region - $baseHost = ''; - // For every known S3 host, check if that host is present on the request - $regions = $request->getClient()->getDescription()->getData('regions'); - foreach ($regions as $region) { - if (strpos($host, $region['hostname']) !== false) { - // This host matches the request host. Tells use the region and endpoint-- we can derive the bucket - $baseHost = $region['hostname']; - break; - } - } - // If no matching base URL was found, then assume that this is a CNAME, and the CNAME is the bucket - if (!$baseHost) { - return $host; - } - } - - // Remove the baseURL from the host of the request to attempt to determine the bucket name - return trim(str_replace($baseHost, '', $request->getHost()), ' .'); - } -} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/S3SignatureInterface.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/S3SignatureInterface.php deleted file mode 100644 index 0b7e940acb6..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/S3SignatureInterface.php +++ /dev/null @@ -1,24 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3; - -use Aws\Common\Signature\SignatureInterface; - -/** - * @deprecated - */ -interface S3SignatureInterface extends SignatureInterface {} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/S3SignatureV4.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/S3SignatureV4.php deleted file mode 100644 index edbb4fcd082..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/S3SignatureV4.php +++ /dev/null @@ -1,60 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3; - -use Aws\Common\Signature\SignatureV4; -use Aws\Common\Credentials\CredentialsInterface; -use Guzzle\Http\Message\EntityEnclosingRequestInterface; -use Guzzle\Http\Message\RequestInterface; - -/** - * Amazon S3 signature version 4 overrides. - */ -class S3SignatureV4 extends SignatureV4 implements S3SignatureInterface -{ - /** - * Always add a x-amz-content-sha-256 for data integrity. - */ - public function signRequest(RequestInterface $request, CredentialsInterface $credentials) - { - if (!$request->hasHeader('x-amz-content-sha256')) { - $request->setHeader( - 'x-amz-content-sha256', - $this->getPayload($request) - ); - } - - parent::signRequest($request, $credentials); - } - - /** - * Override used to allow pre-signed URLs to be created for an - * in-determinate request payload. - */ - protected function getPresignedPayload(RequestInterface $request) - { - return 'UNSIGNED-PAYLOAD'; - } - - /** - * Amazon S3 does not double-encode the path component in the canonical req - */ - protected function createCanonicalizedPath(RequestInterface $request) - { - return '/' . ltrim($request->getPath(), '/'); - } -} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/SocketTimeoutChecker.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/SocketTimeoutChecker.php deleted file mode 100644 index ede2b960418..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/SocketTimeoutChecker.php +++ /dev/null @@ -1,71 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3; - -use Guzzle\Http\Exception\HttpException; -use Guzzle\Http\Message\RequestInterface; -use Guzzle\Http\Message\EntityEnclosingRequestInterface; -use Guzzle\Http\Message\Response; -use Guzzle\Plugin\Backoff\BackoffStrategyInterface; -use Guzzle\Plugin\Backoff\AbstractBackoffStrategy; - -/** - * Custom S3 exponential backoff checking use to retry 400 responses containing the following reason phrase: - * "Your socket connection to the server was not read from or written to within the timeout period.". - * This error has been reported as intermittent/random, and in most cases, seems to occur during the middle of a - * transfer. This plugin will attempt to retry these failed requests, and if using a local file, will clear the - * stat cache of the file and set a new content-length header on the upload. - */ -class SocketTimeoutChecker extends AbstractBackoffStrategy -{ - const ERR = 'Your socket connection to the server was not read from or written to within the timeout period'; - - /** - * {@inheridoc} - */ - public function __construct(BackoffStrategyInterface $next = null) - { - if ($next) { - $this->setNext($next); - } - } - - /** - * {@inheridoc} - */ - public function makesDecision() - { - return true; - } - - /** - * {@inheritdoc} - */ - protected function getDelay( - $retries, - RequestInterface $request, - Response $response = null, - HttpException $e = null - ) { - if ($response - && $response->getStatusCode() == 400 - && strpos($response->getBody(), self::ERR) - ) { - return true; - } - } -} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/SseCpkListener.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/SseCpkListener.php deleted file mode 100644 index c1a9260383a..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/SseCpkListener.php +++ /dev/null @@ -1,68 +0,0 @@ -<?php - -namespace Aws\S3; - -use Aws\Common\Exception\RuntimeException; -use Guzzle\Common\Event; -use Guzzle\Service\Command\CommandInterface; -use Symfony\Component\EventDispatcher\EventSubscriberInterface; - -/** - * This listener simplifies the SSE-C process by encoding and hashing the key. - */ -class SseCpkListener implements EventSubscriberInterface -{ - public static function getSubscribedEvents() - { - return array('command.before_prepare' => 'onCommandBeforePrepare'); - } - - public function onCommandBeforePrepare(Event $event) - { - /** @var CommandInterface $command */ - $command = $event['command']; - - // Allows only HTTPS connections when using SSE-C - if ($command['SSECustomerKey'] || - $command['CopySourceSSECustomerKey'] - ) { - $this->validateScheme($command); - } - - // Prepare the normal SSE-CPK headers - if ($command['SSECustomerKey']) { - $this->prepareSseParams($command); - } - - // If it's a copy operation, prepare the SSE-CPK headers for the source. - if ($command['CopySourceSSECustomerKey']) { - $this->prepareSseParams($command, true); - } - } - - private function validateScheme(CommandInterface $command) - { - if ($command->getClient()->getConfig('scheme') !== 'https') { - throw new RuntimeException('You must configure your S3 client to ' - . 'use HTTPS in order to use the SSE-C features.'); - } - } - - private function prepareSseParams( - CommandInterface $command, - $isCopy = false - ) { - $prefix = $isCopy ? 'CopySource' : ''; - - // Base64 encode the provided key - $key = $command[$prefix . 'SSECustomerKey']; - $command[$prefix . 'SSECustomerKey'] = base64_encode($key); - - // Base64 the provided MD5 or, generate an MD5 if not provided - if ($md5 = $command[$prefix . 'SSECustomerKeyMD5']) { - $command[$prefix . 'SSECustomerKeyMD5'] = base64_encode($md5); - } else { - $command[$prefix . 'SSECustomerKeyMD5'] = base64_encode(md5($key, true)); - } - } -} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/StreamWrapper.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/StreamWrapper.php deleted file mode 100644 index b0bdb21f564..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/StreamWrapper.php +++ /dev/null @@ -1,891 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3; - -use Aws\Common\Exception\RuntimeException; -use Aws\S3\Exception\S3Exception; -use Aws\S3\Exception\NoSuchKeyException; -use Aws\S3\Iterator\ListObjectsIterator; -use Guzzle\Http\EntityBody; -use Guzzle\Http\CachingEntityBody; -use Guzzle\Http\Mimetypes; -use Guzzle\Iterator\FilterIterator; -use Guzzle\Stream\PhpStreamRequestFactory; -use Guzzle\Service\Command\CommandInterface; - -/** - * Amazon S3 stream wrapper to use "s3://<bucket>/<key>" files with PHP streams, supporting "r", "w", "a", "x". - * - * # Supported stream related PHP functions: - * - fopen, fclose, fread, fwrite, fseek, ftell, feof, fflush - * - opendir, closedir, readdir, rewinddir - * - copy, rename, unlink - * - mkdir, rmdir, rmdir (recursive) - * - file_get_contents, file_put_contents - * - file_exists, filesize, is_file, is_dir - * - * # Opening "r" (read only) streams: - * - * Read only streams are truly streaming by default and will not allow you to seek. This is because data - * read from the stream is not kept in memory or on the local filesystem. You can force a "r" stream to be seekable - * by setting the "seekable" stream context option true. This will allow true streaming of data from Amazon S3, but - * will maintain a buffer of previously read bytes in a 'php://temp' stream to allow seeking to previously read bytes - * from the stream. - * - * You may pass any GetObject parameters as 's3' stream context options. These options will affect how the data is - * downloaded from Amazon S3. - * - * # Opening "w" and "x" (write only) streams: - * - * Because Amazon S3 requires a Content-Length header, write only streams will maintain a 'php://temp' stream to buffer - * data written to the stream until the stream is flushed (usually by closing the stream with fclose). - * - * You may pass any PutObject parameters as 's3' stream context options. These options will affect how the data is - * uploaded to Amazon S3. - * - * When opening an "x" stream, the file must exist on Amazon S3 for the stream to open successfully. - * - * # Opening "a" (write only append) streams: - * - * Similar to "w" streams, opening append streams requires that the data be buffered in a "php://temp" stream. Append - * streams will attempt to download the contents of an object in Amazon S3, seek to the end of the object, then allow - * you to append to the contents of the object. The data will then be uploaded using a PutObject operation when the - * stream is flushed (usually with fclose). - * - * You may pass any GetObject and/or PutObject parameters as 's3' stream context options. These options will affect how - * the data is downloaded and uploaded from Amazon S3. - * - * Stream context options: - * - * - "seekable": Set to true to create a seekable "r" (read only) stream by using a php://temp stream buffer - * - For "unlink" only: Any option that can be passed to the DeleteObject operation - */ -class StreamWrapper -{ - /** - * @var resource|null Stream context (this is set by PHP when a context is used) - */ - public $context; - - /** - * @var S3Client Client used to send requests - */ - protected static $client; - - /** - * @var string Mode the stream was opened with - */ - protected $mode; - - /** - * @var EntityBody Underlying stream resource - */ - protected $body; - - /** - * @var array Current parameters to use with the flush operation - */ - protected $params; - - /** - * @var ListObjectsIterator Iterator used with opendir() and subsequent readdir() calls - */ - protected $objectIterator; - - /** - * @var string The bucket that was opened when opendir() was called - */ - protected $openedBucket; - - /** - * @var string The prefix of the bucket that was opened with opendir() - */ - protected $openedBucketPrefix; - - /** - * @var array The next key to retrieve when using a directory iterator. Helps for fast directory traversal. - */ - protected static $nextStat = array(); - - /** - * Register the 's3://' stream wrapper - * - * @param S3Client $client Client to use with the stream wrapper - */ - public static function register(S3Client $client) - { - if (in_array('s3', stream_get_wrappers())) { - stream_wrapper_unregister('s3'); - } - - stream_wrapper_register('s3', get_called_class(), STREAM_IS_URL); - static::$client = $client; - } - - /** - * Close the stream - */ - public function stream_close() - { - $this->body = null; - } - - /** - * @param string $path - * @param string $mode - * @param int $options - * @param string $opened_path - * - * @return bool - */ - public function stream_open($path, $mode, $options, &$opened_path) - { - // We don't care about the binary flag - $this->mode = $mode = rtrim($mode, 'bt'); - $this->params = $params = $this->getParams($path); - $errors = array(); - - if (!$params['Key']) { - $errors[] = 'Cannot open a bucket. You must specify a path in the form of s3://bucket/key'; - } - - if (strpos($mode, '+')) { - $errors[] = 'The Amazon S3 stream wrapper does not allow simultaneous reading and writing.'; - } - - if (!in_array($mode, array('r', 'w', 'a', 'x'))) { - $errors[] = "Mode not supported: {$mode}. Use one 'r', 'w', 'a', or 'x'."; - } - - // When using mode "x" validate if the file exists before attempting to read - if ($mode == 'x' && static::$client->doesObjectExist($params['Bucket'], $params['Key'], $this->getOptions())) { - $errors[] = "{$path} already exists on Amazon S3"; - } - - if (!$errors) { - if ($mode == 'r') { - $this->openReadStream($params, $errors); - } elseif ($mode == 'a') { - $this->openAppendStream($params, $errors); - } else { - $this->openWriteStream($params, $errors); - } - } - - return $errors ? $this->triggerError($errors) : true; - } - - /** - * @return bool - */ - public function stream_eof() - { - return $this->body->feof(); - } - - /** - * @return bool - */ - public function stream_flush() - { - if ($this->mode == 'r') { - return false; - } - - $this->body->rewind(); - $params = $this->params; - $params['Body'] = $this->body; - - // Attempt to guess the ContentType of the upload based on the - // file extension of the key - if (!isset($params['ContentType']) && - ($type = Mimetypes::getInstance()->fromFilename($params['Key'])) - ) { - $params['ContentType'] = $type; - } - - try { - static::$client->putObject($params); - return true; - } catch (\Exception $e) { - return $this->triggerError($e->getMessage()); - } - } - - /** - * Read data from the underlying stream - * - * @param int $count Amount of bytes to read - * - * @return string - */ - public function stream_read($count) - { - return $this->body->read($count); - } - - /** - * Seek to a specific byte in the stream - * - * @param int $offset Seek offset - * @param int $whence Whence (SEEK_SET, SEEK_CUR, SEEK_END) - * - * @return bool - */ - public function stream_seek($offset, $whence = SEEK_SET) - { - return $this->body->seek($offset, $whence); - } - - /** - * Get the current position of the stream - * - * @return int Returns the current position in the stream - */ - public function stream_tell() - { - return $this->body->ftell(); - } - - /** - * Write data the to the stream - * - * @param string $data - * - * @return int Returns the number of bytes written to the stream - */ - public function stream_write($data) - { - return $this->body->write($data); - } - - /** - * Delete a specific object - * - * @param string $path - * @return bool - */ - public function unlink($path) - { - try { - $this->clearStatInfo($path); - static::$client->deleteObject($this->getParams($path)); - return true; - } catch (\Exception $e) { - return $this->triggerError($e->getMessage()); - } - } - - /** - * @return array - */ - public function stream_stat() - { - $stat = fstat($this->body->getStream()); - // Add the size of the underlying stream if it is known - if ($this->mode == 'r' && $this->body->getSize()) { - $stat[7] = $stat['size'] = $this->body->getSize(); - } - - return $stat; - } - - /** - * Provides information for is_dir, is_file, filesize, etc. Works on buckets, keys, and prefixes - * - * @param string $path - * @param int $flags - * - * @return array Returns an array of stat data - * @link http://www.php.net/manual/en/streamwrapper.url-stat.php - */ - public function url_stat($path, $flags) - { - // Check if this path is in the url_stat cache - if (isset(static::$nextStat[$path])) { - return static::$nextStat[$path]; - } - - $parts = $this->getParams($path); - - if (!$parts['Key']) { - // Stat "directories": buckets, or "s3://" - if (!$parts['Bucket'] || static::$client->doesBucketExist($parts['Bucket'])) { - return $this->formatUrlStat($path); - } else { - return $this->triggerError("File or directory not found: {$path}", $flags); - } - } - - try { - try { - $result = static::$client->headObject($parts)->toArray(); - if (substr($parts['Key'], -1, 1) == '/' && $result['ContentLength'] == 0) { - // Return as if it is a bucket to account for console bucket objects (e.g., zero-byte object "foo/") - return $this->formatUrlStat($path); - } else { - // Attempt to stat and cache regular object - return $this->formatUrlStat($result); - } - } catch (NoSuchKeyException $e) { - // Maybe this isn't an actual key, but a prefix. Do a prefix listing of objects to determine. - $result = static::$client->listObjects(array( - 'Bucket' => $parts['Bucket'], - 'Prefix' => rtrim($parts['Key'], '/') . '/', - 'MaxKeys' => 1 - )); - if (!$result['Contents'] && !$result['CommonPrefixes']) { - return $this->triggerError("File or directory not found: {$path}", $flags); - } - // This is a directory prefix - return $this->formatUrlStat($path); - } - } catch (\Exception $e) { - return $this->triggerError($e->getMessage(), $flags); - } - } - - /** - * Support for mkdir(). - * - * @param string $path Directory which should be created. - * @param int $mode Permissions. 700-range permissions map to ACL_PUBLIC. 600-range permissions map to - * ACL_AUTH_READ. All other permissions map to ACL_PRIVATE. Expects octal form. - * @param int $options A bitwise mask of values, such as STREAM_MKDIR_RECURSIVE. - * - * @return bool - * @link http://www.php.net/manual/en/streamwrapper.mkdir.php - */ - public function mkdir($path, $mode, $options) - { - $params = $this->getParams($path); - if (!$params['Bucket']) { - return false; - } - - if (!isset($params['ACL'])) { - $params['ACL'] = $this->determineAcl($mode); - } - - return !isset($params['Key']) || $params['Key'] === '/' - ? $this->createBucket($path, $params) - : $this->createPseudoDirectory($path, $params); - } - - /** - * Remove a bucket from Amazon S3 - * - * @param string $path the directory path - * - * @return bool true if directory was successfully removed - * @link http://www.php.net/manual/en/streamwrapper.rmdir.php - */ - public function rmdir($path) - { - $params = $this->getParams($path); - if (!$params['Bucket']) { - return $this->triggerError('You cannot delete s3://. Please specify a bucket.'); - } - - try { - - if (!$params['Key']) { - static::$client->deleteBucket(array('Bucket' => $params['Bucket'])); - $this->clearStatInfo($path); - return true; - } - - // Use a key that adds a trailing slash if needed. - $prefix = rtrim($params['Key'], '/') . '/'; - - $result = static::$client->listObjects(array( - 'Bucket' => $params['Bucket'], - 'Prefix' => $prefix, - 'MaxKeys' => 1 - )); - - // Check if the bucket contains keys other than the placeholder - if ($result['Contents']) { - foreach ($result['Contents'] as $key) { - if ($key['Key'] == $prefix) { - continue; - } - return $this->triggerError('Psuedo folder is not empty'); - } - return $this->unlink(rtrim($path, '/') . '/'); - } - - return $result['CommonPrefixes'] - ? $this->triggerError('Pseudo folder contains nested folders') - : true; - - } catch (\Exception $e) { - return $this->triggerError($e->getMessage()); - } - } - - /** - * Support for opendir(). - * - * The opendir() method of the Amazon S3 stream wrapper supports a stream - * context option of "listFilter". listFilter must be a callable that - * accepts an associative array of object data and returns true if the - * object should be yielded when iterating the keys in a bucket. - * - * @param string $path The path to the directory (e.g. "s3://dir[</prefix>]") - * @param string $options Whether or not to enforce safe_mode (0x04). Unused. - * - * @return bool true on success - * @see http://www.php.net/manual/en/function.opendir.php - */ - public function dir_opendir($path, $options) - { - // Reset the cache - $this->clearStatInfo(); - $params = $this->getParams($path); - $delimiter = $this->getOption('delimiter'); - $filterFn = $this->getOption('listFilter'); - - if ($delimiter === null) { - $delimiter = '/'; - } - - if ($params['Key']) { - $params['Key'] = rtrim($params['Key'], $delimiter) . $delimiter; - } - - $this->openedBucket = $params['Bucket']; - $this->openedBucketPrefix = $params['Key']; - $operationParams = array('Bucket' => $params['Bucket'], 'Prefix' => $params['Key']); - - if ($delimiter) { - $operationParams['Delimiter'] = $delimiter; - } - - $objectIterator = static::$client->getIterator('ListObjects', $operationParams, array( - 'return_prefixes' => true, - 'sort_results' => true - )); - - // Filter our "/" keys added by the console as directories, and ensure - // that if a filter function is provided that it passes the filter. - $this->objectIterator = new FilterIterator( - $objectIterator, - function ($key) use ($filterFn) { - // Each yielded results can contain a "Key" or "Prefix" - return (!$filterFn || call_user_func($filterFn, $key)) && - (!isset($key['Key']) || substr($key['Key'], -1, 1) !== '/'); - } - ); - - $this->objectIterator->next(); - - return true; - } - - /** - * Close the directory listing handles - * - * @return bool true on success - */ - public function dir_closedir() - { - $this->objectIterator = null; - - return true; - } - - /** - * This method is called in response to rewinddir() - * - * @return boolean true on success - */ - public function dir_rewinddir() - { - $this->clearStatInfo(); - $this->objectIterator->rewind(); - - return true; - } - - /** - * This method is called in response to readdir() - * - * @return string Should return a string representing the next filename, or false if there is no next file. - * - * @link http://www.php.net/manual/en/function.readdir.php - */ - public function dir_readdir() - { - // Skip empty result keys - if (!$this->objectIterator->valid()) { - return false; - } - - $current = $this->objectIterator->current(); - if (isset($current['Prefix'])) { - // Include "directories". Be sure to strip a trailing "/" - // on prefixes. - $prefix = rtrim($current['Prefix'], '/'); - $result = str_replace($this->openedBucketPrefix, '', $prefix); - $key = "s3://{$this->openedBucket}/{$prefix}"; - $stat = $this->formatUrlStat($prefix); - } else { - // Remove the prefix from the result to emulate other - // stream wrappers. - $result = str_replace($this->openedBucketPrefix, '', $current['Key']); - $key = "s3://{$this->openedBucket}/{$current['Key']}"; - $stat = $this->formatUrlStat($current); - } - - // Cache the object data for quick url_stat lookups used with - // RecursiveDirectoryIterator. - static::$nextStat = array($key => $stat); - $this->objectIterator->next(); - - return $result; - } - - /** - * Called in response to rename() to rename a file or directory. Currently only supports renaming objects. - * - * @param string $path_from the path to the file to rename - * @param string $path_to the new path to the file - * - * @return bool true if file was successfully renamed - * @link http://www.php.net/manual/en/function.rename.php - */ - public function rename($path_from, $path_to) - { - $partsFrom = $this->getParams($path_from); - $partsTo = $this->getParams($path_to); - $this->clearStatInfo($path_from); - $this->clearStatInfo($path_to); - - if (!$partsFrom['Key'] || !$partsTo['Key']) { - return $this->triggerError('The Amazon S3 stream wrapper only supports copying objects'); - } - - try { - // Copy the object and allow overriding default parameters if desired, but by default copy metadata - static::$client->copyObject($this->getOptions() + array( - 'Bucket' => $partsTo['Bucket'], - 'Key' => $partsTo['Key'], - 'CopySource' => '/' . $partsFrom['Bucket'] . '/' . rawurlencode($partsFrom['Key']), - 'MetadataDirective' => 'COPY' - )); - // Delete the original object - static::$client->deleteObject(array( - 'Bucket' => $partsFrom['Bucket'], - 'Key' => $partsFrom['Key'] - ) + $this->getOptions()); - } catch (\Exception $e) { - return $this->triggerError($e->getMessage()); - } - - return true; - } - - /** - * Cast the stream to return the underlying file resource - * - * @param int $cast_as STREAM_CAST_FOR_SELECT or STREAM_CAST_AS_STREAM - * - * @return resource - */ - public function stream_cast($cast_as) - { - return $this->body->getStream(); - } - - /** - * Get the stream context options available to the current stream - * - * @return array - */ - protected function getOptions() - { - $context = $this->context ?: stream_context_get_default(); - $options = stream_context_get_options($context); - - return isset($options['s3']) ? $options['s3'] : array(); - } - - /** - * Get a specific stream context option - * - * @param string $name Name of the option to retrieve - * - * @return mixed|null - */ - protected function getOption($name) - { - $options = $this->getOptions(); - - return isset($options[$name]) ? $options[$name] : null; - } - - /** - * Get the bucket and key from the passed path (e.g. s3://bucket/key) - * - * @param string $path Path passed to the stream wrapper - * - * @return array Hash of 'Bucket', 'Key', and custom params - */ - protected function getParams($path) - { - $parts = explode('/', substr($path, 5), 2); - - $params = $this->getOptions(); - unset($params['seekable']); - - return array( - 'Bucket' => $parts[0], - 'Key' => isset($parts[1]) ? $parts[1] : null - ) + $params; - } - - /** - * Serialize and sign a command, returning a request object - * - * @param CommandInterface $command Command to sign - * - * @return RequestInterface - */ - protected function getSignedRequest($command) - { - $request = $command->prepare(); - $request->dispatch('request.before_send', array('request' => $request)); - - return $request; - } - - /** - * Initialize the stream wrapper for a read only stream - * - * @param array $params Operation parameters - * @param array $errors Any encountered errors to append to - * - * @return bool - */ - protected function openReadStream(array $params, array &$errors) - { - // Create the command and serialize the request - $request = $this->getSignedRequest(static::$client->getCommand('GetObject', $params)); - // Create a stream that uses the EntityBody object - $factory = $this->getOption('stream_factory') ?: new PhpStreamRequestFactory(); - $this->body = $factory->fromRequest($request, array(), array('stream_class' => 'Guzzle\Http\EntityBody')); - - // Wrap the body in a caching entity body if seeking is allowed - if ($this->getOption('seekable')) { - $this->body = new CachingEntityBody($this->body); - } - - return true; - } - - /** - * Initialize the stream wrapper for a write only stream - * - * @param array $params Operation parameters - * @param array $errors Any encountered errors to append to - * - * @return bool - */ - protected function openWriteStream(array $params, array &$errors) - { - $this->body = new EntityBody(fopen('php://temp', 'r+')); - } - - /** - * Initialize the stream wrapper for an append stream - * - * @param array $params Operation parameters - * @param array $errors Any encountered errors to append to - * - * @return bool - */ - protected function openAppendStream(array $params, array &$errors) - { - try { - // Get the body of the object - $this->body = static::$client->getObject($params)->get('Body'); - $this->body->seek(0, SEEK_END); - } catch (S3Exception $e) { - // The object does not exist, so use a simple write stream - $this->openWriteStream($params, $errors); - } - - return true; - } - - /** - * Trigger one or more errors - * - * @param string|array $errors Errors to trigger - * @param mixed $flags If set to STREAM_URL_STAT_QUIET, then no error or exception occurs - * - * @return bool Returns false - * @throws RuntimeException if throw_errors is true - */ - protected function triggerError($errors, $flags = null) - { - if ($flags & STREAM_URL_STAT_QUIET) { - // This is triggered with things like file_exists() - - if ($flags & STREAM_URL_STAT_LINK) { - // This is triggered for things like is_link() - return $this->formatUrlStat(false); - } - return false; - } - - // This is triggered when doing things like lstat() or stat() - trigger_error(implode("\n", (array) $errors), E_USER_WARNING); - - return false; - } - - /** - * Prepare a url_stat result array - * - * @param string|array $result Data to add - * - * @return array Returns the modified url_stat result - */ - protected function formatUrlStat($result = null) - { - static $statTemplate = array( - 0 => 0, 'dev' => 0, - 1 => 0, 'ino' => 0, - 2 => 0, 'mode' => 0, - 3 => 0, 'nlink' => 0, - 4 => 0, 'uid' => 0, - 5 => 0, 'gid' => 0, - 6 => -1, 'rdev' => -1, - 7 => 0, 'size' => 0, - 8 => 0, 'atime' => 0, - 9 => 0, 'mtime' => 0, - 10 => 0, 'ctime' => 0, - 11 => -1, 'blksize' => -1, - 12 => -1, 'blocks' => -1, - ); - - $stat = $statTemplate; - $type = gettype($result); - - // Determine what type of data is being cached - if ($type == 'NULL' || $type == 'string') { - // Directory with 0777 access - see "man 2 stat". - $stat['mode'] = $stat[2] = 0040777; - } elseif ($type == 'array' && isset($result['LastModified'])) { - // ListObjects or HeadObject result - $stat['mtime'] = $stat[9] = $stat['ctime'] = $stat[10] = strtotime($result['LastModified']); - $stat['size'] = $stat[7] = (isset($result['ContentLength']) ? $result['ContentLength'] : $result['Size']); - // Regular file with 0777 access - see "man 2 stat". - $stat['mode'] = $stat[2] = 0100777; - } - - return $stat; - } - - /** - * Clear the next stat result from the cache - * - * @param string $path If a path is specific, clearstatcache() will be called - */ - protected function clearStatInfo($path = null) - { - static::$nextStat = array(); - if ($path) { - clearstatcache(true, $path); - } - } - - /** - * Creates a bucket for the given parameters. - * - * @param string $path Stream wrapper path - * @param array $params A result of StreamWrapper::getParams() - * - * @return bool Returns true on success or false on failure - */ - private function createBucket($path, array $params) - { - if (static::$client->doesBucketExist($params['Bucket'])) { - return $this->triggerError("Directory already exists: {$path}"); - } - - try { - static::$client->createBucket($params); - $this->clearStatInfo($path); - return true; - } catch (\Exception $e) { - return $this->triggerError($e->getMessage()); - } - } - - /** - * Creates a pseudo-folder by creating an empty "/" suffixed key - * - * @param string $path Stream wrapper path - * @param array $params A result of StreamWrapper::getParams() - * - * @return bool - */ - private function createPseudoDirectory($path, array $params) - { - // Ensure the path ends in "/" and the body is empty. - $params['Key'] = rtrim($params['Key'], '/') . '/'; - $params['Body'] = ''; - - // Fail if this pseudo directory key already exists - if (static::$client->doesObjectExist($params['Bucket'], $params['Key'])) { - return $this->triggerError("Directory already exists: {$path}"); - } - - try { - static::$client->putObject($params); - $this->clearStatInfo($path); - return true; - } catch (\Exception $e) { - return $this->triggerError($e->getMessage()); - } - } - - /** - * Determine the most appropriate ACL based on a file mode. - * - * @param int $mode File mode - * - * @return string - */ - private function determineAcl($mode) - { - $mode = decoct($mode); - - if ($mode >= 700 && $mode <= 799) { - return 'public-read'; - } - - if ($mode >= 600 && $mode <= 699) { - return 'authenticated-read'; - } - - return 'private'; - } -} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Sync/AbstractSync.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Sync/AbstractSync.php deleted file mode 100644 index ac5bbbe6c55..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Sync/AbstractSync.php +++ /dev/null @@ -1,127 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Sync; - -use Aws\S3\S3Client; -use Guzzle\Common\AbstractHasDispatcher; -use Guzzle\Common\Collection; -use Guzzle\Iterator\ChunkedIterator; -use Guzzle\Service\Command\CommandInterface; - -abstract class AbstractSync extends AbstractHasDispatcher -{ - const BEFORE_TRANSFER = 's3.sync.before_transfer'; - const AFTER_TRANSFER = 's3.sync.after_transfer'; - - /** @var Collection */ - protected $options; - - /** - * @param array $options Associative array of options: - * - client: (S3Client) used to transfer requests - * - bucket: (string) Amazon S3 bucket - * - iterator: (\Iterator) Iterator that yields SplFileInfo objects to transfer - * - source_converter: (FilenameConverterInterface) Converter used to convert filenames - * - *: Any other options required by subclasses - */ - public function __construct(array $options) - { - $this->options = Collection::fromConfig( - $options, - array('concurrency' => 10), - array('client', 'bucket', 'iterator', 'source_converter') - ); - $this->init(); - } - - public static function getAllEvents() - { - return array(self::BEFORE_TRANSFER, self::AFTER_TRANSFER); - } - - /** - * Begin transferring files - */ - public function transfer() - { - // Pull out chunks of uploads to upload in parallel - $iterator = new ChunkedIterator($this->options['iterator'], $this->options['concurrency']); - foreach ($iterator as $files) { - $this->transferFiles($files); - } - } - - /** - * Create a command or special transfer action for the - * - * @param \SplFileInfo $file File used to build the transfer - * - * @return CommandInterface|callable - */ - abstract protected function createTransferAction(\SplFileInfo $file); - - /** - * Hook to initialize subclasses - * @codeCoverageIgnore - */ - protected function init() {} - - /** - * Process and transfer a group of files - * - * @param array $files Files to transfer - */ - protected function transferFiles(array $files) - { - // Create the base event data object - $event = array('sync' => $this, 'client' => $this->options['client']); - - $commands = array(); - foreach ($files as $file) { - if ($action = $this->createTransferAction($file)) { - $event = array('command' => $action, 'file' => $file) + $event; - $this->dispatch(self::BEFORE_TRANSFER, $event); - if ($action instanceof CommandInterface) { - $commands[] = $action; - } elseif (is_callable($action)) { - $action(); - $this->dispatch(self::AFTER_TRANSFER, $event); - } - } - } - - $this->transferCommands($commands); - } - - /** - * Transfer an array of commands in parallel - * - * @param array $commands Commands to transfer - */ - protected function transferCommands(array $commands) - { - if ($commands) { - $this->options['client']->execute($commands); - // Notify listeners that each command finished - $event = array('sync' => $this, 'client' => $this->options['client']); - foreach ($commands as $command) { - $event['command'] = $command; - $this->dispatch(self::AFTER_TRANSFER, $event); - } - } - } -} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Sync/AbstractSyncBuilder.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Sync/AbstractSyncBuilder.php deleted file mode 100644 index df69f4a8519..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Sync/AbstractSyncBuilder.php +++ /dev/null @@ -1,435 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Sync; - -use Aws\Common\Exception\RuntimeException; -use Aws\Common\Exception\UnexpectedValueException; -use Aws\Common\Model\MultipartUpload\TransferInterface; -use Aws\S3\S3Client; -use Aws\S3\Iterator\OpendirIterator; -use Guzzle\Common\Event; -use Guzzle\Common\HasDispatcherInterface; -use Guzzle\Iterator\FilterIterator; -use Guzzle\Service\Command\CommandInterface; - -abstract class AbstractSyncBuilder -{ - /** @var \Iterator Iterator that returns SplFileInfo objects to upload */ - protected $sourceIterator; - - /** @var S3Client Amazon S3 client used to send requests */ - protected $client; - - /** @var string Bucket used with the transfer */ - protected $bucket; - - /** @var int Number of files that can be transferred concurrently */ - protected $concurrency = 10; - - /** @var array Custom parameters to add to each operation sent while transferring */ - protected $params = array(); - - /** @var FilenameConverterInterface */ - protected $sourceConverter; - - /** @var FilenameConverterInterface */ - protected $targetConverter; - - /** @var string Prefix at prepend to each Amazon S3 object key */ - protected $keyPrefix = ''; - - /** @var string Directory separator for Amazon S3 keys */ - protected $delimiter = '/'; - - /** @var string Base directory to remove from each file path before converting to an object name or file name */ - protected $baseDir; - - /** @var bool Whether or not to only transfer modified or new files */ - protected $forcing = false; - - /** @var bool Whether or not debug output is enable */ - protected $debug; - - /** - * @return static - */ - public static function getInstance() - { - return new static(); - } - - /** - * Set the bucket to use with the sync - * - * @param string $bucket Amazon S3 bucket name - * - * @return $this - */ - public function setBucket($bucket) - { - $this->bucket = $bucket; - - return $this; - } - - /** - * Set the Amazon S3 client object that will send requests - * - * @param S3Client $client Amazon S3 client - * - * @return $this - */ - public function setClient(S3Client $client) - { - $this->client = $client; - - return $this; - } - - /** - * Set a custom iterator that returns \SplFileInfo objects for the source data - * - * @param \Iterator $iterator - * - * @return $this - */ - public function setSourceIterator(\Iterator $iterator) - { - $this->sourceIterator = $iterator; - - return $this; - } - - /** - * Set a custom object key provider instead of building one internally - * - * @param FileNameConverterInterface $converter Filename to object key provider - * - * @return $this - */ - public function setSourceFilenameConverter(FilenameConverterInterface $converter) - { - $this->sourceConverter = $converter; - - return $this; - } - - /** - * Set a custom object key provider instead of building one internally - * - * @param FileNameConverterInterface $converter Filename to object key provider - * - * @return $this - */ - public function setTargetFilenameConverter(FilenameConverterInterface $converter) - { - $this->targetConverter = $converter; - - return $this; - } - - /** - * Set the base directory of the files being transferred. The base directory is removed from each file path before - * converting the file path to an object key or vice versa. - * - * @param string $baseDir Base directory, which will be deleted from each uploaded object key - * - * @return $this - */ - public function setBaseDir($baseDir) - { - $this->baseDir = $baseDir; - - return $this; - } - - /** - * Specify a prefix to prepend to each Amazon S3 object key or the prefix where object are stored in a bucket - * - * Can be used to upload files to a pseudo sub-folder key or only download files from a pseudo sub-folder - * - * @param string $keyPrefix Prefix for each uploaded key - * - * @return $this - */ - public function setKeyPrefix($keyPrefix) - { - // Removing leading slash - $this->keyPrefix = ltrim($keyPrefix, '/'); - - return $this; - } - - /** - * Specify the delimiter used for the targeted filesystem (default delimiter is "/") - * - * @param string $delimiter Delimiter to use to separate paths - * - * @return $this - */ - public function setDelimiter($delimiter) - { - $this->delimiter = $delimiter; - - return $this; - } - - /** - * Specify an array of operation parameters to apply to each operation executed by the sync object - * - * @param array $params Associative array of PutObject (upload) GetObject (download) parameters - * - * @return $this - */ - public function setOperationParams(array $params) - { - $this->params = $params; - - return $this; - } - - /** - * Set the number of files that can be transferred concurrently - * - * @param int $concurrency Number of concurrent transfers - * - * @return $this - */ - public function setConcurrency($concurrency) - { - $this->concurrency = $concurrency; - - return $this; - } - - /** - * Set to true to force transfers even if a file already exists and has not changed - * - * @param bool $force Set to true to force transfers without checking if it has changed - * - * @return $this - */ - public function force($force = false) - { - $this->forcing = (bool) $force; - - return $this; - } - - /** - * Enable debug mode - * - * @param bool|resource $enabledOrResource Set to true or false to enable or disable debug output. Pass an opened - * fopen resource to write to instead of writing to standard out. - * @return $this - */ - public function enableDebugOutput($enabledOrResource = true) - { - $this->debug = $enabledOrResource; - - return $this; - } - - /** - * Add a filename filter that uses a regular expression to filter out files that you do not wish to transfer. - * - * @param string $search Regular expression search (in preg_match format). Any filename that matches this regex - * will not be transferred. - * @return $this - */ - public function addRegexFilter($search) - { - $this->assertFileIteratorSet(); - $this->sourceIterator = new FilterIterator($this->sourceIterator, function ($i) use ($search) { - return !preg_match($search, (string) $i); - }); - $this->sourceIterator->rewind(); - - return $this; - } - - /** - * Builds a UploadSync or DownloadSync object - * - * @return AbstractSync - */ - public function build() - { - $this->validateRequirements(); - $this->sourceConverter = $this->sourceConverter ?: $this->getDefaultSourceConverter(); - $this->targetConverter = $this->targetConverter ?: $this->getDefaultTargetConverter(); - - // Only wrap the source iterator in a changed files iterator if we are not forcing the transfers - if (!$this->forcing) { - $this->sourceIterator->rewind(); - $this->sourceIterator = new ChangedFilesIterator( - new \NoRewindIterator($this->sourceIterator), - $this->getTargetIterator(), - $this->sourceConverter, - $this->targetConverter - ); - $this->sourceIterator->rewind(); - } - - $sync = $this->specificBuild(); - - if ($this->params) { - $this->addCustomParamListener($sync); - } - - if ($this->debug) { - $this->addDebugListener($sync, is_bool($this->debug) ? STDOUT : $this->debug); - } - - return $sync; - } - - /** - * Hook to implement in subclasses - * - * @return AbstractSync - */ - abstract protected function specificBuild(); - - /** - * @return \Iterator - */ - abstract protected function getTargetIterator(); - - /** - * @return FilenameConverterInterface - */ - abstract protected function getDefaultSourceConverter(); - - /** - * @return FilenameConverterInterface - */ - abstract protected function getDefaultTargetConverter(); - - /** - * Add a listener to the sync object to output debug information while transferring - * - * @param AbstractSync $sync Sync object to listen to - * @param resource $resource Where to write debug messages - */ - abstract protected function addDebugListener(AbstractSync $sync, $resource); - - /** - * Validate that the builder has the minimal requirements - * - * @throws RuntimeException if the builder is not configured completely - */ - protected function validateRequirements() - { - if (!$this->client) { - throw new RuntimeException('No client was provided'); - } - if (!$this->bucket) { - throw new RuntimeException('No bucket was provided'); - } - $this->assertFileIteratorSet(); - } - - /** - * Ensure that the base file iterator has been provided - * - * @throws RuntimeException - */ - protected function assertFileIteratorSet() - { - // Interesting... Need to use isset because: Object of class GlobIterator could not be converted to boolean - if (!isset($this->sourceIterator)) { - throw new RuntimeException('A source file iterator must be specified'); - } - } - - /** - * Wraps a generated iterator in a filter iterator that removes directories - * - * @param \Iterator $iterator Iterator to wrap - * - * @return \Iterator - * @throws UnexpectedValueException - */ - protected function filterIterator(\Iterator $iterator) - { - $f = new FilterIterator($iterator, function ($i) { - if (!$i instanceof \SplFileInfo) { - throw new UnexpectedValueException('All iterators for UploadSync must return SplFileInfo objects'); - } - return $i->isFile(); - }); - - $f->rewind(); - - return $f; - } - - /** - * Add the custom param listener to a transfer object - * - * @param HasDispatcherInterface $sync - */ - protected function addCustomParamListener(HasDispatcherInterface $sync) - { - $params = $this->params; - $sync->getEventDispatcher()->addListener( - UploadSync::BEFORE_TRANSFER, - function (Event $e) use ($params) { - if ($e['command'] instanceof CommandInterface) { - $e['command']->overwriteWith($params); - } - } - ); - } - - /** - * Create an Amazon S3 file iterator based on the given builder settings - * - * @return OpendirIterator - */ - protected function createS3Iterator() - { - // Ensure that the stream wrapper is registered - $this->client->registerStreamWrapper(); - - // Calculate the opendir() bucket and optional key prefix location - $dir = "s3://{$this->bucket}"; - if ($this->keyPrefix) { - $dir .= '/' . ltrim($this->keyPrefix, '/ '); - } - - // Use opendir so that we can pass stream context to the iterator - $dh = opendir($dir, stream_context_create(array( - 's3' => array( - 'delimiter' => '', - 'listFilter' => function ($obj) { - // Ensure that we do not try to download a glacier object. - return !isset($obj['StorageClass']) || - $obj['StorageClass'] != 'GLACIER'; - } - ) - ))); - - // Add the trailing slash for the OpendirIterator concatenation - if (!$this->keyPrefix) { - $dir .= '/'; - } - - return $this->filterIterator(new \NoRewindIterator(new OpendirIterator($dh, $dir))); - } -} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Sync/ChangedFilesIterator.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Sync/ChangedFilesIterator.php deleted file mode 100644 index a39edceb619..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Sync/ChangedFilesIterator.php +++ /dev/null @@ -1,125 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Sync; - -/** - * Iterator used to filter an internal iterator to only yield files that do not exist in the target iterator or files - * that have changed - */ -class ChangedFilesIterator extends \FilterIterator -{ - /** @var \Iterator */ - protected $sourceIterator; - - /** @var \Iterator */ - protected $targetIterator; - - /** @var FilenameConverterInterface */ - protected $sourceConverter; - - /** @var FilenameConverterInterface */ - protected $targetConverter; - - /** @var array Previously loaded data */ - protected $cache = array(); - - /** - * @param \Iterator $sourceIterator Iterator to wrap and filter - * @param \Iterator $targetIterator Iterator used to compare against the source iterator - * @param FilenameConverterInterface $sourceConverter Key converter to convert source to target keys - * @param FilenameConverterInterface $targetConverter Key converter to convert target to source keys - */ - public function __construct( - \Iterator $sourceIterator, - \Iterator $targetIterator, - FilenameConverterInterface $sourceConverter, - FilenameConverterInterface $targetConverter - ) { - $this->targetIterator = $targetIterator; - $this->sourceConverter = $sourceConverter; - $this->targetConverter = $targetConverter; - parent::__construct($sourceIterator); - } - - public function accept() - { - $current = $this->current(); - $key = $this->sourceConverter->convert($this->normalize($current)); - if (!($data = $this->getTargetData($key))) { - return true; - } - - // Ensure the Content-Length matches and it hasn't been modified since the mtime - return $current->getSize() != $data[0] || $current->getMTime() > $data[1]; - } - - /** - * Returns an array of the files from the target iterator that were not found in the source iterator - * - * @return array - */ - public function getUnmatched() - { - return array_keys($this->cache); - } - - /** - * Get key information from the target iterator for a particular filename - * - * @param string $key Target iterator filename - * - * @return array|bool Returns an array of data, or false if the key is not in the iterator - */ - protected function getTargetData($key) - { - $key = $this->cleanKey($key); - - if (isset($this->cache[$key])) { - $result = $this->cache[$key]; - unset($this->cache[$key]); - return $result; - } - - $it = $this->targetIterator; - - while ($it->valid()) { - $value = $it->current(); - $data = array($value->getSize(), $value->getMTime()); - $filename = $this->targetConverter->convert($this->normalize($value)); - $filename = $this->cleanKey($filename); - - if ($filename == $key) { - return $data; - } - - $this->cache[$filename] = $data; - $it->next(); - } - - return false; - } - - private function normalize($current) - { - return $current->getRealPath() ?: (string) $current; - } - - private function cleanKey($key) - { - return ltrim($key, '/'); - } -} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Sync/DownloadSync.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Sync/DownloadSync.php deleted file mode 100644 index 560ccdfe937..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Sync/DownloadSync.php +++ /dev/null @@ -1,95 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Sync; - -use Aws\Common\Exception\RuntimeException; -use Aws\S3\ResumableDownload; - -/** - * Downloads and Amazon S3 bucket to a local directory - */ -class DownloadSync extends AbstractSync -{ - protected function createTransferAction(\SplFileInfo $file) - { - $sourceFilename = $file->getPathname(); - list($bucket, $key) = explode('/', substr($sourceFilename, 5), 2); - $filename = $this->options['source_converter']->convert($sourceFilename); - $this->createDirectory($filename); - - // Some S3 buckets contains nested files under the same name as a directory - if (is_dir($filename)) { - return false; - } - - // Allow a previously interrupted download to resume - if (file_exists($filename) && $this->options['resumable']) { - return new ResumableDownload($this->options['client'], $bucket, $key, $filename); - } - - return $this->options['client']->getCommand('GetObject', array( - 'Bucket' => $bucket, - 'Key' => $key, - 'SaveAs' => $filename - )); - } - - /** - * @codeCoverageIgnore - */ - protected function createDirectory($filename) - { - $directory = dirname($filename); - // Some S3 clients create empty files to denote directories. Remove these so that we can create the directory. - if (is_file($directory) && filesize($directory) == 0) { - unlink($directory); - } - // Create the directory if it does not exist - if (!is_dir($directory) && !mkdir($directory, 0777, true)) { - $errors = error_get_last(); - throw new RuntimeException('Could not create directory: ' . $directory . ' - ' . $errors['message']); - } - } - - protected function filterCommands(array $commands) - { - // Build a list of all of the directories in each command so that we don't attempt to create an empty dir in - // the same parallel transfer as attempting to create a file in that dir - $dirs = array(); - foreach ($commands as $command) { - $parts = array_values(array_filter(explode('/', $command['SaveAs']))); - for ($i = 0, $total = count($parts); $i < $total; $i++) { - $dir = ''; - for ($j = 0; $j < $i; $j++) { - $dir .= '/' . $parts[$j]; - } - if ($dir && !in_array($dir, $dirs)) { - $dirs[] = $dir; - } - } - } - - return array_filter($commands, function ($command) use ($dirs) { - return !in_array($command['SaveAs'], $dirs); - }); - } - - protected function transferCommands(array $commands) - { - parent::transferCommands($this->filterCommands($commands)); - } -} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Sync/DownloadSyncBuilder.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Sync/DownloadSyncBuilder.php deleted file mode 100644 index d9cd044449a..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Sync/DownloadSyncBuilder.php +++ /dev/null @@ -1,129 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Sync; - -use Aws\Common\Exception\RuntimeException; -use Aws\S3\ResumableDownload; -use Guzzle\Common\Event; -use Guzzle\Http\EntityBodyInterface; -use Guzzle\Service\Command\CommandInterface; - -class DownloadSyncBuilder extends AbstractSyncBuilder -{ - /** @var bool */ - protected $resumable = false; - - /** @var string */ - protected $directory; - - /** @var int Number of files that can be transferred concurrently */ - protected $concurrency = 5; - - /** - * Set the directory where the objects from be downloaded to - * - * @param string $directory Directory - * - * @return $this - */ - public function setDirectory($directory) - { - $this->directory = $directory; - - return $this; - } - - /** - * Call this function to allow partial downloads to be resumed if the download was previously interrupted - * - * @return self - */ - public function allowResumableDownloads() - { - $this->resumable = true; - - return $this; - } - - protected function specificBuild() - { - $sync = new DownloadSync(array( - 'client' => $this->client, - 'bucket' => $this->bucket, - 'iterator' => $this->sourceIterator, - 'source_converter' => $this->sourceConverter, - 'target_converter' => $this->targetConverter, - 'concurrency' => $this->concurrency, - 'resumable' => $this->resumable, - 'directory' => $this->directory - )); - - return $sync; - } - - protected function getTargetIterator() - { - if (!$this->directory) { - throw new RuntimeException('A directory is required'); - } - - if (!is_dir($this->directory) && !mkdir($this->directory, 0777, true)) { - // @codeCoverageIgnoreStart - throw new RuntimeException('Unable to create root download directory: ' . $this->directory); - // @codeCoverageIgnoreEnd - } - - return $this->filterIterator( - new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($this->directory)) - ); - } - - protected function getDefaultSourceConverter() - { - return new KeyConverter( - "s3://{$this->bucket}/{$this->baseDir}", - $this->directory . DIRECTORY_SEPARATOR, $this->delimiter - ); - } - - protected function getDefaultTargetConverter() - { - return new KeyConverter("s3://{$this->bucket}/{$this->baseDir}", '', $this->delimiter); - } - - protected function assertFileIteratorSet() - { - $this->sourceIterator = $this->sourceIterator ?: $this->createS3Iterator(); - } - - protected function addDebugListener(AbstractSync $sync, $resource) - { - $sync->getEventDispatcher()->addListener(UploadSync::BEFORE_TRANSFER, function (Event $e) use ($resource) { - if ($e['command'] instanceof CommandInterface) { - $from = $e['command']['Bucket'] . '/' . $e['command']['Key']; - $to = $e['command']['SaveAs'] instanceof EntityBodyInterface - ? $e['command']['SaveAs']->getUri() - : $e['command']['SaveAs']; - fwrite($resource, "Downloading {$from} -> {$to}\n"); - } elseif ($e['command'] instanceof ResumableDownload) { - $from = $e['command']->getBucket() . '/' . $e['command']->getKey(); - $to = $e['command']->getFilename(); - fwrite($resource, "Resuming {$from} -> {$to}\n"); - } - }); - } -} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Sync/FilenameConverterInterface.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Sync/FilenameConverterInterface.php deleted file mode 100644 index ded2cfb465a..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Sync/FilenameConverterInterface.php +++ /dev/null @@ -1,32 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Sync; - -/** - * Converts filenames from one system to another (e.g. local to Amazon S3) - */ -interface FilenameConverterInterface -{ - /** - * Convert a filename - * - * @param string $filename Name of the file to convert - * - * @return string - */ - public function convert($filename); -} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Sync/KeyConverter.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Sync/KeyConverter.php deleted file mode 100644 index 7cfee06d2da..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Sync/KeyConverter.php +++ /dev/null @@ -1,67 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Sync; - -/** - * Converts filenames from one system to another - */ -class KeyConverter implements FilenameConverterInterface -{ - /** @var string Directory separator for Amazon S3 keys */ - protected $delimiter; - - /** @var string Prefix to prepend to each Amazon S3 object key */ - protected $prefix; - - /** @var string Base directory to remove from each file path before converting to an object key */ - protected $baseDir; - - /** - * @param string $baseDir Base directory to remove from each converted name - * @param string $prefix Amazon S3 prefix - * @param string $delimiter Directory separator used with generated names - */ - public function __construct($baseDir = '', $prefix = '', $delimiter = '/') - { - $this->baseDir = (string) $baseDir; - $this->prefix = $prefix; - $this->delimiter = $delimiter; - } - - public function convert($filename) - { - $key = $filename; - - // Remove base directory from the key (only the first occurrence) - if ($this->baseDir && (false !== $pos = strpos($filename, $this->baseDir))) { - $key = substr_replace($key, '', $pos, strlen($this->baseDir)); - } - - // Replace Windows directory separators to become Unix style, and convert that to the custom dir separator - $key = str_replace('/', $this->delimiter, str_replace('\\', '/', $key)); - - // Add the key prefix and remove double slashes that are not in the protocol (e.g. prefixed with ":") - $delim = preg_quote($this->delimiter); - $key = preg_replace( - "#(?<!:){$delim}{$delim}#", - $this->delimiter, - $this->prefix . $key - ); - - return $key; - } -} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Sync/UploadSync.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Sync/UploadSync.php deleted file mode 100644 index 31b81e63575..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Sync/UploadSync.php +++ /dev/null @@ -1,86 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Sync; - -use Aws\Common\Exception\RuntimeException; -use Aws\S3\Model\MultipartUpload\UploadBuilder; -use Aws\S3\Model\MultipartUpload\AbstractTransfer; -use Guzzle\Http\EntityBody; - -/** - * Uploads a local directory tree to Amazon S3 - */ -class UploadSync extends AbstractSync -{ - const BEFORE_MULTIPART_BUILD = 's3.sync.before_multipart_build'; - - protected function init() - { - if (null == $this->options['multipart_upload_size']) { - $this->options['multipart_upload_size'] = AbstractTransfer::MIN_PART_SIZE; - } - } - - protected function createTransferAction(\SplFileInfo $file) - { - // Open the file for reading - $filename = $file->getRealPath() ?: $file->getPathName(); - - if (!($resource = fopen($filename, 'r'))) { - // @codeCoverageIgnoreStart - throw new RuntimeException('Could not open ' . $file->getPathname() . ' for reading'); - // @codeCoverageIgnoreEnd - } - - $key = $this->options['source_converter']->convert($filename); - $body = EntityBody::factory($resource); - - // Determine how the ACL should be applied - if ($acl = $this->options['acl']) { - $aclType = is_string($this->options['acl']) ? 'ACL' : 'ACP'; - } else { - $acl = 'private'; - $aclType = 'ACL'; - } - - // Use a multi-part upload if the file is larger than the cutoff size and is a regular file - if ($body->getWrapper() == 'plainfile' && $file->getSize() >= $this->options['multipart_upload_size']) { - $builder = UploadBuilder::newInstance() - ->setBucket($this->options['bucket']) - ->setKey($key) - ->setMinPartSize($this->options['multipart_upload_size']) - ->setOption($aclType, $acl) - ->setClient($this->options['client']) - ->setSource($body) - ->setConcurrency($this->options['concurrency']); - - $this->dispatch( - self::BEFORE_MULTIPART_BUILD, - array('builder' => $builder, 'file' => $file) - ); - - return $builder->build(); - } - - return $this->options['client']->getCommand('PutObject', array( - 'Bucket' => $this->options['bucket'], - 'Key' => $key, - 'Body' => $body, - $aclType => $acl - )); - } -} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Sync/UploadSyncBuilder.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Sync/UploadSyncBuilder.php deleted file mode 100644 index 20830590692..00000000000 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Sync/UploadSyncBuilder.php +++ /dev/null @@ -1,190 +0,0 @@ -<?php -/** - * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -namespace Aws\S3\Sync; - -use \FilesystemIterator as FI; -use Aws\Common\Model\MultipartUpload\AbstractTransfer; -use Aws\S3\Model\Acp; -use Guzzle\Common\HasDispatcherInterface; -use Guzzle\Common\Event; -use Guzzle\Service\Command\CommandInterface; - -class UploadSyncBuilder extends AbstractSyncBuilder -{ - /** @var string|Acp Access control policy to set on each object */ - protected $acp = 'private'; - - /** @var int */ - protected $multipartUploadSize; - - /** - * Set the path that contains files to recursively upload to Amazon S3 - * - * @param string $path Path that contains files to upload - * - * @return $this - */ - public function uploadFromDirectory($path) - { - $this->baseDir = realpath($path); - $this->sourceIterator = $this->filterIterator(new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator( - $path, - FI::SKIP_DOTS | FI::UNIX_PATHS | FI::FOLLOW_SYMLINKS - ))); - - return $this; - } - - /** - * Set a glob expression that will match files to upload to Amazon S3 - * - * @param string $glob Glob expression - * - * @return $this - * @link http://www.php.net/manual/en/function.glob.php - */ - public function uploadFromGlob($glob) - { - $this->sourceIterator = $this->filterIterator( - new \GlobIterator($glob, FI::SKIP_DOTS | FI::UNIX_PATHS | FI::FOLLOW_SYMLINKS) - ); - - return $this; - } - - /** - * Set a canned ACL to apply to each uploaded object - * - * @param string $acl Canned ACL for each upload - * - * @return $this - */ - public function setAcl($acl) - { - $this->acp = $acl; - - return $this; - } - - /** - * Set an Access Control Policy to apply to each uploaded object - * - * @param Acp $acp Access control policy - * - * @return $this - */ - public function setAcp(Acp $acp) - { - $this->acp = $acp; - - return $this; - } - - /** - * Set the multipart upload size threshold. When the size of a file exceeds this value, the file will be uploaded - * using a multipart upload. - * - * @param int $size Size threshold - * - * @return $this - */ - public function setMultipartUploadSize($size) - { - $this->multipartUploadSize = $size; - - return $this; - } - - protected function specificBuild() - { - $sync = new UploadSync(array( - 'client' => $this->client, - 'bucket' => $this->bucket, - 'iterator' => $this->sourceIterator, - 'source_converter' => $this->sourceConverter, - 'target_converter' => $this->targetConverter, - 'concurrency' => $this->concurrency, - 'multipart_upload_size' => $this->multipartUploadSize, - 'acl' => $this->acp - )); - - return $sync; - } - - protected function addCustomParamListener(HasDispatcherInterface $sync) - { - // Handle the special multi-part upload event - parent::addCustomParamListener($sync); - $params = $this->params; - $sync->getEventDispatcher()->addListener( - UploadSync::BEFORE_MULTIPART_BUILD, - function (Event $e) use ($params) { - foreach ($params as $k => $v) { - $e['builder']->setOption($k, $v); - } - } - ); - } - - protected function getTargetIterator() - { - return $this->createS3Iterator(); - } - - protected function getDefaultSourceConverter() - { - return new KeyConverter($this->baseDir, $this->keyPrefix . $this->delimiter, $this->delimiter); - } - - protected function getDefaultTargetConverter() - { - return new KeyConverter('s3://' . $this->bucket . '/', '', DIRECTORY_SEPARATOR); - } - - protected function addDebugListener(AbstractSync $sync, $resource) - { - $sync->getEventDispatcher()->addListener(UploadSync::BEFORE_TRANSFER, function (Event $e) use ($resource) { - - $c = $e['command']; - - if ($c instanceof CommandInterface) { - $uri = $c['Body']->getUri(); - $size = $c['Body']->getSize(); - fwrite($resource, "Uploading {$uri} -> {$c['Key']} ({$size} bytes)\n"); - return; - } - - // Multipart upload - $body = $c->getSource(); - $totalSize = $body->getSize(); - $progress = 0; - fwrite($resource, "Beginning multipart upload: " . $body->getUri() . ' -> '); - fwrite($resource, $c->getState()->getFromId('Key') . " ({$totalSize} bytes)\n"); - - $c->getEventDispatcher()->addListener( - AbstractTransfer::BEFORE_PART_UPLOAD, - function ($e) use (&$progress, $totalSize, $resource) { - $command = $e['command']; - $size = $command['Body']->getContentLength(); - $percentage = number_format(($progress / $totalSize) * 100, 2); - fwrite($resource, "- Part {$command['PartNumber']} ({$size} bytes, {$percentage}%)\n"); - $progress += $size; - } - ); - }); - } -} |