Req #12771 [Opn->Wfx]: new_object_array()
| From: | jani@php.net | Date: | Fri, 17 Dec 2010 11:46:51 +0000 |
| Subject: | Req #12771 [Opn->Wfx]: new_object_array() | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-157041@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=12771&edit=1
ID: 12771
Updated by: jani@php.net
Reported by: ron at dmscontrol dot com
Summary: new_object_array()
-Status: Open
+Status: Wont fix
Type: Feature/Change Request
-Package: Feature/Change Request
+Package: *General Issues
Operating System: Linux
PHP Version: 4.0.6
Block user comment: N
Private report: N
New Comment:
Can be done in userland code, no need for anything special here.
Previous Comments:
------------------------------------------------------------------------
[2001-08-15 14:13:19] ron at dmscontrol dot com
I was hoping that the dynamic creation of objects could be extended to
support it's parameters in an array format like the functions
call_user_method_array and call_user_func_array(). This would be great
for test suites.
eg
function test_suite_object_test($class, $args) {
if (!class_exists($class)) error();
else {
$obj = new_object_array($class, $args);
...
futher tests on the object
...
}
}
This would useful, not having to hard code the constructors parameter
list, with obvious limitations, with something like:
function test_suite_object_test($class, $arg1, $arg2, $arg3, $arg4) {
if (!class_exists($class)) error();
else {
$obj = new $class($arg1, $arg2, $arg3, $arg4);
...
futher tests on the object
...
}
}
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=12771&edit=1