library aspects
Implements Aspect Oriented Programming in a very basic way
kampernet/aspects
Implements Aspect Oriented Programming in a very basic way
- Wednesday, June 18, 2014
- by kampernet
- Repository
- 1 Watchers
- 0 Stars
- 0 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 1 Versions
- 0 % Grown
Kampernet Aspects
This package provides a very simple way to get aspect oriented programming capabilities in your PHP classes with
little overhead. Please see the code in tests/AspectTest.php to see how to use it., (*1)
$aspectee = Aspect::getAspectedInstance('Aspectee');
$aspectee->doThisThing();
You can easily hijack or create a PHP class autoloader that implements AOP this way. Using this Aspect class you
make classes that are Aspectees and use the @has annotation to say what Aspects they have. The naming convention is
such that it looks for the class you say it has plus the word Aspect., (*2)
eg: @has Example looks for and loads a class by the name of ExampleAspect., (*3)
The Aspect class methods are either named before\|after<Classname><MethodName> or have the @match annotation in the same
format to get applied correctly. Using the @match annotation you can also match to regular expressions., (*4)
dev-master
9999999-dev
Implements Aspect Oriented Programming in a very basic way
Sources
Download
by
Cookie Delicious