Zend\Json\Server\Server::addFunction
Attach a function or callback to the server
Signature
public function addFunction(string|array|callable
$function,
[string
$namespace = ''] )
Parameters
$function
— object- Valid PHP callback
$namespace
— string- Ignored
Returns
- Server
Errors/Exceptions
-
InvalidArgumentException
- if function invalid or not callable