CakeFest 2024: The Official CakePHP Conference

SoapServer::getFunctions

(PHP 5, PHP 7, PHP 8)

SoapServer::getFunctions定義されている関数の一覧を返す

説明

public SoapServer::getFunctions(): array

SoapServer オブジェクトで定義されている関数の一覧を返します。 このメソッドは、 SoapServer::addFunction() もしくは SoapServer::setClass() で追加された全ての関数の一覧を返します。

パラメータ

この関数にはパラメータはありません。

戻り値

定義されている関数の配列を返します。

例1 SoapServer::getFunctions() の例

<?php
$server
= new SoapServer(NULL, array("uri" => "http://test-uri"));
$server->addFunction(SOAP_FUNCTIONS_ALL);
if (
$_SERVER["REQUEST_METHOD"] == "POST") {
$server->handle();
} else {
echo
"This SOAP server can handle following functions: ";
$functions = $server->getFunctions();
foreach(
$functions as $func) {
echo
$func . "\n";
}
}
?>

参考

add a note

User Contributed Notes

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