SoapVar::__construct

(PHP 5, PHP 7, PHP 8)

SoapVar::__constructSoapVar-Konstruktor

Beschreibung

public SoapVar::__construct ( mixed $data , int|null $encoding , string $typeName = "" , string $typeNamespace = "" , string $nodeName = "" , string $nodeNamespace = "" )

Erstellt ein neues SoapVar-Objekt.

Parameter-Liste

data

Die zu übergebenden oder zurückzugebenden Daten.

encoding

Die Encoding-ID, eine der XSD_...-Konstanten.

type_name

Der Type-Name.

type_namespace

Der Type-Namensraum.

node_name

Der XML-Nodename.

node_namespace

Der XML-Node-Namensraum.

Beispiele

Beispiel #1 SoapVar::__construct()-Beispiel

<?php
class SOAPStruct {
    function 
SOAPStruct($s$i$f)
    {
        
$this->varString $s;
        
$this->varInt $i;
        
$this->varFloat $f;
    }
}
$client = new SoapClient(null, array('location' => "http://localhost/soap.php",
                                     
'uri'      => "http://test-uri/"));
$struct = new SOAPStruct('arg'34325.325);
$soapstruct = new SoapVar($structSOAP_ENC_OBJECT"SOAPStruct""http://soapinterop.org/xsd");
$client->echoStruct(new SoapParam($soapstruct"inputStruct"));
?>

Siehe auch

add a note add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top