Exemplo n.º 1
0
 public function __construct(SimpleXMLElement $xml, $level = 0)
 {
     parent::__construct($xml, $level);
     list($prefix, $ns) = each($this->namespaces);
     if ($xml->attributes($ns)) {
         $attributes = $xml->attributes($ns);
     } else {
         // fallback to global namespace if no attributes can be found
         $attributes = $xml->attributes();
     }
     $this->value = (string) $attributes['value'];
 }
Exemplo n.º 2
0
 public function __construct(SimpleXMLElement $xml, $level = 0)
 {
     parent::__construct($xml, $level);
     $attributes = $xml->attributes();
     $base = (string) $attributes['base'];
     if (strpos($base, ':') !== false) {
         // remove the namespace prefix
         $parts = explode(':', $base);
         $base = $parts[1];
     }
     $this->base = $base;
 }
Exemplo n.º 3
0
 public function __construct(SimpleXMLElement $xml, $level = 0)
 {
     parent::__construct($xml, $level);
     $attributes = $xml->attributes();
     $this->name = (string) $attributes['name'];
     $this->type = (string) $attributes['type'];
     if (strpos($this->type, ':') !== false) {
         // remove the namespace prefix
         $parts = explode(':', $this->type);
         $this->type = $parts[1];
     }
     $this->minOccurs = (string) $attributes['minOccurs'];
     $this->maxOccurs = (string) $attributes['maxOccurs'];
 }
Exemplo n.º 4
0
 public function __construct(SimpleXMLElement $xml, $level = 0)
 {
     parent::__construct($xml, $level);
     $attributes = $xml->attributes();
     $this->name = (string) $attributes['name'];
 }
Exemplo n.º 5
0
 public function __construct(SimpleXMLElement $xml, $level = 0)
 {
     parent::__construct($xml, $level);
     list($ns) = array_keys($xml->getNamespaces());
     $this->elementCount = count($xml->children($ns, true));
 }
Exemplo n.º 6
0
 public function __construct(SimpleXMLElement $xml, $level = 0)
 {
     parent::__construct($xml, $level);
 }