Location: PHPKode > scripts > Transparent PHP AOP > transparent-php-aop/TODO.txt
################################################################################
# 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)
Return current item: Transparent PHP AOP