mirror of
https://github.com/php/doc-en.git
synced 2026-03-24 07:42:10 +01:00
Document deprecation of SOAP_FUNCTIONS_ALL in SoapServer::addFunction (#5108)
This commit is contained in:
@@ -32,8 +32,14 @@
|
||||
To export several functions, pass an array of function names.
|
||||
</para>
|
||||
<para>
|
||||
To export all the functions, pass a special constant <constant>SOAP_FUNCTIONS_ALL</constant>.
|
||||
To export all the functions, pass an array of function names.
|
||||
</para>
|
||||
<simpara>
|
||||
As of PHP 8.4.0, passing an <type>int</type> value (including
|
||||
<constant>SOAP_FUNCTIONS_ALL</constant>) is deprecated.
|
||||
Use <function>get_defined_functions</function> to retrieve all functions
|
||||
and pass them as an array instead.
|
||||
</simpara>
|
||||
<note>
|
||||
<para>
|
||||
<parameter>functions</parameter> must receive all input arguments in the same
|
||||
@@ -54,6 +60,29 @@
|
||||
&return.void;
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="changelog">
|
||||
&reftitle.changelog;
|
||||
<informaltable>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>&Version;</entry>
|
||||
<entry>&Description;</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>8.4.0</entry>
|
||||
<entry>
|
||||
Passing an <type>int</type> to
|
||||
<methodname>SoapServer::addFunction</methodname>,
|
||||
including <constant>SOAP_FUNCTIONS_ALL</constant>, has been deprecated.
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
@@ -78,7 +107,8 @@ function echoTwoStrings($inputString1, $inputString2)
|
||||
}
|
||||
$server->addFunction(array("echoString", "echoTwoStrings"));
|
||||
|
||||
$server->addFunction(SOAP_FUNCTIONS_ALL);
|
||||
$functions = array_merge(...get_defined_functions());
|
||||
$server->addFunction($functions);
|
||||
|
||||
?>
|
||||
]]>
|
||||
|
||||
Reference in New Issue
Block a user