Events WebSocket

This commit is contained in:
2021-03-30 16:32:39 -03:00
parent 3c341a4b9d
commit 4556a50f58
12 changed files with 300 additions and 0 deletions

View File

@ -0,0 +1,20 @@
<?php
namespace ProVM\Common\Alias\Server;
use Psr\Container\ContainerInterface as Container;
use Ratchet\Server\IoServer;
use Psr\EventDispatcher\EventDispatcherInterface as Dispatcher;
class App extends IoServer {
protected $container;
public function setContainer(Container $container) {
$this->container = $container;
}
public function getContainer(): Container {
return $this->container;
}
public function add(string $action, callable $call) {
$this->container->get(Dispatcher::class)->register($action, $call);
}
}