PHP-based class generatorGiven a simple text-based description of a class, code generator will produce the following :
PHP class fileUser comments on class, property, and method level, suitable for use with PHPDocumentor Generated properties and methods with appropriate access access and class/instance type PHPUnit2 test case fileProvides stubs for testing all public methods of class Includes debug support Runs test cases as-is PHP class runner fileUse this to instantiate and experiment with classes Simple example file showing how to instantiate class and run all public methods
Sample input file
Uses mixture of Ruby-style notation for class members and UML accessor notation :
Simple case :
class MyClass
@+myPublicInstanceProperty
@@-myPrivateClassProperty
#=myProtectedInstanceMethod
##+myPublicClassMethodMore complete case :
class FirstTestClass
First comment line for class myTestClass
Second comment line for class myTestClass
@defaultProtectedInstanceProperty
First line of comments for defaultProtectedInstanceProperty
Second line of comments for defaultProtectedInstanceProperty
@-privateInstanceProperty
One line of comments
@=protectedInstanceProperty
@+publicInstanceProperty
First line of comments for publicInstanceProperty
Second line of comments for publicInstanceProperty
@@defaultProtectedClassProperty
First line of comments for defaultProtectedClassProperty
Second line of comments for defaultProtectedClassProperty
@@-privateClassProperty
One line of comments
@@=protectedClassProperty
@@+publicClassProperty
First line of comments for publicClassProperty
Second line of comments for publicClassProperty
#defaultProtectedInstanceMethod
First line of comments for defaultProtectedInstanceMethod
Second line of comments for defaultProtectedInstanceMethod
#-privateInstanceMethod
One line of comments
#=protectedInstanceMethod
#+publicInstanceMethod
First line of comments for publicInstanceMethod
Second line of comments for publicInstanceMethod
#defaultProtectedClassMethod
First line of comments for defaultProtectedClassMethod
Second line of comments for defaultProtectedClassMethod
#-privateClassMethod
One line of comments
#=protectedClassMethod
#+publicClassMethod
First line of comments for publicClassMethod
Second line of comments for publicClassMethod