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

bindService() public method

Binds the passed service to the runlevel.
public bindService ( integer $runlevel, object $service ) : void
$runlevel integer The runlevel to bound the service to
$service object The service to bound
return void
    public function bindService($runlevel, $service)
    {
        // bind the service to the runlevel
        $this->runlevels[$runlevel][$service->getName()] = $service;
        // bind the service callback to the naming directory
        $this->getNamingDirectory()->bindCallback(sprintf('php:services/%s/%s', $this->runlevelToString($runlevel), $service->getName()), array(&$this, 'getService'), array($runlevel, $service->getName()));
    }