Login   Register  
PHP Classes
elePHPant
Icontem

File: TODO.txt

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Guilherme Blanco  >  Transparent PHP AOP  >  TODO.txt  >  Download  
File: TODO.txt
Role: Auxiliary data
Content type: text/plain
Description: TODO List
Class: Transparent PHP AOP
PHP AOP implementation based on cache compilation
Author: By
Last change: - Fixed bug #00005: "Undefined property: Aspect::$xmlFile in class.Aspect.php"
- Fixed bug #00006: Undefined offset: 0 in class.AOP_CodeCompiler.php line 191"
- Added support to reference returned functions (ie: function & something(...))
. Re-structured compileCustomClassOrMethodToken in AOP_CodeCompiler
. Re-structured compileAutoClassOrMethodToken in AOP_CodeCompiler
- Added "around" Auto Pointcut support in XAD. Two possible behaviors:
. If the proceed(); call is found, the previous code is appended at "before"
AutoPointcut and the code after the proceed(); call is appended at "after" Auto
. If there's no proceed(); call, the whole source is retrieved and attached at
"before" and also attached at "after" AutoPointcuts
- Corrected inverted AOP::COMPACT, that if set as true, should compact (does the
opposite in RC2)
- New way to load external advice code. Now it depends of "asrequire" advice
attribute. The default value is false (old behavior). Possibilities:
. If "true", instead of the whole source being loaded, only a require call is
appended to the compiled file. This optimizes the necessary time in around 90%
. If "false" or not defined, the file source is retrieved and appended to the
compiled file
- Fixed bug #00007: AutoPointcut "after" advice code that is appended even is
the previous comment is a return statement (problem of unreachable code)
- Added new pointcut modifiers:
. nclass: Not In Class
. nfunction: Not In Function
Both can have more than one item, just separate them via comma.
Added check if one item is defined in nclass and also in class XAD attribute.
Also added check to function and nfunction
- Recompile automatically if external advice code is changed. Part of it is
already implemented if asrequire has value "true". Otherwise, it is not checked
(consumes too much resources and time to do this)
- Updated package DTD
- Changed the compiled file name generator. Now it creates a more readable name
Date: 7 years ago
Size: 4,771 bytes
 

Contents

Class file image Download
################################################################################
# TODO List                                                                    #
################################################################################

[ ] Fix "around" issue - High Priority

[ ] Correct crunchCode to allow not breaking line when defined echo "..."; with
    line change inside string
    
[ ] Fix the issue if the source contains a comment with else written
    (RegExp re-write necessary)

[ ] Implement XAD pointcut attribute called "order", which chooses the right 
    order to have the advice applied. (Internal re-structure in Aspect class)

[ ] Plan and implement the arguments idea for Custom Pointcuts:
    /// Pointcut: myCustom("varname")
    
    And in XAD:
    <pointcut name="myCustom" arguments="arg1">
    <![CDATA[
        echo $arg1 . "<br />";
    ]]>
    </pointcut>

    It is the same as:
    
    <pointcut name="myCustom">
    <![CDATA[
        echo $varname . "<br />";
    ]]>
    </pointcut>



################################################################################
# Implemented TODO                                                             #
################################################################################

[x] Improve XMLReader more 
    (Version 1.0 BETA 2)

[x] Create a DTD for XML Aspect Definition 
    (Version 1.0 BETA 3)

[x] Option to change caches' directory 
    (Version 1.0 BETA 5)

[x] Recompile automatically if another XAD is attached (or removed), even if
    option to recompile is false. This can be done via compiled file name
    changes to the string of all aspects associated plus original class file.
    (Version 1.0 BETA 5)

[x] Recompile automatically if XAD is modified (even if recompile is false)
    This can be done via last modified date of compiled class and XAD
    (Version 1.0 BETA 5)

[x] If there are not any aspects associated to class file, load it without need
    to compile (prevent some overhead). Something like:
    if(count($aspects)==0) require(class.php) else require(compiled_class.php)
    (Version 1.0 BETA 5)

[x] Create a better class verification parser to disable possibility to add
    pointcuts out of class (not working 100%) 
	(Version 1.0 RC1)
    
[x] Possibility to make compiler more intelligent and define pointcuts "before"
    and "after" each method, without need to manually create the desirable 
	pointcuts. This can be done via get_class_methods function 
	(Version 1.0 RC1)
	
[x] Make sure if AOP::CACHE recieves a real directory. 
    (Version 1.0 RC2)

[x] Split Pointcut class into 3: Pointcut, AutoPointcut and CustomPointcut.
    (Version 1.0 RC2)

[x] Allow to define pointcuts not only in classes, but also in functions.
    (Version 1.0 RC2)

[x] Implement Advice PHP Class, to encapsulate code retrieval 
    (Version 1.0 RC2)

[x] Implement advice XAD tag, to allow importing advice code from another file.
    Example: <advice src="../myAdviceCode.php" />
    (Version 1.0 RC2)
    
[x] Implement possibility to define one Advice for multiple Pointcuts, via usage
    of comma character.
    (Version 1.0 RC2)
    
[x] Change require_aop to support second argument as a string, as an array or as
    an AspectList.
    (Version 1.0 RC2)
    
[x] Add the option to require_aop automatically load XAD files from a directory.
    (Version 1.0 RC2)
    
[x] Turn classes names more strictly to AOP theory.
    For example: AspectList => Weave
    (Version 1.0 RC2)
    
[x] Compiled file name should be more readability.
    Example: class.Test.php into class.Text.eb4a5e7be51cfd2e7544f827a3807bd6.php
    (Version 1.0 RC3)

[x] Optimize the external advice code loader.
	Solution: Added asrequire XAD attribute.
	(Version 1.0 RC3)

[x] Implement the XAD pointcut attributes:
    - nclass = not in class
    - nfunction = not in function
    (Version 1.0 RC3)

[x] Implement "around" AutoPointcut.
    (Version 1.0 RC3)

[x] Implement the proceed behavior for around pointcut. Example:
    function setMessage($message) {
        $this->message = $message;
    }

    <pointcut ato="around" function="setMessage">
    <![CDATA[
        try {
            proceed(); <= HERE! Will be changed to content of method!
        } catch ( Exception $e ) {
            echo "[ERROR]: " . $e->getMessage();
        }
    ]]>
    </pointcut>
    (Version 1.0 RC3)
    
[x] Recompile automatically if external advice code is changed.
    (Version 1.0 RC3)
    Part of it is already implemented if asrequire has value "true". Otherwise,
    it is not checked (consumes too much resources and time)