classes/phing/tasks/ext/pdo/PDOTask.php

\PDOTask

Handles PDO configuration needed by SQL type tasks.

Use {@link Project#createTask} to register a new Task.

Extends from
\Task
author
Hans Lellelid (Phing)
author
Nick Chalko (Ant)
author
Jeff Martin (Ant)
author
Michael McCallum (Ant)
author
Tim Stephenson (Ant)
copyright
2001,2002 THYRELL. All rights reserved
package
phing.tasks.system
version
$Revision: 1208 $

Properties

Propertyprivate  $autocommit= 'false'

Autocommit flag. Default value is false

Default valuefalseDetails
Type
Propertyprivate  $caching= 'true'
Default valuetrueDetails
Type
Propertyprivate  $password= ''

Password

Details
Type
Propertyprivate  $rdbms= ''

RDBMS Product needed for this SQL.

Details
Type
Propertyprivate  $url= ''

DB url.

Details
Type
Propertyprivate  $userId= ''

User name.

Details
Type

Methods

methodprotected  getConnection( ) : \Connection
Creates a new Connection as using the driver, url, userid and password specified.

The calling method is responsible for closing the connection.

Returns
Type Description
\Connection
Details
throws
if the UserId/Password/Url is not set or there is no suitable driver or the driver fails to load.
methodprotected  getLoaderMap( ) :
methodpublic  getPassword( ) : \Returns
Gets the password.
Returns
Type Description
\Returns
methodpublic  getUrl( ) : \Returns
Gets the url.
Returns
Type Description
\Returns
methodpublic  getUserId( ) : \Returns
Gets the userId.
Returns
Type Description
\Returns
methodpublic  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.

methodpublic  isAutocommit( ) : \Returns
Gets the autocommit.
Returns
Type Description
\Returns
methodpublic  isCaching(  $value ) :
Parameters
Name Type Description
$value
methodpublic  setAutocommit( \autocommit $autocommit ) :
Auto commit flag for database connection; optional, default false.
Parameters
Name Type Description
$autocommit \autocommit The autocommit to set
methodpublic  setCaching(  $enable ) :
Caching loaders / driver. This is to avoid getting an OutOfMemoryError when calling this task multiple times in a row; default: true
Parameters
Name Type Description
$enable
methodpublic  setPassword( \password $password ) :
Sets the password; required.
Parameters
Name Type Description
$password \password The password to set
methodpublic  setUrl( \url $url ) :
Sets the database connection URL; required.
Parameters
Name Type Description
$url \url The url to set
methodpublic  setUserid( \userId $userId ) :
Set the user name for the connection; required.
Parameters
Name Type Description
$userId \userId The userId to set
methodpublic  setVersion( \version $version ) :
Sets the version string, execute task only if rdbms version match; optional.
Parameters
Name Type Description
$version \version The version to set
Documentation was generated by DocBlox 0.13.1.