I was wondering if there is a way to force phpDocumentor to print out the potential methods you could use for getting and setting when you do them dynamically with a __call()
.
In the case of my simple getter, I would want it to cycle through all private variables and just append get
to them (and uppercase the first letter, of course).
To create an instance of a class, the new keyword must be used. An object will always be created unless the object has a constructor defined that throws an exception on error. Classes should be defined before instantiation (and in some cases this is a requirement).
PhpDoc, short for PhpDocumentor, is a powerful tool that allows you to easily document your code via specially formatted comments. The documentation will be available not only in the source code, but also in professional documentation extracted using either the web or command-line interface.
A PHP class, and more generally, object-oriented programming, provides additional approaches to reusability, and can be used for a variety of purposes: They can describe entities that have known properties and behaviors. They can be used as messages to functions and other objects.
See the phpDocumentor reference on @method
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With