2017 © Pedro Peláez
 

yii2-extension yii2-longpoll

Implements long polling connection

image

izumi-kun/yii2-longpoll

Implements long polling connection

  • Saturday, March 31, 2018
  • by Izumi-kun
  • Repository
  • 2 Watchers
  • 4 Stars
  • 165 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 8 Versions
  • 10 % Grown

The README.md

Yii2 longpoll

Implements long polling AJAX mechanism., (*1)

Latest Stable Version Total Downloads Build Status Scrutinizer Code Quality Code Coverage, (*2)

Installation

The preferred way to install this extension is through composer., (*3)

Either run, (*4)

php composer.phar require --prefer-dist izumi-kun/yii2-longpoll

or add, (*5)

"izumi-kun/yii2-longpoll": "~1.0.0"

to the require section of your composer.json., (*6)

Basic Usage

Controller

class SiteController extends Controller
{
    public function actions()
    {
        return [
            'polling' => [
                'class' => LongPollAction::class,
                'events' => ['eventId'],
                'callback' => [$this, 'longPollCallback'],
            ],
        ];
    }
    public function longPollCallback(Server $server)
    {
        $server->responseData = 'any data';
    }
}

View

LongPoll::widget([
    'url' => ['site/polling'],
    'events' => ['eventId'],
    'callback' => 'console.log',
]);

Model

\izumi\longpoll\Event::triggerByKey('eventId');

Example

https://github.com/Izumi-kun/yii2-longpoll-example, (*7)

License

BSD-3-Clause, (*8)

The Versions

31/03 2018

dev-master

9999999-dev

Implements long polling connection

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Viktor Khokhryakov

extension yii2 server comet longpoll longpolling

09/11 2017

0.5.1

0.5.1.0

Implements long polling connection

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Viktor Khokhryakov

extension yii2 server comet longpoll longpolling

09/11 2017

0.5.0

0.5.0.0

Implements long polling connection

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Viktor Khokhryakov

extension yii2 server comet longpoll longpolling

20/08 2017

0.4.1

0.4.1.0

Implements long polling connection

  Sources   Download

BSD-3-Clause

The Requires

 

by Viktor Khokhryakov

extension yii2 server comet longpoll longpolling

19/03 2017

0.4.0

0.4.0.0

Implements long polling connection

  Sources   Download

BSD-3-Clause

The Requires

 

by Viktor Khokhryakov

extension yii2 server comet longpoll longpolling

01/02 2017

0.3.0

0.3.0.0

Implements long polling connection

  Sources   Download

BSD-3-Clause

The Requires

 

by Viktor Khokhryakov

extension yii2 server comet longpoll longpolling

01/02 2017

0.2.0

0.2.0.0

Implements long polling connection

  Sources   Download

BSD-3-Clause

The Requires

 

by Viktor Khokhryakov

extension yii2 server comet longpoll longpolling

29/01 2017

0.1.0

0.1.0.0

Implements long polling connection

  Sources   Download

BSD-3-Clause

The Requires

 

by Viktor Khokhryakov

extension yii2 server comet longpoll longpoling