ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
# B.2 AdhocTypedefTask 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 NameTypeDescriptionDefaultRequired`name``String`Name of XML tag that will represent this datatype..n/aYes B.2.1 Example ``` <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> ```