root/trunk/XJConf/Tag.php

Revision 121, 2.6 kB (checked in by mikey, 1 year ago)

whitespace fixes

Line 
1 <?php
2 /**
3  * Interface for holding tag data.
4  *
5  * @author  Stephan Schmidt <me@schst.net>
6  * @author  Frank Kleine <frank.kleine@schlund.de>
7  */
8 namespace net::xjconf;
9 /**
10  * Interface for holding tag data.
11  *
12  * @package  XJConf
13  */
14 interface Tag
15 {
16     /**
17      * Get the name of the tag
18      *
19      * @return  name of the tag
20      */
21     public function getName();
22
23     /**
24      * Get the key under which the value will be stored
25      *
26      * @return  string
27      */
28     public function getKey();
29
30     /**
31      * Add text data
32      *
33      * @param   string  $buf
34      * @return  int     new length of data
35      */
36     public function addData($buf);
37
38     /**
39      * Get the character data of the tag
40      *
41      * @return   character data
42      */
43     public function getData();
44
45     /**
46      * Check, whether the tag has a certain attribute
47      *
48      * @param   string   $name
49      * @return  boolean
50      */
51     public function hasAttribute($name);
52
53     /**
54      * get an attribute
55      *
56      * @param   string  $name  name of the attribute
57      * @return  string  value of the attribute
58      */
59     public function getAttribute($name);
60
61     /**
62      * get all attributes
63      *
64      * @return  array
65      */
66     public function getAttributes();
67
68     /**
69      * Add a new child to this tag.
70      *
71      * @param child  child to add
72      * @return   int    number of childs added
73      */
74     public function addChild(Tag $child);
75
76     /**
77      * Get the child with a specific name
78      *
79      * @param   string  $name
80      * @return  Tag
81      */
82     public function getChild($name);
83
84     /**
85      * Get all children of the tag
86      *
87      * @return  array
88      */
89     public function getChildren();
90
91     /**
92      * Set the content (overrides the character data)
93      *
94      * @param  mixed  $content
95      */
96     public function setContent($content);
97
98     /**
99      * Get the content
100      *
101      * @return  mixed
102      */
103     public function getContent();
104
105     /**
106      * Fetch the value
107      *
108      * @return    mixed  the value of the tag
109      */
110     public function getConvertedValue();
111
112     /**
113      * Get the type of the value
114      *
115      * @param   Tag     $tag
116      * @return  string
117      */
118     public function getValueType(Tag $tag);
119
120     /**
121      * Get the setter method
122      *
123      * @return  string
124      */
125     public function getSetterMethod();
126
127     /**
128      * returns the definition for this tag
129      *
130      * @return  Definition
131      */
132     public function getDefinition();
133
134     /**
135      * Checks, whether the tag supports indexed children
136      *
137      * @return  boolean
138      */
139     public function supportsIndexedChildren();
140 }
141 ?>
Note: See TracBrowser for help on using the browser.