Given the following interface:
interface ISoapInterface {
public static function registerSoapTypes( &$wsdl );
public static function registerSoapOperations( &$server );
}
And the following code:
$soapProvider = array( "FilePool", "UserList" );
foreach( $soapProvider as $provider ) {
call_user_func( array( $provider, "registerSoapTypes" ), &$server->wsdl );
call_user_func( array( $provider, "registerSoapOperations" ), &$server );
}
FilePooland UserListboth implement ISoapInterface.
PHP will complain about two calls inside foreach:
Call diverting is outdated
So, I looked through this post, and the documentation seems pretty clear how to solve this. Removing an ampersand from an actual call.
So I changed my code to look like this:
$soapProvider = array( "FilePool", "UserList" );
foreach( $soapProvider as $provider ) {
call_user_func( array( $provider, "registerSoapTypes" ), $server->wsdl );
call_user_func( array( $provider, "registerSoapOperations" ), $server );
}
PHP is now complaining
Parameter 1 in FilePool :: registerSoapTypes expected as a reference, the value specified
Parameter 1 in FilePool :: registerSoapOperations expected as a link, the value specified
In addition to this, the functionality is now broken. So this obviously cannot be a solution.