2024 年 PHP Conference Japan

SoapHeader::__construct

(PHP 5, PHP 7, PHP 8)

SoapHeader::__constructSoapHeader 建構子

說明

public SoapHeader::__construct(
    字串 $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'));
?>

另請參閱

新增註解

使用者貢獻的註解

此頁面沒有使用者貢獻的註解。
To Top