Last active
August 29, 2015 14:02
-
-
Save mishak87/480eb206424c7d70e17a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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