-
-
Notifications
You must be signed in to change notification settings - Fork 320
/
apbs02.html
36 lines (28 loc) · 3.51 KB
/
apbs02.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>B.2 AdhocTypedefTask</title><link rel="stylesheet" type="text/css" href="book.css"><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="Phing User Guide"><link rel="up" href="apb.html" title="Appendix B. Core tasks"><link rel="prev" href="apb.html" title="Appendix B. Core tasks"><link rel="next" href="apbs03.html" title="B.3 AppendTask"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">B.2 AdhocTypedefTask </th></tr><tr><td width="20%" align="left"><a accesskey="p" href="apb.html">Prev</a> </td><th width="60%" align="center">Appendix B. Core tasks</th><td width="20%" align="right"> <a accesskey="n" href="apbs03.html">Next</a></td></tr></table><hr></div><div class="sect1"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="AdhocTypedefTask"></a>B.2 AdhocTypedefTask </h2></div></div></div>
<p>The AdhocTypedefTask allows you to define a datatype within your build file.</p>
<p>Note that you should use <![CDATA[ ... ]]> so that you don't have to quote
entities within your<code class="literal"> <adhoc-type></adhoc-type></code> tags.</p>
<div class="table"><a name="idp47659136"></a><p class="formal-object-title"><span class="label">Table B.2: </span><span class="title">Attributes</span></p><div class="table-contents">
<table summary="Attributes" border="1"><colgroup><col class="name"><col class="type"><col class="description"><col class="default"><col class="required"></colgroup><thead><tr><th>Name</th><th>Type</th><th>Description</th><th>Default</th><th>Required</th></tr></thead><tbody><tr><td><code class="literal">name</code></td><td><code class="literal">String</code></td><td>Name of XML tag that will represent this datatype..</td><td>n/a</td><td>Yes</td></tr></tbody></table>
</div></div><br class="table-break">
<div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a name="idp47674016"></a>B.2.1 Example</h3></div></div></div>
<pre class="programlisting"><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></pre>
</div>
</div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="apb.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="apb.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="apbs03.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Appendix B. Core tasks </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> B.3 AppendTask </td></tr></table></div></body></html>