Created
March 12, 2011 18:51
-
-
Save phmLabs/867471 to your computer and use it in GitHub Desktop.
Some Magic
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 | |
$magic = new Autoloader(); | |
$magic->registerNamespace('phmLabs', __DIR__, true); | |
$magic->register(); | |
$dispatcher = new EventDispatcher(); | |
$magic->registerAnnotation('Notify', 'phmLabs\Annotations\Notify', new \phmLabs\Modifier\Notify($dispatcher) ); | |
$a = new A(); | |
$a->b(); | |
// ... another file | |
namespace phmLabs; | |
Class A | |
{ | |
/** | |
* @Notify(before="AnEvent", after="AnotherEvent") | |
*/ | |
public function b( ) | |
{ | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment