tasks/ext/Service/Amazon/S3.php

Show: inherited
Table of Contents

Abstract Service_Amazon_S3 class.

Provides common methods and properties to all of the S3 tasks

Abstract
 
Author
Andrei Serdeliuc  
Extends
Service_Amazon  
Package
phing.tasks.ext  
Version
$ID$  

\Service_Amazon_S3

Package: phing\tasks\ext

Abstract Service_Amazon_S3 class.

Provides common methods and properties to all of the S3 tasks

Parent(s)
\Service_Amazon < \Task < \ProjectComponent
Children
\S3PutTask
\S3GetTask
Abstract
 
Author
Andrei Serdeliuc  
Copyright
2001,2002 THYRELL. All rights reserved  
Extends
Service_Amazon  
Version
$ID$  

Properties

Propertyprotected\Services_Amazon_S3  $_client= 'null'

Services_Amazon_S3 client

(default value: null)

Default valuenullDetails
Type
\Services_Amazon_S3
Access
protected  
See
\Services_Amazon_S3  
Propertyprotectedarray  $_options= 'array()'
inherited

Collection of set options

Inherited from: \Service_Amazon::$$_options

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

(default value: array())

Default valuearray()Details
Type
array
Access
protected  
Inherited_from
\Service_Amazon::$$_options  
Propertyprotectedstring  $description= ''
inherited

Description of the task

Inherited from: \Task::$$description\Service_Amazon::$$description
Details
Type
string
Inherited_from
\Task::$$description  
Inherited_from
\Service_Amazon::$$description  
Propertyprotected\Location  $location= ''
inherited

Stored buildfile location

Inherited from: \Task::$$location\Service_Amazon::$$location
Details
Type
\Location
Inherited_from
\Task::$$location  
Inherited_from
\Service_Amazon::$$location  
Propertyprotected\Project  $project= 'null'
inherited

Holds a reference to the project that a project component (a task, a target, etc.) belongs to

A reference to the current project instanceInherited from: \ProjectComponent::$$project\Task::$$project\Service_Amazon::$$project
Default valuenullDetails
Type
\Project
Inherited_from
\ProjectComponent::$$project  
Inherited_from
\Task::$$project  
Inherited_from
\Service_Amazon::$$project  
Propertyprotected\Target  $target= ''
inherited

Owning Target object

Inherited from: \Task::$$target\Service_Amazon::$$target
Details
Type
\Target
Inherited_from
\Task::$$target  
Inherited_from
\Service_Amazon::$$target  
Propertyprotectedstring  $taskName= ''
inherited

Taskname for logger

Inherited from: \Task::$$taskName\Service_Amazon::$$taskName
Details
Type
string
Inherited_from
\Task::$$taskName  
Inherited_from
\Service_Amazon::$$taskName  
Propertyprotectedstring  $taskType= ''
inherited

Internal taskname (req)

Inherited from: \Task::$$taskType\Service_Amazon::$$taskType
Details
Type
string
Inherited_from
\Task::$$taskType  
Inherited_from
\Service_Amazon::$$taskType  
Propertyprotected\RuntimeConfigurable  $wrapper= ''
inherited

Wrapper of the task

Inherited from: \Task::$$wrapper\Service_Amazon::$$wrapper
Details
Type
\RuntimeConfigurable
Inherited_from
\Task::$$wrapper  
Inherited_from
\Service_Amazon::$$wrapper  

Methods

methodpublic__get( mixed $var ) : void
inherited

Property getter

Inherited from: \Service_Amazon::__get()

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

Parameters
Name Type Description
$var mixed
Details
Access
public  
methodpublic__isset(  $var ) : void
inherited

Inherited from: \Service_Amazon::__isset()
Parameters
Name Type Description
$var
methodpublic__set(  $var,  $val ) : void
inherited

Inherited from: \Service_Amazon::__set()
Parameters
Name Type Description
$var
$val
methodpubliccreateBucket( ) : void

Create a bucket

Details
Access
public  
methodpublicexecute( ) : void
abstract

Entry point to children tasks

Details
Abstract
 
Access
public  
methodpublicgetBucket( ) : void

methodpublicgetBucketInstance( ) : \Services_Amazon_S3_Resource_Bucket

Returns an instance of Services_Amazon_S3_Resource_Bucket

Returns
Type Description
\Services_Amazon_S3_Resource_Bucket
Details
Access
public  
methodpublicgetClient( ) : \Services_Amazon_S3

We only instantiate the client once per task call

Returns
Type Description
\Services_Amazon_S3
Details
Access
public  
methodpublicgetDescription( ) : string
inherited

Returns the textual description of the task

Inherited from: \Task::getDescription()\Service_Amazon::getDescription()
Returns
Type Description
string The text description of the task
methodpublicgetKey( ) : void
inherited

Inherited from: \Service_Amazon::getKey()
methodpublicgetLocation( ) : \Location
inherited

Returns the location within the buildfile this task occurs. Used by {@link BuildException} to give detailed error messages.

Inherited from: \Task::getLocation()\Service_Amazon::getLocation()
Returns
Type Description
\Location The location object describing the position of this task within the buildfile.
methodpublicgetObjectContents( string $object ) : mixed

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

Parameters
Name Type Description
$object string
Returns
Type Description
mixed
Details
Access
public  
methodpublicgetObjectInstance( mixed $object ) : \Services_Amazon_S3_Resource_Object

