PHP Classes

File: class.AOP_CodeCruncher.php

Recommend this page to a friend!
  Classes of Guilherme Blanco   Transparent PHP AOP   class.AOP_CodeCruncher.php  
File: class.AOP_CodeCruncher.php
Role: Class source
Content type: text/plain
Description: Auxiliar class do crunch PHP code
Class: Transparent PHP AOP
PHP AOP implementation based on cache compilation
Author: By
Last change: +------------------------------------------------------------------------------+
| 2006-08-22 20:21 - Version 1.0 Release Candidate 2 |
+------------------------------------------------------------------------------+
- Corrected Manual.html that refers to AOP::CACHEDIR, which does not exist.
The right accessor is AOP::CACHE
- Implemented various TODO List Itens:
. Make sure if AOP::CACHE recieves a real directory
. Split Pointcut class into 3: Pointcut, AutoPointcut and CustomPointcut
. Allow to define pointcuts not only in classes, but also in functions
. Implement Advice PHP Class, to encapsulate code retrieval
. Implement advice XAD tag, to allow importing advice code from another file
. Possibility to define one Advice for multiple Pointcuts, via usage of comma
. Turn classes names more strictly to AOP theory
. Add the option to require_aop automatically load XAD files from a directory
. Change require_aop to support second argument as a string, as an array or as
a Weave
- Classes added: AutoPointcut, CustomPointcut.
- Compiler improvements to allow AutoPointcuts in functions, not only in classes
- Removed XAD "for" attribute of pointcut tag (as scheduled).
- Improved the AOP_XMLReader (by rewritting it) to allow CDATA section as child
of Pointcut node, not as value like the old one (PHP versions 4.4.0 and 4.4.1
does not work well with this implementation).
- Created class: Advice, that holds Pointcut code.
- Corrected constants missing in AOP_CodeCruncher:
. T_ML_COMMENT does not exist in PHP 5
. T_DOC_COMMENT does not exist in PHP 4
- Created XAD tag "advice". Now it is possible to load external files as Advice.
- Changed XAD pointcut tag to allow multiple CDATA sections and advice tags.
- Defined Working Directory Changer internally of Aspect::init method, to allow
advice XAD src attribute to be loaded correctly.
- Updated package DTD.
- Implementations of getAdviceFromCustomPointcut and getAdviceFromAutoPointcut
now returns always an Advice object, not a string.
- Fixed line break while using open PHP tag inside XAD.
- Added support to multiple Pointcut (one Advice into multiple Pointcuts).
- Removed class: class.PointcutList.php. Needed source is now part of Aspect.
- Functions created: Aspect::addPointcut, Aspect::getPointcut and replaced
Aspect::getPointcutList to Aspect::getPointcuts.
- Added getLastModified inside Aspect class (used by Smart Caching).
- Implemented a modified version of Registry Pattern in Aspect class. Aspects'
instances that refer to the same file now uses the same object, not copies.
Function created to use this: Aspect::from($xmlFile, $lazyInit = true);
- Renamed class: AspectList => Weave
- Removed functions of Weave: remove, next, rewind, first, last.
- Replaced functions of Weave: add (addAspect), item (getAspect).
- Added functions of Weave: getAspects, getInitialized, getLastModified, init
and hasAspects.
- Function require_aop now supports loading directory's XAD files
- Weave constructor supports a variety of formats:
. new Weave("xad.xml" [, ...]);
. new Weave(array("xad.xml" [, ...]));
. new Weave("./xads/" [, ...]); // Directories
. new Weave(array(Aspect::from("xad.xml") [, ...]));
. new Weave(Aspect::from("xad.xml") [, ...]);
- Second argument of require_aop now suports a variety of formats:
. require_aop("class.Test.php", "xad.xml");
. require_aop("class.Test.php", array("xad.xml" [, ...]));
. require_aop("class.Test.php", Aspect::from("xad.xml"));
. require_aop("class.Test.php", new Weave(...));
- Class names are now more compatible with AOP theory
Date: 17 years ago
Size: 2,089 bytes

You need to be a registered user and login to get this file.

Login Immediately with your account on: