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
Methods

getConnection(
)
:
\ConnectionCreates a new Connection as using the driver, url, userid and password specified.
The calling method is responsible for closing the connection.
| Type | Description |
|---|---|
| \Connection |
- throws
- if the UserId/Password/Url is not set or there is no suitable driver or the driver fails to load.

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.

setAutocommit(
\autocommit $autocommit
)
:
Auto commit flag for database connection;
optional, default false.
| Name | Type | Description |
|---|---|---|
| $autocommit | \autocommit | The autocommit to set |

setCaching(
$enable
)
:
Caching loaders / driver. This is to avoid
getting an OutOfMemoryError when calling this task
multiple times in a row; default: true
| Name | Type | Description |
|---|---|---|
| $enable |

setPassword(
\password $password
)
:
Sets the password; required.
| Name | Type | Description |
|---|---|---|
| $password | \password | The password to set |

setUrl(
\url $url
)
:
Sets the database connection URL; required.
| Name | Type | Description |
|---|---|---|
| $url | \url | The url to set |

setUserid(
\userId $userId
)
:
Set the user name for the connection; required.
| Name | Type | Description |
|---|---|---|
| $userId | \userId | The userId to set |