Returns an instance of Services_Amazon_S3_Resource_Object

Parameters
Name Type Description
$object mixed
Returns
Type Description
\Services_Amazon_S3_Resource_Object
Details
Access
public  
methodpublicgetOwningTarget( ) : \Target
inherited

Returns the owning target of this task.

Inherited from: \Task::getOwningTarget()\Service_Amazon::getOwningTarget()
Returns
Type Description
\Target The target object that owns this task
methodpublicgetProject( ) : \Project
inherited

Returns a reference to current project

Inherited from: \ProjectComponent::getProject()\Task::getProject()\Service_Amazon::getProject()
Returns
Type Description
\Project Reference to current porject object
methodprotectedgetRegisterSlot( string $slotName ) : void
inherited

Returns a name

Inherited from: \Task::getRegisterSlot()\Service_Amazon::getRegisterSlot()
Parameters
Name Type Description
$slotName string
methodpublicgetRuntimeConfigurableWrapper( ) : \RuntimeConfigurable
inherited

Returns the wrapper object for runtime configuration

Inherited from: \Task::getRuntimeConfigurableWrapper()\Service_Amazon::getRuntimeConfigurableWrapper()
Returns
Type Description
\RuntimeConfigurable The wrapper object used by this task
methodpublicgetSecret( ) : void
inherited

Inherited from: \Service_Amazon::getSecret()
methodpublicgetTaskName( ) : string
inherited

Returns the name of task, used only for log messages

Inherited from: \Task::getTaskName()\Service_Amazon::getTaskName()
Returns
Type Description
string Name of this task
methodpublicgetTaskType( ) : string
inherited

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

Inherited from: \Task::getTaskType()\Service_Amazon::getTaskType()
Returns
Type Description
string The type of this task (XML Tag)
methodpublicinit( ) : void
inherited

Called by the parser to let the task initialize properly.

Inherited from: \Task::init()\Service_Amazon::init()

Should throw a BuildException if something goes wrong with the build

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

Throws
Exception Description
\BuildException
methodpublicisBucketAvailable( ) : bool

Check if the current bucket is available

Returns
Type Description
bool
Details
Access
public  
methodpublicisObjectAvailable( mixed $object ) : bool

Check if the object already exists in the current bucket

Parameters
Name Type Description
$object mixed
Returns
Type Description
bool
Details
Access
public  
methodpubliclog( string $msg, integer $level = Project::MSG_INFO ) : void
inherited

Provides a project level log event to the task.

Inherited from: \Task::log()\Service_Amazon::log()
Parameters
Name Type Description
$msg string

The message to log

$level integer

The priority of the message

Details
See
\BuildEvent  
See
\BuildListener  
methodpublicmain( ) : void
final

Main entry point, doesn't do anything

Should throw a BuildException if someting goes wrong with the build

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

Details
Access
public  
Final
 
methodpublicmaybeConfigure( ) : void
inherited

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

Inherited from: \Task::maybeConfigure()\Service_Amazon::maybeConfigure()
methodpublicperform( ) : void
inherited

Perfrom this task

Inherited from: \Task::perform()\Service_Amazon::perform()
methodpublicsetBucket(  $bucket ) : void

Parameters
Name Type Description
$bucket
methodpublicsetDescription( string $desc ) : void
inherited

Sets a textual description of the task

Inherited from: \Task::setDescription()\Service_Amazon::setDescription()
Parameters
Name Type Description
$desc string

The text describing the task

methodpublicsetKey(  $key ) : void
inherited

Inherited from: \Service_Amazon::setKey()
Parameters
Name Type Description
$key
methodpublicsetLocation( \Location $location ) : void
inherited

Sets the location within the buildfile this task occurs. Called by the parser to set location information.

Inherited from: \Task::setLocation()\Service_Amazon::setLocation()
Parameters
Name Type Description
$location \Location

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

methodpublicsetOwningTarget( \Target $target ) : void
inherited

Sets the owning target this task belongs to.

Inherited from: \Task::setOwningTarget()\Service_Amazon::setOwningTarget()
Parameters
Name Type Description
$target \Target

Reference to owning target

methodpublicsetProject( \Project $project ) : void
inherited

References the project to the current component.

Inherited from: \ProjectComponent::setProject()\Task::setProject()\Service_Amazon::setProject()
Parameters
Name Type Description
$project \Project

The reference to the current project

methodpublicsetRuntimeConfigurableWrapper( \RuntimeConfigurable $wrapper ) : void
inherited

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

Inherited from: \Task::setRuntimeConfigurableWrapper()\Service_Amazon::setRuntimeConfigurableWrapper()
Parameters
Name Type Description
$wrapper \RuntimeConfigurable

The wrapper object this task should use

methodpublicsetSecret(  $secret ) : void
inherited

Inherited from: \Service_Amazon::setSecret()
Parameters
Name Type Description
$secret
methodpublicsetTaskName( string $name ) : string
inherited

Sets the name of this task for log messages

Inherited from: \Task::setTaskName()\Service_Amazon::setTaskName()
Parameters
Name Type Description
$name string
Returns
Type Description
string A string representing the name of this task for log
methodpublicsetTaskType( string $name ) : void
inherited

Sets the type of the task. Usually this is the name of the XML tag

Inherited from: \Task::setTaskType()\Service_Amazon::setTaskType()
Parameters
Name Type Description
$name string

The type of this task (XML Tag)

Documentation was generated by DocBlox 0.18.1.