Recommend this page to a friend! |
![]() ![]() |
Info | ![]() |
![]() ![]() |
Reputation | Support forum | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2021-11-22 (8 months ago) ![]() | Not enough user ratings | Total: 146 | All time: 9,039 This week: 217![]() |
Version | License | PHP version | Categories | |||
aophp 1.0 | GNU General Publi... | 5.4 | PHP 5, Language |
Description | Author | |
This package can be used to alter the behavior of classes with AOP. |
AOPHP ===== AOPHP- AOP for PHP Requirements ------------ PHP 5.4< Main Sugar ---------- - Annotations are used as main config provider: @AOP/before(Class.Method) @AOP/after(Class.Method) - Use PHP magic to provide a natural way to do the things: $class->method('something') // instead of $AOPHP->advice($class, 'method', ['something']); - Tolerant parser: @AOP / BeFOrE ( Class . Method) @aoP / AFTeR ( Class . Method) - Flexible PointCut: @AOP/before(Class . *) @AOP/after(* . Method) - No dependencies - Fast due to built in cache with a couple of ready to use drivers - Automated cache invalidation Examples -------- For detailed examples see tests/bootstrap.php ```php <?php /** * @author AlexanderC <self@alexanderc.me> * @date 10/28/13 * @time 8:24 PM */ require __DIR__ . '/../autoload.php'; $AOPHP = \AOPHP\AOPHP::crete(); // see DocBlockTest to understand lib usage $object = new DocBlockTest(); // add target object (methods called on this) //$AOPHP->addTarget($AOPHP->createTarget($object)); // add aspect object (advices would be applied before and after calling a target) //$AOPHP->addAspect($AOPHP->createAspect(clone $object)); // call target method //$AOPHP->advice($object, 'doThings', ['"Lorem Ipsum dolor sit amet"']); // call another target method //$AOPHP->advice($object, 'doAnotherThings', ['"Lorem Ipsum dolor sit amet"']); $object->doThings("Lorem Ipsum dolor sit amet"); ``` License ------- GNU GPLv2. Copyright (c) 2013 AlexanderC <self@alexanderc.me> |
![]() |
/ | .idea |
File | Role | Description | ||
---|---|---|---|---|
![]() |
||||
![]() ![]() |
Data | Auxiliary data | ||
![]() ![]() |
Data | Auxiliary data | ||
![]() ![]() |
Data | Auxiliary data | ||
![]() ![]() |
Data | Auxiliary data | ||
![]() ![]() |
Data | Auxiliary data | ||
![]() ![]() |
Data | Auxiliary data | ||
![]() ![]() |
Data | Auxiliary data | ||
![]() ![]() |
Data | Auxiliary data |
![]() |
/ | src | / | AOPHP |
File | Role | Description | ||
---|---|---|---|---|
![]() |
||||
![]() |
||||
![]() |
||||
![]() |
||||
![]() |
Class | Class source | ||
![]() |
Class | Class source | ||
![]() |
Class | Class source | ||
![]() |
Class | Class source |
![]() |
/ | src | / | AOPHP | / | Cache |
File | Role | Description |
---|---|---|
![]() |
Class | Class source |
![]() |
Class | Class source |
![]() |
Class | Class source |
![]() |
Class | Class source |
![]() |
/ | src | / | AOPHP | / | DocBlock |
File | Role | Description |
---|---|---|
![]() |
Class | Class source |
![]() |
Class | Class source |
![]() |
Class | Class source |
![]() |
/ | tests |
File | Role | Description |
---|---|---|
![]() ![]() |
Example | Example script |
![]() |
Class | Example script |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
100% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.