How to stop warnings in phpDocumentor parser when I inherit an external library class?

I added docblocks to my code and resolved most of the build errors and warnings that the phpDocumentor script generated and placed in the errors.html file.

However, I have the last “class” of warnings in my current documentation build - I get a warning for each class that I registered in my application, which inherits from an external library (in this case, Zend).

Is there a way to stop warnings like Warning - Class AMH_Controller_Action parent Zend_Controller_Action not found? How do I tell phpDoc that the parent is from an external library and possibly gives a link to the Zend documentation link?

+3
source share
1 answer

phpDocumentor itself does not have its own option to handle this use case. What I did in the past was to create a dummy file that contains empty class declarations for all the “not found” classes marked with these classes, such as “@package DoNotDocument”, and used the argument runtime --packageoutput [1] without Enumerating "DoNotDocument" to the list of packages to include in the output. Of course, this is a hack, but the effect is as follows:

a) avoid "not found" warnings (since the class now "exists"),

while b) does not create any documents for dummy classes.

/**
 * @package DoNotDocument
 */
class Zend_Controller_Action {}

phpdoc -d ./src -t ./docs -po MyPackage1,MyPackage2

, ZF. phpDocumentor ZF, API , .. ZF. , phpDocumentor ZF, ZF, , @package (, "Zend_Controller" ) runtimeoutputout. >

[1] - http://manual.phpdoc.org/HTMLSmartyConverter/HandS/phpDocumentor/tutorial_phpDocumentor.howto.pkg.html#using.command-line.packageoutput

+2

All Articles