Downloads an object off S3

Provides common methods and properties to all of the S3 tasks

version $Id: 214ed107be71d8dbc0f68ffc90bfd8b11a76b36d $
package phing.tasks.ext
author Andrei Serdeliuc
extends Service_Amazon_S3
copyright 2001,2002 THYRELL. All rights reserved

 Methods

Property getter

__get(mixed $var) : void
Inherited

If the property hasn't been previously set (through the task call normally), it will try to load it from the project

This way, we can define global properties for the "Amazon" service, like key and secret

access public
inherited_from \Service_Amazon::__get()
inherited_from \Service_Amazon_S3::__get()

Parameters

$var

mixed

__isset()

__isset($var) 
Inherited
inherited_from \Service_Amazon::__isset()
inherited_from \Service_Amazon_S3::__isset()

Parameters

$var

__set()

__set($var, $val) 
Inherited
inherited_from \Service_Amazon::__set()
inherited_from \Service_Amazon_S3::__set()

Parameters

$var

$val

Create a bucket

createBucket() : void
Inherited
access public
inherited_from \Service_Amazon_S3::createBucket()

Entry point to children tasks

execute() : void

getBucket()

getBucket() 
Inherited
inherited_from \Service_Amazon_S3::getBucket()

Returns an instance of Services_Amazon_S3_Resource_Bucket

getBucketInstance() : \Services_Amazon_S3_Resource_Bucket
Inherited
access public
inherited_from \Service_Amazon_S3::getBucketInstance()

Returns

\Services_Amazon_S3_Resource_Bucket

We only instantiate the client once per task call

getClient() : \Services_Amazon_S3
Inherited
access public
inherited_from \Service_Amazon_S3::getClient()

Returns

\Services_Amazon_S3

Returns the textual description of the task

getDescription() : string
Inherited
inherited_from \Task::getDescription()
inherited_from \Service_Amazon::getDescription()
inherited_from \Service_Amazon_S3::getDescription()

Returns

stringThe text description of the task

getKey()

getKey() 
Inherited
inherited_from \Service_Amazon::getKey()
inherited_from \Service_Amazon_S3::getKey()

Returns the location within the buildfile this task occurs.

getLocation() : \Location
Inherited

Used by BuildException to give detailed error messages.

inherited_from \Task::getLocation()
inherited_from \Service_Amazon::getLocation()
inherited_from \Service_Amazon_S3::getLocation()

Returns

\LocationThe location object describing the position of this task within the buildfile.

getObject()

getObject() 

