2017 © Pedro Peláez
 

symfony-bundle event-loop-bundle

React EventLoop integration for Symfony2.

image

litgroup/event-loop-bundle

React EventLoop integration for Symfony2.

  • Wednesday, January 17, 2018
  • by Sharom
  • Repository
  • 1 Watchers
  • 6 Stars
  • 657 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 7 Versions
  • 0 % Grown

The README.md

LitGroupEventLoopBundle

🚫 (This project is no longer maintained.), (*1)

This bundle integrates react/event-loop library into the Symfony 2., (*2)

Latest Stable Version Total Downloads Latest Unstable Version License, (*3)

Master branch status: Build Status, (*4)

Installation

Use a Composer to install LitGroupEventLoopBundle., (*5)

"require": {
    "litgroup/event-loop-bundle": "1.0.x-dev"
}

Do not forget to register the bundle in the AppKernel:, (*6)

get('litgroup_event_loop');

$loop->run();
```

### Periodic Services

__Periodic service__ — service, defined in the dependency injection container, marked by tag `litgroup_event_loop.periodic`. These services will be called periodically when loop is running.

Tag has two required attributes:
  * `interval` — interval between calls;
  * `method` — service method to call.
  
Interval can be set as seconds represented by double value or as string with time units (`10ms`, `1m`). Interval cannot be less then 1ms.

String representation supports four units:
  * `ms` milliseconds
  * `s` seconds
  * `m` minutes
  * `h` hours
  
Units cannot be mixed.

Example: `10s`, `15m`, `1.5h`

#### Periodic service definition's example

Service class:
```php

<container xmlns="http://symfony.com/schema/dic/services"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://symfony.com/schema/dic/services
        http://symfony.com/schema/dic/services/services-1.0.xsd"
        >

    <services>        

        <service id="periodic_service" class="PeriodicService">
            <tag name="litgroup_event_loop.periodic" interval="1s" method="tick"/>
        </service>

    </services>

</container>

Now, when event loop will be running PeriodicService::tick() will be called with period in 1 second., (*7)

License

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE., (*8)

See details in LICENSE file., (*9)

The Versions

17/01 2018

dev-master

9999999-dev

React EventLoop integration for Symfony2.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Roman Shamritskiy

async react event-loop

30/06 2014

dev-develop

dev-develop

React EventLoop integration for Symfony2.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Roman Shamritskiy

async react event-loop

30/06 2014

v0.3.0

0.3.0.0

React EventLoop integration for Symfony2.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Roman Shamritskiy

async react event-loop

26/06 2014

v0.2.1

0.2.1.0

React EventLoop integration for Symfony2.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Roman Shamritskiy

async react event-loop

26/06 2014

v0.2.0

0.2.0.0

React EventLoop integration for Symfony2.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Roman Shamritskiy

async react event-loop

25/06 2014

dev-custom_loop_factory

dev-custom_loop_factory

React EventLoop integration for Symfony2.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Roman Shamritskiy

async react event-loop

24/06 2014

v0.1.0

0.1.0.0

React EventLoop integration for Symfony2.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Roman Shamritskiy

async react event-loop