2017 © Pedro Peláez
 

library bind-event

Binds icanboogie/event to ICanBoogie.

image

icanboogie/bind-event

Binds icanboogie/event to ICanBoogie.

  • Sunday, March 18, 2018
  • by olvlvl
  • Repository
  • 1 Watchers
  • 0 Stars
  • 2,003 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

bind-event

Release Code Quality Code Coverage Downloads, (*1)

The icanboogie/bind-event package binds icanboogie/event to ICanBoogie, using its Autoconfig feature. It provides a config synthesizer for event hooks defined in event configuration fragments, and an events getter for Application instances., (*2)

<?php

namespace ICanBoogie;

require 'vendor/autoload.php';

$app = boot();

$app->configs['event']; // obtain the "event" config.
$app->events;           // obtain an EventCollection instance created with the "event" config.

Installation

composer require icanboogie/bind-event

Attaching event hooks using the event config

The event config can be used to define event hooks., (*3)

The following example demonstrates how an application can attach event hooks to be notified when nodes are saved (or nodes subclasses), and when an authentication exception is thrown during the dispatch of a request., (*4)

<?php

// config/event.php

namespace App;

use ICanBoogie;
use Icybee;

$hooks = Hooks::class . '::';

return [

    Icybee\Modules\Nodes\SaveOperation::class . '::process' => $hooks . 'on_nodes_save',
    ICanBoogie\HTTP\AuthenticationRequired::class . '::rescue' => $hooks . 'on_authentication_required_rescue'

];

Continuous Integration

The project is continuously tested by GitHub actions., (*5)

Tests Static Analysis Code Style, (*6)

Code of Conduct

This project adheres to a Contributor Code of Conduct. By participating in this project and its community, you are expected to uphold this code., (*7)

Contributing

Please see CONTRIBUTING for details., (*8)

License

icanboogie/bind-event is released under the BSD-3-Clause., (*9)

The Versions

18/03 2018

5.0.x-dev

5.0.9999999.9999999-dev https://icanboogie.org/

Binds icanboogie/event to ICanBoogie.

  Sources   Download

BSD-3-Clause

The Requires

 

event icanboogie

24/03 2017

dev-master

9999999-dev https://icanboogie.org/

Binds icanboogie/event to ICanBoogie.

  Sources   Download

BSD-3-Clause

The Requires

 

event icanboogie

24/03 2017

v3.0.0

3.0.0.0 https://icanboogie.org/

Binds icanboogie/event to ICanBoogie.

  Sources   Download

BSD-3-Clause

The Requires

 

event icanboogie

06/11 2016

v2.0.0

2.0.0.0 http://icanboogie.org/

Binds icanboogie/event to ICanBoogie.

  Sources   Download

BSD-3-Clause

The Requires

 

event icanboogie

11/09 2015

v1.0.0

1.0.0.0 http://icanboogie.org/

Binds icanboogie/event to ICanBoogie.

  Sources   Download

BSD-3-Clause

The Requires

 

event icanboogie