示例#1
0
 /**
  * This method processes a "dictionary" node.
  *
  * @access protected
  * @param \SimpleXMLElement $node                           a reference to the "dictionary" node
  * @return array                                            an associated array
  * @throws Throwable\Instantiation\Exception                indicates that problem occurred during
  *                                                          the instantiation
  */
 protected function parseDictionaryElement(\SimpleXMLElement $node)
 {
     $iMap = new Common\Mutable\HashMap();
     $children = $node->children();
     foreach ($children as $child) {
         switch ($child->getName()) {
             case 'entry':
                 $iMap->putEntries($this->parseEntryElement($child));
                 break;
             default:
                 throw new Throwable\Instantiation\Exception('Unable to initial class.');
                 break;
         }
     }
     return $iMap->toDictionary();
 }