Reverse Engineer PHP + ZEND

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

Post Reply
hyp
Forum Newbie
Posts: 1
Joined: Fri Nov 19, 2010 6:23 am

Reverse Engineer PHP + ZEND

Post by hyp »

Hi,

I have a question concerning reverse engenieering php code to UML.
I have programmed some code with with the Zend Framework and would like so visualize that code to UML for documentation, etc.

I have already tried several tools like Bouml, Enterprise Architect and Visual Paradigm.
The problem is, that all that tools can't work with ZEND or PHP Namespaces. So if i have for example an extend to Zend_Controller_Action the tool can't find the real path /zend/controller/action.

Does anybody know a tool that supports reverse engineering ZEND Code to UML. Or does anybody know an alternative?
Doing this manually is not an option because there are about 2000 classes and I would have to update that diagramm manually with every code update.

Thanks for your help.
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Re: Reverse Engineer PHP + ZEND

Post by alex.barylski »

phpDocumentor I believe generates class inheritence. The problem is most of those tools work by performing static analysis, and PHP is relatively dynamic so some of that information is now determined on the fly.

For instance, determining a method dependencies using sttaic analysis is impossible for most PHP applications, because many PHP apps use custom factories, dependency injection or some other technique that make static detection no longer possible. Class inheritence is one exception as it's static by nature but even that won't tell you the whole story and in a truly dynamic application won't tell you much at all hopefully.

Cheers,
Alex
Post Reply