2024 PHP Conference Japan

SoapServer::getFunctions

(PHP 5, PHP 7, PHP 8)

SoapServer::getFunctions傳回已定義函式的清單

說明

public SoapServer::getFunctions(): 陣列

傳回 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
"此 SOAP 伺服器可以處理以下函數:";
$functions = $server->getFunctions();
foreach (
$functions as $func) {
echo
$func . "\n";
}
}
?>

參見

新增註解

使用者貢獻的註解

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