[PEAR] Using PHPDocumentor to document the magic functions.
|[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]|
Hi. To implement public readonly properties you can use getX(), getY(), getZ() methods (which then access the private vars) or you can use __get($var) to consolidate/simplify the number of methods. With the discrete getters() it is easy to docblock them. Everything is obvious, but there is a LOT of duplicate code and documentation. But how do you docblock __get()? With the magic functions __get(), __set(), __call(), __callStatic(), they act as proxies. It is NOT the proxy itself that is normally wanted to be documented (maybe in a cursory manner), but what is being proxied. If you are creating a WSDL file for SOAP and have __get() and __call(), then you would want to document each entry but without the code duplication. What is the best approach? Regards, Richard Quadling. -- ----- Richard Quadling "Standing on the shoulders of some very clever giants!" EE : http://www.experts-exchange.com/M_248814.html Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731 ZOPA : http://uk.zopa.com/member/RQuadling -- PEAR General Mailing List (http://pear.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[Search] [PHP Home] [Free Matchmaking Site] [Apache Users] [PHP on Windows] [Programming PHP] [Kernel Newbies] [PHP Install] [PHP Classes] [Postgresql] [Postgresql PHP] [PHP Books] [PHP for Windows] [Find Someone] [PHP Databases] [PHP SOAP] [PHP Books]