The AdhocTypedefTask allows you to define a datatype within your build file.
Note that you should use <![CDATA[ ... ]]> so that you don't have to quote entities within your
<adhoc-type></adhoc-type> tags.
Table B.2: Attributes
| Name | Type | Description | Default | Required |
|---|---|---|---|---|
name
|
String
| Name of XML tag that will represent this datatype.. | n/a | Yes |
<target name="main"
description="==>test AdhocType">
<adhoc-type name="dsn"><![CDATA[
class CreoleDSN extends DataType {
private $url;
function setUrl($url) {
$this->url = $url;
}
function getUrl() {
return $this->url;
}
}
]]></adhoc-type>
<!-- creole-sql task doesn't exist; just an example -->
<creole-sql file="test.sql">
<dsn url="mysql://root@localhost/test"/>
</creole-sql>
</target>