Youshido Messages Bundle
``` php
$user = $this->get('doctrine')->getRepository('AppBundle:User')
->find(1);, (*1)
$user2 = $this->get('doctrine')->getRepository('AppBundle:User')
->find(2);, (*2)
$user3 = $this->get('doctrine')->getRepository('AppBundle:User')
->find(3);, (*3)
$conversations = $this->get('messages')->getConversations($user);
$newMessages = $this->get('messages')->countUnreadMessages($user);, (*4)
$conversation = $this->get('doctrine')
->getRepository('YMessagesBundle:Conversation')
->find(1);, (*5)
//only get messages
$messages = $this->get('messages')->getMessages($conversation->getId());
//get messages and set it to read for user
$messages = $this->get('messages')->getMessages($conversation->getId(), $user);, (*6)
//sending new message
$this->get('messages')->sendMessage($conversation->getId(), $user, 'hello !');, (*7)
$this->get('messages')->joinConversation($conversation->getId(), $user2);
$this->get('messages')->leaveConversation($conversation->getId(), $user2);, (*8)
$members = $this->get('messages')->getMembers($conversation->getId());, (*9)
$conversation = $this->get('messages')->findOrCreateConversation($user2, $user3);, (*10)
$is = $this->get('messages')->isConversationBetween($user, $user2);
```, (*11)