Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[UPDATE] update for documentation

[UPDATE] update for documentation informations in order to catch all
restriction informations but only if it's not an enumeration node plus
ensure that it catches all nodes even if the first node is an
enumeration node
  • Loading branch information...
commit b53d39b6e9bd274b9329aaa54ceeae9dcb712d95 1 parent 192793c
@mikaelcom authored
Showing with 12 additions and 12 deletions.
  1. +12 −12 WsdlToPhpGenerator.php
View
24 WsdlToPhpGenerator.php
@@ -1889,23 +1889,23 @@ protected function manageWsdlNodeRestriction($_wsdlLocation = '',DOMNode $_domNo
$childNodesLength = $childNodes->length;
$firstValidNodePos = 0;
while(!(($childNodes->item($firstValidNodePos) instanceof DOMNode) && $childNodes->item($firstValidNodePos)->nodeType === XML_ELEMENT_NODE) && $firstValidNodePos++ < $childNodesLength);
- /**
- * Not an enumeration restriction :
- * <xs:simpleType name="duration">
- * -<xs:restriction base="xs:duration">
- * --<xs:pattern value="\-?P(\d*D)?(T(\d*H)?(\d*M)?(\d*(\.\d*)?S)?)?"/>
- * --<xs:minInclusive value="-P10675199DT2H48M5.4775808S"/>
- * --<xs:maxInclusive value="P10675199DT2H48M5.4775807S"/>
- * -</xs:restriction>
- * </xs:simpleType>
- */
- if($childNodes->item($firstValidNodePos) && stripos($childNodes->item($firstValidNodePos)->nodeName,'enumeration') === false)
+ if($childNodes->item($firstValidNodePos))
{
$this->addVirtualStruct($parentNode->getAttribute('name'));
for($i = 0;$i < $childNodesLength;$i++)
{
$childNode = $childNodes->item($i);
- if($childNode && $childNode->hasAttributes())
+ /**
+ * Not an enumeration restriction :
+ * <xs:simpleType name="duration">
+ * -<xs:restriction base="xs:duration">
+ * --<xs:pattern value="\-?P(\d*D)?(T(\d*H)?(\d*M)?(\d*(\.\d*)?S)?)?"/>
+ * --<xs:minInclusive value="-P10675199DT2H48M5.4775808S"/>
+ * --<xs:maxInclusive value="P10675199DT2H48M5.4775807S"/>
+ * -</xs:restriction>
+ * </xs:simpleType>
+ */
+ if($childNode && stripos($childNode->nodeName,'enumeration') === false && $childNode->hasAttributes())
{
$childNodeName = explode(':',$childNode->nodeName);
$childNodeName = $childNodeName[count($childNodeName) - 1];
Please sign in to comment.
Something went wrong with that request. Please try again.