# classes/phing/tasks/ext/creole/CreoleTask.php

## \CreoleTask
jump to top

Handles Creole 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: 526 $

### Properties

`$autocommit= 'false'`

Autocommit flag. Default value is false

Default value `false` Details

Type

`$caching= 'true'`
Default value `true` Details

Type

`$driver= ''`

[optional] Classpath to Creole driver to use.

Details

Type
$driver
  string

`$loaderMap= 'array'`
static

Used for caching loaders / driver. This is to avoid getting an OutOfMemoryError when calling this task multiple times in a row.

NOT IMPLEMENTED YET

Default value `array` Details

Type

`$password= ''`

Password

Details

Type

`$rdbms= ''`

RDBMS Product needed for this SQL.

Details

Type

`$url= ''`

DB url.

Details

Type

`$userId= ''`

User name.

Details

Type

### Methods

`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.

`getLoaderMap( ) :`
`getPassword( ) : \Returns`
Gets the password.
Returns

Type | Description
--- | ---
\Returns |

`getUrl( ) : \Returns`
Gets the url.
Returns

Type | Description
--- | ---
\Returns |

`getUserId( ) : \Returns`
Gets the userId.
Returns

Type | Description
--- | ---
\Returns |

`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.

`isAutocommit( ) : \Returns`
Gets the autocommit.
Returns

Type | Description
--- | ---
\Returns |

`isCaching( $value ) :`
Parameters

Name | Type | Description
--- | --- | ---
$value |  |

`setAutocommit( \autocommit $autocommit ) :`
Auto commit flag for database connection; optional, default false.
Parameters

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
Parameters

Name | Type | Description
--- | --- | ---
$enable |  |

`setDriver( string $driver ) :`
Set the Creole driver to be used.
Parameters

Name | Type | Description
--- | --- | ---
$driver | string | driver class name

`setPassword( \password $password ) :`
Sets the password; required.
Parameters

Name | Type | Description
--- | --- | ---
$password | \password | The password to set

`setUrl( \url $url ) :`
Sets the database connection URL; required.
Parameters

Name | Type | Description
--- | --- | ---
$url | \url | The url to set

`setUserid( \userId $userId ) :`
Set the user name for the connection; required.
Parameters

Name | Type | Description
--- | --- | ---
$userId | \userId | The userId to set

`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.