Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.5.0a1

Request #12100 Referring to inherited methods
Submitted: 2007-09-23 15:48 UTC
From: seann Assigned: ashnazg
Status: Wont fix Package: PhpDocumentor (version 1.4.0)
PHP Version: 4.4.6 OS: Windows XP
Roadmaps: (Not assigned)    
Subscription  


 [2007-09-23 15:48 UTC] seann (Sean Natoewal)
Description: ------------ Hello, Got a small problem. Let's say I have three classes: "Car", "Jaguar" and "Dealer". "Car" is the superclass of "Jaguar" and the "Dealer" uses the method "setPrice()" of the "Jaguar" class; this method is inherited from its superclass "Car". So, currently I'm referring to this method, when documenting the "Dealer" class, as "@uses Jaguar::setPrice()". The problem is that PhpDocumentor will NOT create a link to this method, which should point to the "setPrice()" method in the "Car" class. Please note that the "setPrice()" method IS documented for the "Jaguar" class by PhpDocumentor as an inherited method from the "Car" class. Anybody has some ideas on how to solve this? Referring directly to the method "setPrice()" in the "Car" class ("@uses Car::setPrice()") would be a little bit strange, since the Dealer is only aware of the existence of the "Jaguar" class. Thanks in advance.

Comments

 [2009-10-12 19:16 UTC] ashnazg (Chuck Burgess)
-Status: Open +Status: Verified -Type: Bug +Type: Feature/Change Request
Verified this behavior via the following test case: <?php /** * @package bug-12100 */ /** * @package bug-12100 */ class Car { public function setPrice() {} } /** * @package bug-12100 */ class Jaguar extends Car {} /** * @package bug-12100 */ class Dealer { /** * @uses Jaguar::setPrice() * @uses Car::setPrice() */ public function makeDeal() {} } ?> Granted, I'm a bit surprised at the decision to have Dealer use Jaguar::setPrice() directly, as it defeats one of the key benefits of having Jaguar (and Mercedes, and Ferrari) extend from Car -- allowing Dealer to use Car's public API and never need to know whether he's specifically using a Jaguar (or a Mercedes, or a Ferrari). Still, I suppose if one wants to use "@uses ChildClass::inheritedMethod()" explicitly, PhpDocumentor should be able make a link. However, changing this to a Request, as I do not believe doing so was originally intended in the code.
 [2012-09-01 02:26 UTC] ashnazg (Chuck Burgess)
-Status: Verified +Status: Wont fix -Assigned To: +Assigned To: ashnazg -Roadmap Versions: 1.5.0a1 +Roadmap Versions:
No more feature work on phpDocumentor 1.x. Check out the new phpDocumentor 2.x (http://www.phpdoc.org/).