Coding Standards: abstract methods
| From: | Ulf Wendel | Date: | Sat, 02 Dec 2000 21:08:52 +0000 |
| Subject: | Coding Standards: abstract methods | ||
| Groups: | php.pear | ||
| Request: | Send a blank email to php-pear+get-470@lists.php.net to get a copy of this message | ||
Hi!
What's the preferred way to write abstract methods? I like this way if
there's no common error handling in the application/project:
class geomfigure {
// Abstract method outside PEAR
function paint() {
;
}
}
In case of PEAR where we have an error handling I would preferr:
class geomfigure {
/**
* Abstract method in PEAR
*
* @abstract
*/
function paint() {
return new PEAR_Error("Call to an abstract method.");
}
}
Ulf