extension: phpdoc support and extensions - Feedback requested

[email protected] ("BGHosting.de - power for games")
Newsgroups php.pecl.dev
Message-ID <[email protected]>
Hi.


I am Martin Eisengardt, and I would like to share an extension. It will be 
simply called "aop" in future. Currently it has another name because the 
code was originally planned as part of our private commercial extension.

The extension "aop" will provide two features. First of all there will be 
support to read and parse the phpdoc from classes/functions and allow php 
extensions to register those with additional phpdoc. However the php builtin 
reflection already allows us to get the phpdoc for several entities. But the 
phpdoc will only be returned as a string. The extension "aop" will parse the 
phpdoc on demand and provide additional methods: hasTag/ getTag/ 
getRegularDoc.

Why do we need this? The main feature of the extension is native support for 
aspect oriented programming. For details on aspect orientied programming see 
the description of the flow3 developer group: 
http://flow3.typo3.org/documentation/manuals/flow3/flow3.aopframework/
Flow3 introduces aspect oriented programming at php level withou any need of 
additional extensions. But there are some limitations on the flow3 solution:
* During development time it is very slow (mainly because of deactivated 
caching)
* You are not able to create aspects for preloaded/builtin classes.
* You are not able to create aspects for functions.
The reason why reflection extensions are needed is the way flow3 provides 
aop. Flow3 uses special phpdoc tags like "@aspect". In order to enable aop 
on extension level we need the reflection feature.
However that is different from the java solution (AspectJ) which makes 
extensions to the java language itself.

The current task is to do some refactoring on the reflection feature. And it 
still needs to be renamed to the new name "aop". Target versions will be 
 >=5.3. The used namespaces will be "\aop" and "\aop\reflection"
The aop feature currently causes some seg faults so I did not add it to the 
svn yet.
And yes, it will need many testcases :-)

svn access:
http://srv.bghosting.de/svn/bgh/branches/bgh-typo3/extensions/src/
Username: pecl
password: anonymous


For now I would like to get your feedback. Should this extension become part 
of pecl once it reaches beta?


Ciao
Martin
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.