3

Some years ago I found somewhere simple script that was able to generate skeletons for classes, functions and constants from some extension. U think it used Reflection. I don't remember, but I think this script was on zend.com web site or somewhere in PDT sources.

Generator should be able to generate skeletons from any classes defined in PHP (both from code written in PHP and from C/C++ code from PHP extensions). PHP Reflection is able to handle these cases.

Generated code looks like:

class foo {
    public function bar($arg1, $arg2) {}
}

Body of all methods is empty, but it is useful for code completion in IDEs.

Can you help me to find tool with such functionality?

casperOne
  • 73,706
  • 19
  • 184
  • 253
Max Romanovsky
  • 2,824
  • 5
  • 30
  • 37
  • Please add more context. Generate from what extension? How does the generator know which method signatures, constants and class names it needs to generate? – Gordon Mar 17 '12 at 09:46
  • Would https://github.com/gooh/InterfaceDistiller help? It distills interfaces (not classes) from internal classes and userland code via Reflection. – Gordon Mar 17 '12 at 10:09
  • Yes, it helps partially. Thank you – Max Romanovsky Mar 21 '12 at 05:01

0 Answers0