#12819 [Opn->Bgs]: variables and constants in classnames

From: Date: Sat, 31 May 2003 15:46:07 +0000
Subject: #12819 [Opn->Bgs]: variables and constants in classnames
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-40786@lists.php.net to get a copy of this message
ID: 12819 Updated by: andrey@php.net Reported By: giancarlo at navigare dot net -Status: Open +Status: Bogus Bug Type: Feature/Change Request Operating System: any PHP Version: 4.0.6 New Comment: Good architecting of the application and you will never run into such problems. Look into PEAR to see how they solved this or just prepend you class names with something specific to you (or your company). Previous Comments: ------------------------------------------------------------------------ [2001-08-17 16:45:34] giancarlo at navigare dot net it would be nice to have the possibility to create classes with variable or constants in 'classname' and 'extends'. eg: define $myauth="myAuth"; define ("_BASE_AUTH_CLASS", "Base_Auth"); class {$myauth} extends {_BASE_AUTH_CLASS} {... etc This way package delivery and integration would be a lot easier, as they can presume the existance of already defined classes, and adopt them. Giancarlo ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=12819&edit=1

« previous php.bugs (#40786) next »