Aerys\Server::attach PHP Method

attach() public method

Attach an observer
public attach ( aerys\ServerObserver $observer ) : void
$observer aerys\ServerObserver
return void
    public function attach(ServerObserver $observer)
    {
        $this->observers->attach($observer);
    }

Usage Example

Example #1
0
 public function boot(Server $server, Logger $logger)
 {
     $this->logger = $logger;
     if ($this->showActionWarning) {
         $logger->warning("No actions registered for \$host yet, be sure to add them before injecting Host to AcmeHost for best performance.");
     }
     $server->attach(new StartEvent($this->onBoot));
 }
All Usage Examples Of Aerys\Server::attach