7e1da6362f7df972007945016b5ba1e16e8e1089
[atutor.git] / mods / atutor_opencaps / opencaps / conversion_service / include / classes / core_XmlTagCollection.php
1 <?php\r
2 // \r
3 /**\r
4  * What is like to be an XML Tag?   \r
5  */\r
6 \r
7 class XmlTagCollection\r
8 {\r
9         private $xmlTagCollection = array(); // a collection of XML tag objects\r
10         \r
11         public function addXmlTagObject($theXmlTagObject)\r
12         {\r
13                 $this->xmlTagCollection[] = $theXmlTagObject;\r
14         }\r
15         \r
16         public function getXmlTagCollection()\r
17         {\r
18                 //echo '<br><br>XmlTagCollection Class -> getXmlTagCollection()<br>Tot in XmlTagCollection: '.count($this->xmlTagCollection);\r
19                 return $this->xmlTagCollection;\r
20         }\r
21         \r
22         /**\r
23          * Print all values of the XML tag object \r
24          */     \r
25         public function toString()\r
26         {\r
27                 echo "<br><br>Total <b>".$this->xmlTagCollection."</b> Tags = ".count($this->xmlTagCollection)."";\r
28                         \r
29                 // Display all tag attributes in the tag\r
30                 foreach ($this->xmlTagCollection as $xmlTagObject)\r
31                 {\r
32                         $xmlTagObject->toString();\r
33                 } // foreach end\r
34                 \r
35         }// toString() end \r
36         \r
37 } // end class XmlTagCollection\r
38 ?>