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