phing-tasks-system

# Class: PDOTask Source Location: /tasks/ext/pdo/PDOTask.php
### Class Overview
    ProjectComponent
       |
       --Task
          |
          --PDOTask
Handles PDO configuration needed by SQL type tasks. #### Author(s): Hans Lellelid <hans@xmpl.org> (Phing) Tim Stephenson <tim.stephenson@sybase.com> (Ant) Nick Chalko <nick@chalko.com> (Ant) Michael McCallum <gholam@xtra.co.nz> (Ant) Jeff Martin <jeff@custommonkey.org> (Ant) #### Version: $Revision: 552 $ #### Copyright: � 2001,2002 THYRELL. All rights reserved | ### Methods getConnection getLoaderMap getPassword getUrl getUserId init isAutocommit isCaching setAutocommit setCaching setPassword setUrl setUserid setVersion
### Child classes: PDOSQLExecTask Executes a series of SQL statements on a database using PDO. | ### Inherited Variables #### Class: Task Task::$description Task::$location Task::$target Task::$taskName Task::$taskType Task::$wrapper #### Class: ProjectComponent ProjectComponent::$project | ### Inherited Methods #### Class: Task Task::getDescription() Returns the textual description of the task Task::getLocation() Returns the location within the buildfile this task occurs. Used by BuildException to give detailed error messages. Task::getOwningTarget() Returns the owning target of this task. Task::getRegisterSlot() Returns a name Task::getRuntimeConfigurableWrapper() Returns the wrapper object for runtime configuration Task::getTaskName() Returns the name of task, used only for log messages Task::getTaskType() Returns the name of the task under which it was invoked, usually the XML tagname Task::init() Called by the parser to let the task initialize properly. Task::log() Provides a project level log event to the task. Task::main() Called by the project to let the task do it's work. 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 <em>phing target1 target2</em> will run all tasks in target3 twice. Task::maybeConfigure() Configure this task if it hasn't been done already. Task::perform() Perfrom this task Task::setDescription() Sets a textual description of the task Task::setLocation() Sets the location within the buildfile this task occurs. Called by the parser to set location information. Task::setOwningTarget() Sets the owning target this task belongs to. Task::setRuntimeConfigurableWrapper() Sets the wrapper object this task should use for runtime configurable elements. Task::setTaskName() Sets the name of this task for log messages Task::setTaskType() Sets the type of the task. Usually this is the name of the XML tag #### Class: ProjectComponent ProjectComponent::getProject() Returns a reference to current project ProjectComponent::log() Logs a message with the given priority. ProjectComponent::setProject() References the project to the current component.
### Class Details [line 37] Handles PDO configuration needed by SQL type tasks. #### Tags:
author: | Hans Lellelid <hans@xmpl.org> (Phing)
author: | Tim Stephenson <tim.stephenson@sybase.com> (Ant)
author: | Nick Chalko <nick@chalko.com> (Ant)
author: | Michael McCallum <gholam@xtra.co.nz> (Ant)
author: | Jeff Martin <jeff@custommonkey.org> (Ant)
version: | $Revision: 552 $
copyright: | � 2001,2002 THYRELL. All rights reserved
abstract: |
[ Top ] ### Class Methods ### method getConnection [line 133]
`Connection getConnection( )`
Creates a new Connection as using the driver, url, userid and password specified. The calling method is responsible for closing the connection. #### Tags:
return: | the newly created connection.
throws: | BuildException if the UserId/Password/Url is not set or there is no suitable driver or the driver fails to load.
access: | protected
[ Top ] ### method getLoaderMap [line 122]
`void getLoaderMap( )`
#### Tags:
access: | protected
[ Top ] ### method getPassword [line 213]
`Returns getPassword( )`
Gets the password. #### Tags:
return: | a String
access: | public
[ Top ] ### method getUrl [line 189]
`Returns getUrl( )`
Gets the url. #### Tags:
return: | a String
access: | public
[ Top ] ### method getUserId [line 197]
`Returns getUserId( )`
Gets the userId. #### Tags:
return: | a String
access: | public
[ Top ] ### method init [line 72]
`void init( )`
Initialize CreoleTask. This method includes any necessary Creole libraries and triggers appropriate error if they cannot be found. This is not done in header because we may want this class to be loaded w/o triggering an error. Overrides Task::init() (Called by the parser to let the task initialize properly.) [ Top ] ### method isAutocommit [line 181]
`Returns isAutocommit( )`
Gets the autocommit. #### Tags:
return: | a boolean
access: | public
[ Top ] ### method isCaching [line 173]
`void isCaching( $value)`
#### Tags:
access: | public
#### Parameters:
| $value |
[ Top ] ### method setAutocommit [line 109]
`void setAutocommit( autocommit $autocommit)`
Auto commit flag for database connection; optional, default false. #### Tags:
access: | public
#### Parameters:
autocommit | $autocommit | The autocommit to set
[ Top ] ### method setCaching [line 84]
`void setCaching( $enable $enable)`
Caching loaders / driver. This is to avoid getting an OutOfMemoryError when calling this task multiple times in a row; default: true #### Tags:
access: | public
#### Parameters:
$enable | $enable |
[ Top ] ### method setPassword [line 100]
`void setPassword( password $password)`
Sets the password; required. #### Tags:
access: | public
#### Parameters:
password | $password | The password to set
[ Top ] ### method setUrl [line 92]
`void setUrl( url $url)`
Sets the database connection URL; required. #### Tags:
access: | public
#### Parameters:
url | $url | The url to set
[ Top ] ### method setUserid [line 205]
`void setUserid( userId $userId)`
Set the user name for the connection; required. #### Tags:
access: | public
#### Parameters:
userId | $userId | The userId to set
[ Top ] ### method setVersion [line 118]
`void setVersion( version $version)`
Sets the version string, execute task only if rdbms version match; optional. #### Tags:
access: | public
#### Parameters:
version | $version | The version to set
[ Top ] Documentation generated on Mon, 19 Oct 2009 10:51:26 +0200 by phpDocumentor 1.4.3