Services_Amazon_S3
[ class tree: Services_Amazon_S3 ] [ index: Services_Amazon_S3 ] [ all elements ]

Class: Services_Amazon_S3_Resource_Bucket

Source Location: /Services_Amazon_S3-0.2.0/S3/Resource/Bucket.php

Class Overview

Services_Amazon_S3_Resource
   |
   --Services_Amazon_S3_Resource_Bucket

Services_Amazon_S3_Resource_Bucket represents an Amazon S3 bucket, i.e. a container for objects.


Author(s):

Version:

  • Release: 0.2.0

Copyright:

  • 2008 Peytz & Co. A/S

Variables

Methods


Inherited Variables

Inherited Methods

Class: Services_Amazon_S3_Resource

Services_Amazon_S3_Resource::delete()
Deletes this resource from the server.
Services_Amazon_S3_Resource::getSignedUrl()
Returns an URL with credentials included in the query string. This will allow access to private resources without further authentication, e.g.
Services_Amazon_S3_Resource::getURL()
Returns the URL of this resource.
Services_Amazon_S3_Resource::load()
Loads this resource from the server and propagates relevant properties.
Services_Amazon_S3_Resource::loadACL()
Loads this resource's access control list from the server and propagates the acl property.
Services_Amazon_S3_Resource::save()
Saves this resource to the server (including its access control list).

Class Details

[line 65]
Services_Amazon_S3_Resource_Bucket represents an Amazon S3 bucket, i.e. a container for objects.


[ Top ]


Class Variables

$endpoint =

[line 128]

The hostname of the endpoint used for requests done with REQUEST_STYLE_PATH. This value is initialized from $this->s3->endpoint.

Type:   mixed


[ Top ]

$locationConstraint =

[line 111]

The geographical location constraint of this bucket.
  • Var: e.g. "EU", or false if no location constraint was specified for this bucket.
  • Access: public

Type:   string|bool


[ Top ]

$name =

[line 104]

The name of this bucket.

Type:   string


[ Top ]

$requestStyle =

[line 120]

Method for accessing this bucket. This value is initialized from $this->s3->requestStyle.

Type:   string


[ Top ]



Method Detail

__construct (Constructor)   [line 139]

Services_Amazon_S3_Resource_Bucket __construct( Services_Amazon_S3 $s3, string $name)

Constructor. This should only be used internally. New bucket instances should be created using $s3->getBucket($name) or $s3->getBuckets().

Parameters:

Services_Amazon_S3   $s3   —  the service instance
string   $name   —  the name of the bucket (UTF-8)

[ Top ]

getObject   [line 202]

Services_Amazon_S3_Resource_Object getObject( string $key)

Returns the object with the specified key. The object may or may not exist on the server. Use {@see Services_Amazon_S3_Resource_Object::load()} to query the server.
  • Access: public

Parameters:

string   $key   —  the object's key

[ Top ]

getObjects   [line 222]

Services_Amazon_S3_ObjectIterator getObjects( [string $prefix = false], [string $delimiter = false])

Returns an iterator over Services_Amazon_S3_Resource_Object and Services_Amazon_S3_Prefix instances in this bucket.

If $prefix is specified, only objects whose keys begin with this string are returned. If $delimiter is specified, keys that contain this string after the prefix are rolled up into a single Services_Amazon_S3_Prefix instance. If $delimiter is omitted, the iterator only returns Services_Amazon_S3_Resource_Object instances.

  • Return: an SPL RecursiveIterator
  • Access: public

Parameters:

string   $prefix   —  key prefix
string   $delimiter   —  delimiter, e.g. "/"

[ Top ]

getURL   [line 153]

string getURL( )

Returns the URL of this bucket.
  • Return: an absolute URL (with a trailing slash)
  • Throws: Services_Amazon_S3_Exception
  • Access: public

Overrides Services_Amazon_S3_Resource::getURL() (Returns the URL of this resource.)
[ Top ]

load   [line 237]

bool load( )

Loads this resource from the server and propagates relevant properties.
  • Return: true, if resource exists on server
  • Throws: Services_Amazon_S3_Exception
  • Access: public

Overrides Services_Amazon_S3_Resource::load() (Loads this resource from the server and propagates relevant properties.)
[ Top ]

loadLocationConstraint   [line 305]

void loadLocationConstraint( )

Queries the server for the location constraint for this bucket and propagates the locationConstraint property.
  • Throws: Services_Amazon_S3_Exception
  • Access: public

[ Top ]

save   [line 260]

void save( )

Saves this resource to the server. On existing buckets, only the ACL is saved. When saving an existing bucket, load() should be called in advance.
  • Throws: Services_Amazon_S3_Exception
  • Access: public

Overrides Services_Amazon_S3_Resource::save() (Saves this resource to the server (including its access control list).)
[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:31:22 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.