(PHP 5, PHP 7, PHP 8)
SoapHeader::__construct — SoapHeader 建構子
$namespace
,$name
,$data
= ?,$mustunderstand
= ?,$actor
= ?建構新的 SoapHeader 物件。
namespace
SOAP 標頭元素的命名空間。
name
SoapHeader 物件的名稱。
data
SOAP 標頭的內容。它可以是一個 PHP 值或一個 SoapVar 物件。
mustUnderstand(必須理解)
SOAP 標頭元素的 mustUnderstand
屬性值。
actor(參與者)
SOAP 標頭元素的 actor
屬性值。
範例 #1 SoapHeader::__construct() 範例
<?php
$client = new SoapClient(null, array('location' => "https://127.0.0.1/soap.php",
'uri' => "http://test-uri/"));
$client->__soapCall("echoVoid", null, null,
new SoapHeader('http://soapinterop.org/echoheader/',
'echoMeStringRequest',
'hello world'));
?>