cboden / Ratchet-examples

Tutorial code and cookbook classes for Ratchet
http://socketo.me
238 stars 73 forks source link

Doctrine in the controller of the socket #14

Closed maknaoui closed 9 years ago

maknaoui commented 9 years ago

I have a question , how can i do a modification on the database in the WebSocketService ? i tried to do that :

private $entityManager;
private $clients;
private $container;
public function __construct(EntityManager $entityManager,ContainerInterface $container) 
{
    $this->entityManager = $entityManager;
    $this->container = $container;
    $this->clients = new \SplObjectStorage;
}

but is not working always i have an error