Esempio n. 1
0
 protected function convertSimplePhpXml($value, $node, SimpleType $xsd)
 {
     try {
         $this->composer->encode($value, $node, $xsd);
     } catch (ConversionNotFoundException $e) {
         $base = $xsd->getBase();
         if ($base) {
             $this->composer->encode($value, $node, $base);
         } else {
             throw $e;
         }
     }
 }
Esempio n. 2
0
 protected function convertSimpleXmlPhp(\DOMNode $node, Type $xsd)
 {
     try {
         return $this->composer->decode($node, $xsd);
     } catch (ConversionNotFoundException $e) {
         $base = $xsd->getBase();
         if ($base) {
             return $this->convertSimplePhpXml($node, $base);
         } else {
             throw $e;
         }
     }
 }