public function addComplexType($name, $typeClass = 'complexType', $phpType = 'array', $compositor = '', $restrictionBase = '', $elements = array(), $attrs = array(), $arrayType = '')
    {
        if (count($elements) > 0) {
            $eElements = array();
            foreach ($elements as $n => $e) {
                // expand each element
                $ee = array();
                foreach ($e as $k => $v) {
                    $k = strpos($k, ':') ? $this->expandQname($k) : $k;
                    $v = strpos($v, ':') ? $this->expandQname($v) : $v;
                    $ee[$k] = $v;
                }
                $eElements[$n] = $ee;
            }
            $elements = $eElements;
        }

        if (count($attrs) > 0) {
            foreach ($attrs as $n => $a) {
                // expand each attribute
                foreach ($a as $k => $v) {
                    $k = strpos($k, ':') ? $this->expandQname($k) : $k;
                    $v = strpos($v, ':') ? $this->expandQname($v) : $v;
                    $aa[$k] = $v;
                }
                $eAttrs[$n] = $aa;
            }
            $attrs = $eAttrs;
        }

        $restrictionBase = strpos($restrictionBase, ':') ? $this->expandQname($restrictionBase) : $restrictionBase;
        $arrayType = strpos($arrayType, ':') ? $this->expandQname($arrayType) : $arrayType;

        $typens = isset($this->namespaces['types']) ? $this->namespaces['types'] : $this->namespaces['tns'];
        $this->schemas[$typens][0]->addComplexType($name, $typeClass, $phpType, $compositor, $restrictionBase, $elements, $attrs, $arrayType);
    }
public function addComplexType($name, $typeClass = 'complexType', $phpType = 'array', $compositor = '', $restrictionBase = '', $elements = array(), $attrs = array(), $arrayType = '')
    {
        if (count($elements) > 0) {
            $eElements = array();
            foreach ($elements as $n => $e) {
                // expand each element
                $ee = array();
                foreach ($e as $k => $v) {
                    $k = strpos($k, ':') ? $this->expandQname($k) : $k;
                    $v = strpos($v, ':') ? $this->expandQname($v) : $v;
                    $ee[$k] = $v;
                }
                $eElements[$n] = $ee;
            }
            $elements = $eElements;
        }

        if (count($attrs) > 0) {
            foreach ($attrs as $n => $a) {
                // expand each attribute
                foreach ($a as $k => $v) {
                    $k = strpos($k, ':') ? $this->expandQname($k) : $k;
                    $v = strpos($v, ':') ? $this->expandQname($v) : $v;
                    $aa[$k] = $v;
                }
                $eAttrs[$n] = $aa;
            }
            $attrs = $eAttrs;
        }

        $restrictionBase = strpos($restrictionBase, ':') ? $this->expandQname($restrictionBase) : $restrictionBase;
        $arrayType = strpos($arrayType, ':') ? $this->expandQname($arrayType) : $arrayType;

        $typens = isset($this->namespaces['types']) ? $this->namespaces['types'] : $this->namespaces['tns'];
        $this->schemas[$typens][0]->addComplexType($name, $typeClass, $phpType, $compositor, $restrictionBase, $elements, $attrs, $arrayType);
    }
public function addComplexType ( $ name , $ typeClass = 'complexType' , $ phpType = 'array' , $ compositor = '' , $ restrictionBase = '' , $ elements = array ( ) , $ attrs = array ( ) , $ arrayType = '' ) { if ( count ( $ elements ) > 0 ) { $ eElements = array ( ) ; foreach ( $ elements as $ n => $ e ) { // expand each element $ ee = array ( ) ; foreach ( $ e as $ k => $ v ) { $ k = strpos ( $ k , ':' ) ? $ this -> expandQname ( $ k ) : $ k ; $ v = strpos ( $ v , ':' ) ? $ this -> expandQname ( $ v ) : $ v ; $ ee [ $ k ] = $ v ; } $ eElements [ $ n ] = $ ee ; } $ elements = $ eElements ; } if ( count ( $ attrs ) > 0 ) { foreach ( $ attrs as $ n => $ a ) { // expand each attribute foreach ( $ a as $ k => $ v ) { $ k = strpos ( $ k , ':' ) ? $ this -> expandQname ( $ k ) : $ k ; $ v = strpos ( $ v , ':' ) ? $ this -> expandQname ( $ v ) : $ v ; $ aa [ $ k ] = $ v ; } $ eAttrs [ $ n ] = $ aa ; } $ attrs = $ eAttrs ; } $ restrictionBase = strpos ( $ restrictionBase , ':' ) ? $ this -> expandQname ( $ restrictionBase ) : $ restrictionBase ; $ arrayType = strpos ( $ arrayType , ':' ) ? $ this -> expandQname ( $ arrayType ) : $ arrayType ; $ typens = isset ( $ this -> namespaces [ 'types' ] ) ? $ this -> namespaces [ 'types' ] : $ this -> namespaces [ 'tns' ] ; $ this -> schemas [ $ typens ] [ 0 ] -> addComplexType ( $ name , $ typeClass , $ phpType , $ compositor , $ restrictionBase , $ elements , $ attrs , $ arrayType ) ; }
adds an XML Schema complex type to the WSDL types

@param string $name
@param string $typeClass (complexType|simpleType|attribute)
@param string $phpType currently supported are array and struct (php assoc array)
@param string $compositor (all|sequence|choice)
@param string $restrictionBase namespace:name (http://schemas.xmlsoap.org/soap/encoding/:Array)
@param array $elements e.g. array ( name => array(name=>'',type=>'') )
@param array $attrs e.g. array(array('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'xsd:string[]'))
@param string $arrayType as namespace:name (xsd:string)
@see nusoap_xmlschema
@access public
adds an XML Schema complex type to the WSDL types