2017 © Pedro Peláez
 

symfony-bundle chat-bundle

A chat bundle for Symfony2

image

cunningsoft/chat-bundle

A chat bundle for Symfony2

  • Friday, July 7, 2017
  • by dmecke
  • Repository
  • 6 Watchers
  • 15 Stars
  • 3,149 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 16 Forks
  • 10 Open issues
  • 7 Versions
  • 5 % Grown

The README.md

Build Status, (*1)

Installation

  1. Add the following to your composer.json file:, (*2)

    // composer.json
    {
        // ...
        require: {
            // ...
            "cunningsoft/chat-bundle": "0.5.*"
        }
    }
    
  2. Run composer update cunningsoft/chat-bundle to install the new dependencies., (*3)

  3. Register the new bundle in your AppKernel.php: (note, that you also need to add the KnpTimeBundle here), (*4)

    <?php
    // in AppKernel::registerBundles()
    $bundles = array(
        // ...
        new Cunningsoft\ChatBundle\CunningsoftChatBundle(),
        new Knp\Bundle\TimeBundle\KnpTimeBundle(),
        // ...
    );
    
  4. Let your user entity implement the Cunningsoft\ChatBundle\Entity\AuthorInterface:, (*5)

    // Acme\ProjectBundle\Entity\User.php
    <?php
    
    namespace Acme\ProjectBundle\Entity;
    
    use Cunningsoft\ChatBundle\Entity\AuthorInterface;
    
    class User implements AuthorInterface
    {
        // ...
    
  5. Map the interface to your user entity in your config.yml:, (*6)

    // app/config/config.yml
    // ...
    doctrine:
        orm:
            resolve_target_entities:
                Cunningsoft\ChatBundle\Entity\AuthorInterface: Acme\ProjectBundle\Entity\User
    
  6. Update your database schema:, (*7)

    $ app/console doctrine:schema:update
    
  7. Configure the chat bundle:, (*8)

    // app/config/config.yml
    // ...
    cunningsoft_chat:
        # refresh interval in milliseconds
        update_interval: 5000
        # messages to be shown in chat
        number_of_messages: 10
    
  8. Import routes:, (*9)

    // app/config/routing.yml
    // ...
    cunningsoft_chat_bundle:
        resource: "@CunningsoftChatBundle/Controller"
        type: annotation
    
  9. Render the chat in your template:, (*10)

    // src/Acme/ProjectBundle/Resources/views/Default/index.html.twig
    // ...
    {% render(controller('CunningsoftChatBundle:Chat:show')) %}
    // ...
    

Changelog

  • 0.5 (master) Support for newer Symfony versions, (*11)

  • 0.4 Upgrade to Symfony 2.3.* - dropped support for Symfony 2.2.*, (*12)

  • 0.3 Included "Cunningsoft" into the namespace to avoid conflicts, (*13)

  • 0.2 Upgrade to Symfony 2.2.* - dropped support for Symfony 2.1.*, (*14)

  • 0.1 First working version. Support for Symfony 2.1.*, (*15)

Notes

Please also visit my Open Source Browsergame Project Open Soccer Star., (*16)

The Versions

07/07 2017
04/06 2015

dev-gladi-dev2

dev-gladi-dev2 https://github.com/dmecke/ChatBundle

A chat bundle for Symfony2

  Sources   Download

MIT

The Requires

 

communication chat

11/07 2013