Scalr\System\Zmq\Cron\Task\ServerTerminate::setupClientCallback PHP Method

setupClientCallback() private method

Setups callback to API HTTP client configured for specified server
private setupClientCallback ( Scalr\Modules\PlatformModuleInterface $platformModule, callable $callback = null, DBServer $dbServer = null )
$platformModule Scalr\Modules\PlatformModuleInterface Platform module for the server
$callback callable optional Settable callback
$dbServer DBServer optional Server to configure client
    private function setupClientCallback(PlatformModuleInterface $platformModule, callable $callback = null, DBServer $dbServer = null)
    {
        $client = $platformModule->getHttpClient($dbServer);
        if ($client instanceof CallbackInterface) {
            $client->setCallback($callback);
        }
    }