Changeset 9

Show
Ignore:
Timestamp:
08/26/06 21:18:47 (2 years ago)
Author:
mikey
Message:

added and corrected doc blocks

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/XJConf/DefinedTag.php

    r2 r9  
    1 <? 
     1<?php 
     2/** 
     3 * Contains data of tag in the default namespace. 
     4 *  
     5 * @author  Stephan Schmidt <me@schst.net> 
     6 * @author  Frank Kleine <frank.kleine@schlund.de> 
     7 */ 
    28XJConfLoader::load('Tag', 
    39                   'definitions.TagDefinition' 
    410); 
    511/** 
    6  * Generic Tag wrapper that can be used by extensions to dynamically add 
    7  * children to other tags. 
     12 * Contains data of tag in the default namespace. 
    813 *  
    9  * @author Stephan Schmidt <me@schst.net> 
     14 * @package  XJConf 
    1015 */ 
    1116class DefinedTag implements Tag 
     
    6368                $this->name = $name; 
    6469                $this->atts = $atts; 
     70        } 
     71         
     72        /** 
     73         * Get the name of the tag 
     74         *  
     75         * @return   name of the tag 
     76         */ 
     77        public function getName() 
     78        { 
     79                return $this->name; 
     80        } 
     81         
     82        /** 
     83         * Set the key 
     84         *  
     85         * @param  string  $key 
     86         */ 
     87        public function setKey($key) 
     88        { 
     89                $this->key = $key; 
     90        } 
     91         
     92        /** 
     93         * Get the key under which the value will be stored 
     94         *  
     95         * @return  string 
     96         */ 
     97        public function getKey() 
     98        { 
     99                return $this->tagDef->getKey($this); 
     100        } 
     101         
     102        /** 
     103         * Add text data 
     104         *  
     105         * @param   string  $buf 
     106         * @return  int     new length of data 
     107         */ 
     108        public function addData($buf) 
     109        { 
     110                $this->data .= $buf; 
     111                return strlen($this->data); 
     112        } 
     113         
     114        /** 
     115         * Get the character data of the tag 
     116         *  
     117         * @return   character data 
     118         */ 
     119        public function getData() 
     120        { 
     121                return $this->data; 
     122        } 
     123 
     124        /** 
     125         * Check, whether the tag has a certain attribute 
     126         *  
     127         * @param   string   $name 
     128         * @return  boolean 
     129         */ 
     130        public function hasAttribute($name) 
     131        { 
     132                return isset($this->atts[$name]); 
     133        } 
     134 
     135        /** 
     136         * get an attribute 
     137         *  
     138         * @param   string  $name  name of the attribute 
     139         * @return  string  value of the attribute 
     140         */ 
     141        public function getAttribute($name) 
     142        { 
     143                if ($this->hasAttribute($name) == true) { 
     144                    return $this->atts[$name]; 
     145                } 
     146                 
     147                return null; 
    65148        } 
    66149         
     
    76159        return count($this->children); 
    77160    } 
    78  
    79         /** 
    80          * Add text data 
    81          *  
    82          * @param   string  $buf 
    83          * @return  int     new length of data 
    84          */ 
    85         public function addData($buf) 
    86         { 
    87                 $this->data .= $buf; 
    88                 return strlen($this->data); 
    89         } 
    90  
    91         /** 
    92          * Check, whether the tag has a certain attribute 
    93          *  
    94          * @param   string   $name 
    95          * @return  boolean 
    96          */ 
    97         public function hasAttribute($name) 
    98         { 
    99                 return isset($this->atts[$name]); 
    100         } 
    101  
    102         /** 
    103          * get an attribute 
    104          *  
    105          * @param   string  $name  name of the attribute 
    106          * @return  string  value of the attribute 
    107          */ 
    108         public function getAttribute($name) 
    109         { 
    110                 if ($this->hasAttribute($name) == true) { 
    111                     return $this->atts[$name]; 
    112                 } 
    113                  
    114                 return null; 
    115         } 
    116  
    117         /** 
    118          * Get all children of the tag 
    119          *  
    120          * @return  array 
    121          */ 
    122         public function getChildren() 
    123         { 
    124                 return $this->children; 
    125         } 
    126161 
    127162        /** 
     
    143178 
    144179        /** 
    145          * Get the name of the tag 
    146          *  
    147          * @return   name of the tag 
    148          */ 
    149         public function getName() 
    150         { 
    151                 return $this->name; 
    152         } 
    153  
    154         /** 
    155          * Get the character data of the tag 
    156          *  
    157          * @return   character data 
    158          */ 
    159         public function getData() 
    160         { 
    161                 return $this->data; 
    162         } 
     180         * Get all children of the tag 
     181         *  
     182         * @return  array 
     183         */ 
     184        public function getChildren() 
     185        { 
     186                return $this->children; 
     187        } 
     188 
     189        /** 
     190     * Set the content (overrides the character data) 
     191     *  
     192     * @param  mixed  $content 
     193     */ 
     194        public function setContent($content) 
     195        { 
     196                $this->content = $content; 
     197        } 
     198 
     199        /** 
     200         * Get the content 
     201         *  
     202         * @return  mixed 
     203         */ 
     204        public function getContent() 
     205        { 
     206                if (null != $this->content) { 
     207                        return $this->content; 
     208                } 
     209                 
     210                return $this->getData(); 
     211        } 
     212         
     213        /** 
     214         * Fetch the value 
     215         *  
     216         * @return      mixed  the value of the tag 
     217         */ 
     218        public function getConvertedValue() 
     219        { 
     220                return $this->tagDef->convertValue($this); 
     221        } 
     222 
     223        /** 
     224         * Get the type of the value 
     225         *  
     226         * @param   Tag     $tag 
     227         * @return  string 
     228         */ 
     229        public function getValueType(Tag $tag) 
     230        { 
     231                return $this->tagDef->getValueType($tag); 
     232        } 
     233         
     234        /** 
     235         * Get the setter method 
     236         *  
     237         * @return  string 
     238         */ 
     239    public function getSetterMethod() 
     240    { 
     241        return $this->tagDef->getSetterMethod(); 
     242    } 
     243     
     244        /** 
     245         * Checks, whether the tag supports indexed children 
     246         *  
     247         * @return  boolean 
     248         */ 
     249        public function supportsIndexedChildren() 
     250        { 
     251                return $this->tagDef->supportsIndexedChildren(); 
     252        }        
    163253         
    164254        /** 
     
    181271        return $this->tagDef; 
    182272    } 
    183      
    184         /** 
    185          * Fetch the value 
    186          *  
    187          * @return      mixed  the value of the tag 
    188          */ 
    189         public function getConvertedValue() 
    190         { 
    191                 return $this->tagDef->convertValue($this); 
    192         } 
    193  
    194         /** 
    195          * Get the key under which the value will be stored 
    196          */ 
    197         public function getKey() 
    198         { 
    199                 return $this->tagDef->getKey($this); 
    200         } 
    201      
    202         /** 
    203          * Get the type of the value 
    204          *  
    205          * @return  string 
    206          */ 
    207         public function getValueType(Tag $tag) 
    208         { 
    209                 return $this->tagDef->getValueType($tag); 
    210         } 
    211  
    212         /** 
    213          * Set the key 
    214          *  
    215          * @param  string  $key 
    216          */ 
    217         public function setKey($key) 
    218         { 
    219                 $this->key = $key; 
    220         } 
    221  
    222         /** 
    223          * Get the setter method 
    224          */ 
    225     public function getSetterMethod() 
    226     { 
    227         return $this->tagDef->getSetterMethod(); 
    228     } 
    229  
    230     /** 
    231      * Set the content (overrides the character data) 
    232      *  
    233      * @param  mixed  $content 
    234      */ 
    235         public function setContent($content) 
    236         { 
    237                 $this->content = $content; 
    238         } 
    239  
    240         /** 
    241          * Get the content 
    242          *  
    243          * @return  mixed 
    244          */ 
    245         public function getContent() 
    246         { 
    247                 if (null != $this->content) { 
    248                         return $this->content; 
    249                 } 
    250                  
    251                 return $this->getData(); 
    252         } 
    253  
    254         /** 
    255          * Checks, whether the tag supports indexed children 
    256          *  
    257          * @return  boolean 
    258          */ 
    259         public function supportsIndexedChildren() 
    260         { 
    261                 return $this->tagDef->supportsIndexedChildren(); 
    262         }        
    263273} 
    264274?> 
  • trunk/XJConf/DefinitionParser.php

    r4 r9  
    11<?php 
     2/** 
     3 * Parse tag definitions files. 
     4 * 
     5 * @author  Stephan Schmidt <stephan.schmidt@schlund.de> 
     6 * @author  Frank Kleine <frank.kleine@schlund.de> 
     7 */ 
    28XJConfLoader::load('definitions.AttributeDefinition', 
    39                   'definitions.CDataDefinition', 
     
    1420 * Parse tag definitions files. 
    1521 * 
    16  * @author Stephan Schmidt <stephan.schmidt@schlund.de> 
     22 * This parser reads xml files that define the tags used by other 
     23 * xml documents which describe a data structure. 
     24 * 
     25 * @package  XJConf 
    1726 */ 
    1827class DefinitionParser 
    1928{ 
     29    /** 
     30     * this tag defines a namespace 
     31     */ 
    2032    const TAG_NAMESPACE      = 'namespace'; 
    21  
    2233        /** 
    23      * Stack for currently open definitions 
     34     * stack for currently open definitions 
    2435     * 
    2536     * @var  array<Definition> 
    2637     */ 
    2738    private $defStack = array(); 
    28  
     39    /** 
     40     * stack for currently opened definition handlers 
     41     * 
     42     * @var  DefinitionHandler 
     43     */ 
    2944    private $defHandlerStack = array(); 
    30  
    3145    /** 
    3246     * Constant for the default namespace 
    3347     */ 
    3448    const DEFAULT_NAMESPACE = '__default'; 
    35  
    3649    /** 
    3750     * The current namespace 
     
    4053     */ 
    4154    private $currentNamespace; 
    42  
    4355    /** 
    4456     * All extracted namespace definitions 
     
    4759     */ 
    4860    private $defs; 
    49  
     61    /** 
     62     * the real xml parser 
     63     * 
     64     * @var  XMLReader 
     65     */ 
    5066    private $reader; 
    51  
     67    /** 
     68     * list of node types, used for compatibility between PHP 5.0 and 5.1 
     69     * 
     70     * @var  array 
     71     */ 
    5272    private $nodeTypes   = array(); 
    5373 
    54  
    5574    /** 
    5675     * constructor 
     76     *  
     77     * Sets the node types depending on your PHP version using the constants 
     78     * defined by the XMLReader PHP extension. 
    5779     */ 
    5880    public function __construct() 
    5981    { 
    60         $this->defs = new NamespaceDefinitions(); 
     82        $this->defs             = new NamespaceDefinitions(); 
    6183        $this->currentNamespace = self::DEFAULT_NAMESPACE; 
    6284 
     
    7395        } 
    7496    } 
    75  
     97     
     98    /** 
     99     * returns the current namespace 
     100     * 
     101     * @return  string 
     102     */ 
    76103    public function getCurrentNamespace() 
    77104    { 
    78105        return $this->currentNamespace; 
    79106    } 
    80  
     107     
     108    /** 
     109     * returns the list of created namespace definitions 
     110     * 
     111     * @return  NamespaceDefinitions 
     112     */ 
    81113    public function getNamespaceDefinitions() 
    82114    { 
    83115        return $this->defs; 
    84116    } 
    85  
     117     
     118    /** 
     119     * returns the definition stack 
     120     * 
     121     * @return  array<Definition> 
     122     */ 
    86123    public function &getDefStack() 
    87124    { 
    88125        return $this->defStack; 
    89126    } 
    90  
     127     
     128    /** 
     129     * initializes the parser 
     130     */ 
    91131    private function initParser() 
    92132    { 
     
    155195    private function startElement($namespaceURI, $sName, $atts) 
    156196    { 
     197        // a new namespace 
    157198        if (self::TAG_NAMESPACE  == $sName) { 
    158199                if (isset($atts['uri']) == false) { 
    159200                throw new InvalidNamespaceDefinitionException('The <' . self::TAG_NAMESPACE . '> tag is missing the uri attribute.'); 
    160201            } 
    161  
     202             
     203            // change current namespace to new namespace 
    162204            $this->currentNamespace = $atts['uri']; 
    163205                return; 
    164206        } 
    165  
     207         
     208        // create the appropriate definition handler and use this 
     209        // to create the required definition 
    166210        $defHandler = DefinitionHandlerFactory::create($sName, $this); 
    167211        $def        = $defHandler->startElement($namespaceURI, $sName, $atts); 
     
    180224     * Fetches the TagDefinition from the stack and 
    181225     * adds it to the NamespaceDefinition object. 
     226     *  
     227     * @param   string  $namespaceURI  namespace of end tag 
     228     * @param   string  $sName         name of end tag 
    182229     */ 
    183230    private function endElement($namespaceURI, $sName) 
    184231    { 
    185  
     232        // namespace definition ends, switch back to default namespace 
    186233        if (self::TAG_NAMESPACE  == $sName) { 
    187234            $this->currentNamespace = self::DEFAULT_NAMESPACE; 
    188235            return; 
    189236        } 
    190  
     237         
     238        // use definition handler to finalize the definition of the current tag 
    191239        $defHandler = array_pop($this->defHandlerStack); 
    192240        $defHandler->endElement($namespaceURI, $sName); 
  • trunk/XJConf/GenericTag.php

    r2 r9  
    11<?php 
    2 XJConfLoader::load('Tag'); 
    32/** 
    43 * Generic Tag wrapper that can be used by extensions to dynamically add 
     
    76 * @author Stephan Schmidt <me@schst.net> 
    87 */ 
     8XJConfLoader::load('Tag'); 
     9/** 
     10 * Generic Tag wrapper that can be used by extensions to dynamically add 
     11 * children to other tags. 
     12 *  
     13 * @package  XJConf 
     14 */ 
    915class GenericTag implements Tag 
    1016{ 
    11  
    1217        /** 
    1318         * name of the tag 
     
    1520         * @var  string 
    1621         */ 
    17         private $name = null; 
    18  
     22        private $name     = null; 
    1923        /** 
    2024         * character data 
     
    2226         * @var  string 
    2327         */ 
    24         private $data = null; 
    25  
     28        private $data     = null; 
    2629        /** 
    2730         * content of the tag (overrides data) 
     
    2932         * @var  mixed 
    3033         */ 
    31         private $content = null; 
    32          
     34        private $content  = null; 
    3335        /** 
    3436         * attributes of the tag 
     
    3638         * @var  array 
    3739         */ 
    38         private $atts = array(); 
    39  
     40        private $atts     = array(); 
    4041        /** 
    4142         * Children of the tag 
     
    4445         */ 
    4546        private $children = array(); 
    46  
    4747        /** 
    4848         * value of the tag 
     
    5050         * @var  mixed 
    5151         */ 
    52         private $value = null; 
    53          
     52        private $value    = null; 
    5453        /** 
    5554         * Key of the tag 
     
    5756         * @var  string 
    5857         */ 
    59         private $key = null; 
    60          
    61         /** 
    62          * Create a new tag without attributes 
    63          *  
    64          * @param name   name of the tag 
     58        private $key      = null; 
     59         
     60        /** 
     61         * Create a new tag with or without attributes 
     62         *  
     63         * @param  string $name  name of the tag 
     64         * @param  array  $atts  optional  list of attributes 
    6565         */ 
    6666        public function __construct($name, $atts = array()) 
     
    6969                $this->atts = $atts; 
    7070        } 
    71  
     71     
     72        /** 
     73         * Get the name of the tag 
     74         *  
     75         * @return  string 
     76         */ 
     77        public function getName() 
     78        { 
     79                return $this->name; 
     80        } 
     81         
     82        /** 
     83         * Set the key 
     84         *  
     85         * @param  string  $key 
     86         */ 
     87        public function setKey($key) 
     88        { 
     89                $this->key = $key; 
     90        } 
     91         
     92        /** 
     93         * Get the key under which the value will be stored 
     94         *  
     95         * @return  string 
     96         */ 
     97        public function getKey() 
     98        { 
     99                return $this->key; 
     100        } 
     101         
    72102        /** 
    73103         * Add text data 
     
    81111                return strlen($this->data); 
    82112        } 
     113         
     114        /** 
     115         * Get the character data of the tag 
     116         *  
     117         * @return  string 
     118         */ 
     119        public function getData() 
     120        { 
     121                return $this->data; 
     122        } 
    83123 
    84124        /** 
     
    107147                return null; 
    108148        } 
    109  
    110         /** 
    111          * Get all children of the tag 
    112          *  
    113          * @return  array 
    114          */ 
    115         public function getChildren() 
    116         { 
    117                 return $this->children; 
    118         } 
    119  
     149         
     150        /** 
     151         * Add a new child to this tag. 
     152         *  
     153         * @param   Tag  $child  child to add 
     154         * @return  int  number of childs added 
     155         */ 
     156        public function addChild(Tag $child) 
     157        { 
     158                array_push($this->children, $child); 
     159                return count($this->children); 
     160        } 
     161     
    120162        /** 
    121163         * Get the child with a specific name 
     
    134176                return null; 
    135177        } 
    136  
    137         /** 
    138          * Get the name of the tag 
    139          *  
    140          * @return   name of the tag 
    141          */ 
    142         public function getName() 
    143         { 
    144                 return $this->name; 
    145         } 
    146  
    147         /** 
    148          * Get the character data of the tag 
    149          *  
    150          * @return   character data 
    151          */ 
    152         public function getData() 
    153         { 
    154                 return $this->data; 
    155         } 
    156  
    157         /** 
    158          * Add a new child to this tag. 
    159          *  
    160          * @param   Tag  $child  child to add 
    161          * @return  int  number of childs added 
    162          */ 
    163         public function addChild(Tag $child) 
    164         { 
    165                 array_push($this->children, $child); 
    166                 return count($this->children); 
    167         } 
    168  
     178         
     179        /** 
     180         * Get all children of the tag 
     181         *  
     182         * @return  array 
     183         */ 
     184        public function getChildren() 
     185        { 
     186                return $this->children; 
     187        } 
     188         
     189        /** 
     190     * Set the content (overrides the character data) 
     191     *  
     192     * @param  mixed  $content 
     193     */ 
     194        public function setContent($content) 
     195        { 
     196                $this->content = $content; 
     197        } 
     198 
     199        /** 
     200         * Get the content 
     201         *  
     202         * @return  mixed 
     203         */ 
     204        public function getContent() 
     205        { 
     206                if (null != $this->content) { 
     207                        return $this->content; 
     208                } 
     209                 
     210                return $this->getData(); 
     211        } 
     212     
    169213        /** 
    170214         * Fetch the value 
     
    176220                return $this->value; 
    177221        } 
    178  
    179         /** 
    180          * Get the key under which the value will be stored 
    181          *  
    182          * @return  string 
    183          */ 
    184         public function getKey() 
    185         { 
    186                 return $this->key; 
    187         } 
    188  
    189         /** 
    190          * Set the value of the tag 
    191          *  
    192          * @param  mixed 
    193          */ 
    194         public function setValue($value) 
    195          { 
    196                 $this->value = $value; 
    197         } 
    198          
     222     
    199223        /** 
    200224         * Get the type of the value 
     
    214238                return gettype($this->value); 
    215239        } 
    216  
    217         /** 
    218          * Set the key 
    219          *  
    220          * @param  string  $key 
    221          */ 
    222         public function setKey($key) 
    223         { 
    224                 $this->key = $key; 
    225         } 
    226  
     240         
    227241        /** 
    228242         * Get the setter method 
     
    236250    } 
    237251 
    238     /** 
    239      * Set the content (overrides the character data) 
    240      *  
    241      * @param  mixed  $content 
    242      */ 
    243         public function setContent($content) 
    244         { 
    245                 $this->content = $content; 
    246         } 
    247  
    248         /** 
    249          * Get the content 
    250          *  
    251          * @return  mixed 
    252          */ 
    253         public function getContent() 
    254         { 
    255                 if (null != $this->content) { 
    256                         return $this->content; 
    257                 } 
    258                  
    259                 return $this->getData(); 
    260         } 
    261  
    262252        /** 
    263253         * Checks, whether the tag supports indexed children 
     
    268258        { 
    269259                return true; 
    270         }        
     260        } 
     261         
     262        /** 
     263         * Set the value of the tag 
     264         *  
     265         * @param  mixed 
     266         */ 
     267        public function setValue($value) 
     268         { 
     269                $this->value = $value; 
     270        } 
    271271} 
    272272?> 
  • trunk/XJConf/Tag.php

    r2 r9  
    11<?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/** 
     9 * Interface for holding tag data. 
     10 * 
     11 * @package  XJConf 
     12 */ 
    213interface Tag 
    314{ 
     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     * Add a new child to this tag. 
     62     *  
     63     * @param child  child to add 
     64     * @return   int    number of childs added 
     65     */ 
    466        public function addChild(Tag $child); 
    5         public function addData($buf); 
     67         
     68        /** 
     69         * Get the child with a specific name 
     70         *  
     71         * @param   string  $name 
     72         * @return  Tag 
     73         */ 
     74        public function getChild($name); 
     75         
     76        /** 
     77         * Get all children of the tag 
     78         *  
     79         * @return  array 
     80         */ 
     81        public function getChildren(); 
     82         
     83        /** 
     84     * Set the content (overrides the character data) 
     85     *  
     86     * @param  mixed  $content 
     87     */ 
    688        public function setContent($content); 
    7         public function hasAttribute($name); 
    8         public function getAttribute($name); 
    9         public function getChildren(); 
    10         public function getChild($name); 
    11         public function getName(); 
    12         public function getData(); 
     89         
     90        /** 
     91        * Get the content 
     92        *  
     93        * @return  mixed 
     94        */ 
    1395        public function getContent(); 
     96         
     97        /** 
     98         * Fetch the value 
     99         *  
     100         * @return      mixed  the value of the tag 
     101         */ 
    14102        public function getConvertedValue(); 
     103         
     104        /** 
     105         * Get the type of the value 
     106         *  
     107         * @param   Tag     $tag 
     108         * @return  string 
     109         */ 
    15110        public function getValueType(Tag $tag); 
    16         public function getKey(); 
     111 
     112        /** 
     113         * Get the setter method 
     114         *  
     115         * @return  string 
     116         */ 
    17117        public function getSetterMethod(); 
     118         
     119        /** 
     120         * Checks, whether the tag supports indexed children 
     121         *  
     122         * @return  boolean 
     123         */ 
    18124        public function supportsIndexedChildren(); 
    19125} 
  • trunk/XJConf/XJConfLoader.php

    r2 r9  
    11<?php 
     2/** 
     3 * Class loader for all XJConf classes. 
     4 * 
     5 * @author  Frank Kleine <frank.kleine@schlund.de> 
     6 */ 
     7/** 
     8 * Class loader for all XJConf classes. 
     9 * 
     10 * The class loader takes care that all class files are only loaded once. It 
     11 * allows all classes to include the required files without knowing where they 
     12 * reside or if they have been loaded before. 
     13 * 
     14 * @package  XJConf 
     15 */ 
    216class XJConfLoader 
    317{ 
  • trunk/XJConf/XmlParser.php

    r4 r9  
    11<?php 
     2/** 
     3 * Parser that reads xml files and generates the data structure. 
     4 * 
     5 * @author  Stephan Schmidt <stephan.schmidt@schlund.de> 
     6 * @author  Frank Kleine <frank.kleine@schlund.de> 
     7 */ 
    28XJConfLoader::load('DefinedTag', 
    39                   'GenericTag', 
     
    713                   'exceptions.UnknownTagException' 
    814); 
     15/** 
     16 * Parser that reads xml files and generates the data structure. 
     17 * 
     18 * This parser reads xml files using the tag definitions and 
     19 * created the data structure and objects described by tag 
     20 * definitions and the xml file. 
     21 * 
     22 * @package  XJConf 
     23 */ 
    924class XmlParser 
    1025{ 
     26    /** 
     27     * the list of tags that have to be processed 
     28     * 
     29     * @var  array<Tag> 
     30     */ 
    1131    private $tagStack    = array(); 
    12  
     32    /** 
     33     * hashmap of generated data types 
     34     * 
     35     * @var  array<String, mixed> 
     36     */ 
    1337    private $config      = array(); 
    14  
     38    /** 
     39     * a listof defined namespaces