Example #1
0
 /**
  * Parses the current XML element.
  *
  * This method returns arn array with 3 properties:
  *   * name - A clark-notation xml element name.
  *   * value - The parsed value.
  *   * attributes - A key-value list of attributes.
  *
  * @return array
  */
 public function parseCurrentElement()
 {
     $name = $this->getClark();
     $attributes = [];
     if ($this->hasAttributes) {
         $attributes = $this->parseAttributes();
     }
     if (isset($this->elementMap[$name])) {
         $value = call_user_func([$this->elementMap[$name], 'deserializeXml'], $this);
     } else {
         $value = Element\Base::deserializeXml($this);
     }
     return ['name' => $name, 'value' => $value, 'attributes' => $attributes];
 }