SoapHeader::__construct

(PHP 5, PHP 7, PHP 8)

SoapHeader::__constructSoapHeader コンストラクタ

説明

SoapHeader::__construct ( string $namespace , string $name , mixed $data = ? , bool $mustunderstand = ? , string $actor = ? )

新しい SoapHeader オブジェクトを生成します。

パラメータ

namespace

SOAP ヘッダ要素の名前空間

name

SOAP ヘッダ要素の名前

data

SOAP ヘッダの内容。PHP の値もしくは SoapVar オブジェクトです。

mustUnderstand

SOAP ヘッダ要素の mustUnderstand 属性の値

actor

SOAP ヘッダ要素の actor 属性の値

例1 SoapHeader::__construct() の例

<?php
$client 
= new SoapClient(null, array('location' => "http://localhost/soap.php",
                                     
'uri'      => "http://test-uri/"));
$client->__soapCall("echoVoid"nullnull,
                new 
SoapHeader('http://soapinterop.org/echoheader/',
                               
'echoMeStringRequest',
                               
'hello world'));
?>

参考