Skip to content

Commit

Permalink
fix: initialize the server
Browse files Browse the repository at this point in the history
  • Loading branch information
cydrickn committed Sep 30, 2022
1 parent 8ea5b6a commit bb8841b
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/SwooleWebsocketBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,29 @@
use Cydrickn\SwooleWebsocketBundle\Attribute\RouteAttribute;
use Cydrickn\SwooleWebsocketBundle\DependencyInjection\Compiler\RoutePass;
use Cydrickn\SwooleWebsocketBundle\DependencyInjection\SwooleWebsocketExtension;
use Cydrickn\SwooleWebsocketBundle\Runtime\Runtime;
use Cydrickn\SwooleWebsocketBundle\Websocket\Server;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\ChildDefinition;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Definition;
use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
use Symfony\Component\DependencyInjection\Reference;
use Symfony\Component\HttpKernel\Bundle\AbstractBundle;

class SwooleWebsocketBundle extends AbstractBundle
{
public function boot()
{
parent::boot();
if ($this->container->has(Server::class)) {
$this->container->get(Server::class);
} elseif ($this->container->has(\Cydrickn\SocketIO\Server::class)) {
$this->container->get(\Cydrickn\SocketIO\Server::class);
}
}

public function build(ContainerBuilder $container)
{
$container->registerAttributeForAutoconfiguration(
Expand Down

0 comments on commit bb8841b

Please sign in to comment.