17 |
/** |
/** |
18 |
* This is a simple wrapper function |
* This is a simple wrapper function |
19 |
* for building XMLTagClass objects |
* for building XMLTagClass objects |
20 |
|
* |
21 |
|
* @tutorial XMLTagClass.cls#helper |
22 |
* |
* |
23 |
* @param string - the xml tag name |
* @param string - the xml tag name |
24 |
* @param array - the name="value" pairs of |
* @param array - the name="value" pairs of |
28 |
* |
* |
29 |
* @return XMLTagClass object |
* @return XMLTagClass object |
30 |
*/ |
*/ |
31 |
function xml_tag($name, $attributes=array()) { |
function &xml_tag($name, $attributes=array()) { |
32 |
$tag = new XMLTagClass($name, $attributes); |
$tag = new XMLTagClass($name, $attributes); |
33 |
$num_args = func_num_args(); |
$num_args = func_num_args(); |
34 |
for ($i=2;$i<$num_args;$i++) { |
for ($i=2;$i<$num_args;$i++) { |
37 |
return $tag; |
return $tag; |
38 |
} |
} |
39 |
|
|
40 |
|
/** |
41 |
|
* This builds an xml tag, just as xml_tag() does, |
42 |
|
* but turns on the auto wrapping of CDATA for the |
43 |
|
* content for the tag. |
44 |
|
* |
45 |
|
* @param string - the xml tag name |
46 |
|
* @param array - the name="value" pairs of |
47 |
|
* tag attributes |
48 |
|
* @param mixed - any content that lives in the |
49 |
|
* PCDATA portion of the XML tag |
50 |
|
* |
51 |
|
* @return XMLTagClass object |
52 |
|
*/ |
53 |
|
function &xml_ctag($name, $attributes=array()) { |
54 |
|
$args = func_get_args(); |
55 |
|
$tag =& call_user_func_array("xml_tag", $args); |
56 |
|
$tag->set_cdata_flag(TRUE); |
57 |
|
return $tag; |
58 |
|
} |
59 |
|
|
60 |
|
|
61 |
/** |
/** |
62 |
* This function is used to build a |
* This function is used to build a |