Get the contents of an object (by it's name)

getObjectContents(string $object) : mixed
Inherited
access public
inherited_from \Service_Amazon_S3::getObjectContents()

Parameters

$object

string

Returns

mixed

Returns an instance of Services_Amazon_S3_Resource_Object

getObjectInstance(mixed $object) : \Services_Amazon_S3_Resource_Object
Inherited
access public
inherited_from \Service_Amazon_S3::getObjectInstance()

Parameters

$object

mixed

Returns

\Services_Amazon_S3_Resource_Object

Returns the owning target of this task.

getOwningTarget() : \Target
Inherited
inherited_from \Task::getOwningTarget()
inherited_from \Service_Amazon::getOwningTarget()
inherited_from \Service_Amazon_S3::getOwningTarget()

Returns

\TargetThe target object that owns this task

Returns a reference to current project

getProject() : \Project
Inherited
inherited_from \ProjectComponent::getProject()
inherited_from \Task::getProject()
inherited_from \Service_Amazon::getProject()
inherited_from \Service_Amazon_S3::getProject()

Returns

\ProjectReference to current porject object

Returns the wrapper object for runtime configuration

getRuntimeConfigurableWrapper() : \RuntimeConfigurable
Inherited
inherited_from \Task::getRuntimeConfigurableWrapper()
inherited_from \Service_Amazon::getRuntimeConfigurableWrapper()
inherited_from \Service_Amazon_S3::getRuntimeConfigurableWrapper()

Returns

\RuntimeConfigurableThe wrapper object used by this task

getSecret()

getSecret() 
Inherited
inherited_from \Service_Amazon::getSecret()
inherited_from \Service_Amazon_S3::getSecret()

getTarget()

getTarget() 

Returns the name of task, used only for log messages

getTaskName() : string
Inherited
inherited_from \Task::getTaskName()
inherited_from \Service_Amazon::getTaskName()
inherited_from \Service_Amazon_S3::getTaskName()

Returns

stringName of this task

Returns the name of the task under which it was invoked, usually the XML tagname

getTaskType() : string
Inherited
inherited_from \Task::getTaskType()
inherited_from \Service_Amazon::getTaskType()
inherited_from \Service_Amazon_S3::getTaskType()

Returns

stringThe type of this task (XML Tag)

Called by the parser to let the task initialize properly.

init() 
Inherited

Should throw a BuildException if something goes wrong with the build

This is abstract here, but may not be overloaded by subclasses.

inherited_from \Task::init()
inherited_from \Service_Amazon::init()
inherited_from \Service_Amazon_S3::init()

Exceptions

\BuildException

Check if the current bucket is available

isBucketAvailable() : bool
Inherited
access public
inherited_from \Service_Amazon_S3::isBucketAvailable()

Returns

bool

Check if the object already exists in the current bucket

isObjectAvailable(mixed $object) : bool
Inherited
access public
inherited_from \Service_Amazon_S3::isObjectAvailable()

Parameters

$object

mixed

Returns

bool

Provides a project level log event to the task.

log(string $msg, integer $level) 
Inherited
see \global\BuildEvent
see \global\BuildListener
inherited_from \Task::log()
inherited_from \Service_Amazon::log()
inherited_from \Service_Amazon_S3::log()

Parameters

$msg

string

The message to log

$level

integer

The priority of the message

Main entry point, doesn't do anything

main() : void
Inherited

This method may be called more than once, if the task is invoked more than once. For example, if target1 and target2 both depend on target3, then running phing target1 target2 will run all tasks in target3 twice.

Should throw a BuildException if someting goes wrong with the build

This is abstract here. Must be overloaded by real tasks.

access public
final
inherited_from \Service_Amazon_S3::main()

Configure this task if it hasn't been done already.

maybeConfigure() 
Inherited
inherited_from \Task::maybeConfigure()
inherited_from \Service_Amazon::maybeConfigure()
inherited_from \Service_Amazon_S3::maybeConfigure()

Perfrom this task

perform() 
Inherited
inherited_from \Task::perform()
inherited_from \Service_Amazon::perform()
inherited_from \Service_Amazon_S3::perform()

setBucket()

setBucket($bucket) 
Inherited
inherited_from \Service_Amazon_S3::setBucket()

Parameters

$bucket

Sets a textual description of the task

setDescription(string $desc) 
Inherited
inherited_from \Task::setDescription()
inherited_from \Service_Amazon::setDescription()
inherited_from \Service_Amazon_S3::setDescription()

Parameters

$desc

string

The text describing the task

setKey()

setKey($key) 
Inherited
inherited_from \Service_Amazon::setKey()
inherited_from \Service_Amazon_S3::setKey()

Parameters

$key

Sets the location within the buildfile this task occurs.

setLocation(\Location $location) 
Inherited

Called by the parser to set location information.

inherited_from \Task::setLocation()
inherited_from \Service_Amazon::setLocation()
inherited_from \Service_Amazon_S3::setLocation()

Parameters

$location

\Location

The location object describing the position of this task within the buildfile.

setObject()

setObject($object) 

Parameters

$object

Sets the owning target this task belongs to.

setOwningTarget(\Target $target) 
Inherited
inherited_from \Task::setOwningTarget()
inherited_from \Service_Amazon::setOwningTarget()
inherited_from \Service_Amazon_S3::setOwningTarget()

Parameters

$target

\Target

Reference to owning target

References the project to the current component.

setProject(\Project $project) 
Inherited
inherited_from \ProjectComponent::setProject()
inherited_from \Task::setProject()
inherited_from \Service_Amazon::setProject()
inherited_from \Service_Amazon_S3::setProject()

Parameters

$project

\Project

The reference to the current project

Sets the wrapper object this task should use for runtime configurable elements.

setRuntimeConfigurableWrapper(\RuntimeConfigurable $wrapper) 
Inherited
inherited_from \Task::setRuntimeConfigurableWrapper()
inherited_from \Service_Amazon::setRuntimeConfigurableWrapper()
inherited_from \Service_Amazon_S3::setRuntimeConfigurableWrapper()

Parameters

$wrapper

\RuntimeConfigurable

The wrapper object this task should use

setSecret()

setSecret($secret) 
Inherited
inherited_from \Service_Amazon::setSecret()
inherited_from \Service_Amazon_S3::setSecret()

Parameters

$secret

setTarget()

setTarget($target) 

Parameters

$target

Sets the name of this task for log messages

setTaskName(string $name) : string
Inherited
inherited_from \Task::setTaskName()
inherited_from \Service_Amazon::setTaskName()
inherited_from \Service_Amazon_S3::setTaskName()

Parameters

$name

string

Returns

stringA string representing the name of this task for log

Sets the type of the task.

setTaskType(string $name) 
Inherited

Usually this is the name of the XML tag

inherited_from \Task::setTaskType()
inherited_from \Service_Amazon::setTaskType()
inherited_from \Service_Amazon_S3::setTaskType()

Parameters

$name

string

The type of this task (XML Tag)

Returns a name

getRegisterSlot(string $slotName) 
Inherited
inherited_from \Task::getRegisterSlot()
inherited_from \Service_Amazon::getRegisterSlot()
inherited_from \Service_Amazon_S3::getRegisterSlot()

Parameters

$slotName

string

 Properties

 

$_client : \Services_Amazon_S3
Inherited

(default value: null)

see \global\Services_Amazon_S3
access protected
inherited_from \Service_Amazon_S3::$$_client
 

$_object : mixed

(default value: null)

access protected
 

$_options : array
Inherited

We set these magically so we can also load then from the environment

(default value: array())

access protected
inherited_from \Service_Amazon::$$_options
inherited_from \Service_Amazon_S3::$$_options
 

$_target : mixed

(default value: null)

access protected
 

$description : string
Inherited
inherited_from \Task::$$description
inherited_from \Service_Amazon::$$description
inherited_from \Service_Amazon_S3::$$description
 

$location : \Location
Inherited
inherited_from \Task::$$location
inherited_from \Service_Amazon::$$location
inherited_from \Service_Amazon_S3::$$location
 

$project : \Project
Inherited
inherited_from \ProjectComponent::$$project
inherited_from \Task::$$project
inherited_from \Service_Amazon::$$project
inherited_from \Service_Amazon_S3::$$project
 

$target : \Target
Inherited
inherited_from \Task::$$target
inherited_from \Service_Amazon::$$target
inherited_from \Service_Amazon_S3::$$target
 

$taskName : string
Inherited
inherited_from \Task::$$taskName
inherited_from \Service_Amazon::$$taskName
inherited_from \Service_Amazon_S3::$$taskName
 

$taskType : string
Inherited
inherited_from \Task::$$taskType
inherited_from \Service_Amazon::$$taskType
inherited_from \Service_Amazon_S3::$$taskType
 

$wrapper : \RuntimeConfigurable
Inherited
inherited_from \Task::$$wrapper
inherited_from \Service_Amazon::$$wrapper
inherited_from \Service_Amazon_S3::$$wrapper