cunningsoft/chat-bundle
最新稳定版本:0.4
Composer 安装命令:
composer require cunningsoft/chat-bundle
包简介
A chat bundle for Symfony2
关键字:
README 文档
README
Installation
-
Add the following to your
composer.jsonfile:// composer.json { // ... require: { // ... "cunningsoft/chat-bundle": "0.5.*" } }
-
Run
composer update cunningsoft/chat-bundleto install the new dependencies. -
Register the new bundle in your
AppKernel.php: (note, that you also need to add the KnpTimeBundle here)<?php // in AppKernel::registerBundles() $bundles = array( // ... new Cunningsoft\ChatBundle\CunningsoftChatBundle(), new Knp\Bundle\TimeBundle\KnpTimeBundle(), // ... );
-
Let your user entity implement the
Cunningsoft\ChatBundle\Entity\AuthorInterface:// Acme\ProjectBundle\Entity\User.php <?php namespace Acme\ProjectBundle\Entity; use Cunningsoft\ChatBundle\Entity\AuthorInterface; class User implements AuthorInterface { // ...
-
Map the interface to your user entity in your
config.yml:// app/config/config.yml // ... doctrine: orm: resolve_target_entities: Cunningsoft\ChatBundle\Entity\AuthorInterface: Acme\ProjectBundle\Entity\User
-
Update your database schema:
$ app/console doctrine:schema:update
-
Configure the chat bundle:
// app/config/config.yml // ... cunningsoft_chat: # refresh interval in milliseconds update_interval: 5000 # messages to be shown in chat number_of_messages: 10
-
Import routes:
// app/config/routing.yml // ... cunningsoft_chat_bundle: resource: "@CunningsoftChatBundle/Controller" type: annotation
-
Render the chat in your template:
// src/Acme/ProjectBundle/Resources/views/Default/index.html.twig // ... {% render(controller('CunningsoftChatBundle:Chat:show')) %} // ...
Changelog
-
0.5 (master) Support for newer Symfony versions
-
0.4 Upgrade to Symfony 2.3.* - dropped support for Symfony 2.2.*
-
0.3 Included "Cunningsoft" into the namespace to avoid conflicts
-
0.2 Upgrade to Symfony 2.2.* - dropped support for Symfony 2.1.*
-
0.1 First working version. Support for Symfony 2.1.*
Notes
Please also visit my Open Source Browsergame Project Open Soccer Star.
统计信息
- 总下载量: 8.1k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 17
- 点击次数: 0
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2012-12-08