Bug #8075 Updated: Make Function/Method return value a "direct" object
| From: | jimw@php.net | Date: | Sun, 28 Apr 2002 23:05:57 +0000 |
| Subject: | Bug #8075 Updated: Make Function/Method return value a "direct" object | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-6370@lists.php.net to get a copy of this message | ||
ID: 8075
Updated by: jimw@php.net
Reported By: za_ka_ria@yahoo.com
-Status: Open
+Status: Closed
Bug Type: Feature/Change Request
Operating System: Redhat Linux 6.2
PHP Version: 4.0.2
New Comment:
this is possible in ZE2.
Previous Comments:
------------------------------------------------------------------------
[2000-12-01 23:31:40] za_ka_ria@yahoo.com
What I mean is like this:
function &getDB() {
global $DB;
if (!isset $DB) $DB = new SomeDatabaseConnectionClass()
return $DB
}
and in some function/method I just could use it like this
getDB()->query_limit($sql_text);
It sure will make my code a lot smaller.
TIA,
Zakaria
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=8075&edit=1