Provides common methods and properties to all of the S3 tasks
| version |
$Id: 334f64383dde9b06cc259690e391c2b85cc90477 $ |
| 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() |
creator for _filesets
createFileset() : \FileSet
Store the object on S3
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
getContent()
getContent()
getContentType()
getContentType()
getCreateBuckets()
getCreateBuckets()
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
getter for _filesets
getFilesets() : array
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
| 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.
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
Determines what we're going to store in the object
getObjectData() : string
If _content has been set, this will get stored,
otherwise, we read from _source
Returns
string
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
getSecret()
getSecret()
Inherited
| inherited_from |
\Service_Amazon::getSecret() |
| inherited_from |
\Service_Amazon_S3::getSecret() |
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
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 |
\BuildEvent |
| see |
\BuildListener |
| inherited_from |
\Task::log() |
| inherited_from |
\Service_Amazon::log() |
| inherited_from |
\Service_Amazon_S3::log() |
Parameters
$msg
stringThe message to log
$level
integerThe 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() |
setAcl()
setAcl($permission)
setBucket()
setBucket($bucket)
Inherited
| inherited_from |
\Service_Amazon_S3::setBucket() |
Parameters
$bucket
setContent()
setContent($content)
setContentType()
setContentType($contentType)
setCreateBuckets()
setCreateBuckets($createBuckets)
Parameters
$createBuckets
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
stringThe text describing the task
setFileNameOnly()
setFileNameOnly($fileNameOnly)
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
\LocationThe location object describing the position of this
task within the buildfile.
setObject()
setObject($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
\TargetReference 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
\ProjectThe 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
setSecret()
setSecret($secret)
Inherited
| inherited_from |
\Service_Amazon::setSecret() |
| inherited_from |
\Service_Amazon_S3::setSecret() |
Parameters
$secret
setSource()
setSource($source)
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
stringThe 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
saveObject()
saveObject($object, $data)
Properties
$_acl : string
(default value: 'private')
$_client : \Services_Amazon_S3
Inherited
$_content : mixed
The user can specify either a file to upload or just a bit of content
(default value: null)
$_contentType : string
(default value: 'binary/octet-stream')
$_extensionContentTypeMapper : array
$_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 |
$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 |