Skip to content

Instantly share code, notes, and snippets.

@mishak87
Last active August 29, 2015 14:02
Show Gist options
  • Save mishak87/480eb206424c7d70e17a to your computer and use it in GitHub Desktop.
Save mishak87/480eb206424c7d70e17a to your computer and use it in GitHub Desktop.
<?php
namespace App\Listeners;
use Kdyby\Events\Annotations as Event;
/**
* @Event\Subscriber([<class>])
* <class> is set as default for all handlers
*/
class OnEventListener extends Nette\Object
{
/**
* @Event\Handler([<class>[::]<event>][ <priority>])
* <event> defaults to methods name
* If there is class and event they must be separated by ::.
* Otherwise it is determined by heuristic if argument is event or className.
*/
public function onEvent()
{
// ...
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment