ICanBoogie
  • Documentation
  • API Reference
  • Event v2.0.0
Namespaces
  • ICanBoogie
Classes
  • Event
  • EventCollection
  • EventCollectionProvider
  • EventHook
  • EventHookReflection
  • EventProfiler
  • EventReflection

Class EventHook

An event hook.

An ICanBoogie\EventHook instance is created when an event hook is attached. The purpose of this instance is to ease its detaching:

<?php

use ICanBoogie\HTTP\Dispatcher;

$eh = $events->attach(function(Dispatcher\CollectEvent $event, Dispatcher $target) {

    // …

});

$eh->detach();
ICanBoogie\EventHook uses ICanBoogie\Accessor\AccessorTrait (not available)
Namespace: ICanBoogie
Located at EventHook.php

Methods summary

protected get_type( void )
protected get_hook( void )
protected get_events( void )
public __construct( ICanBoogie\EventCollection $events, string $type, callable $hook )

Parameters

$events
$type
$hook
public detach( void )

Detaches the event hook from the events.

Detaches the event hook from the events.

Properties summary

Magic properties

public read-only $events : ICanBoogie\EventCollection

EventCollection collection.

public read-only $type : string

Event type

public read-only $hook : callable

Event hook.

Event v2.0.0 – Check on GitHub – API documentation generated by ApiGen