AppserverIo\Appserver\Core\ApplicationServer::unbindService PHP Method

unbindService() public method

Unbind the service with the passed name and runlevel.
public unbindService ( integer $runlevel, string $name ) : void
$runlevel integer The runlevel of the service
$name string The name of the service
return void
    public function unbindService($runlevel, $name)
    {
        // stop the service instance
        $this->runlevels[$runlevel][$name]->stop();
        // unbind the service from the naming directory
        $this->getNamingDirectory()->unbind(sprintf('php:services/%s/%s', $this->runlevelToString($runlevel), $name));
        // unset the service instance
        unset($this->runlevels[$runlevel][$name]);
        // print a message that the service has been stopped
        $this->getSystemLogger()->info(sprintf('Successfully stopped service %s', $name));
    }