[php-objects] object instantiation and call_user_func_array

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi there,

Is there any way to use call_user_func_array to instantiate an object??

Basically I have the follwing:

class User {

	function User($name, $number) {

	}

}

In another .php file I try the following

include once ("User.inc")

create_user_func_array("User",array("bob","1234");

I have also tried

create_user_func_array("User::User",array("bob","1234");

I always get the following error

call_user_func_array() expects first argument, 'User', to be a valid
callback in

What does this mean?  Is there any way to create objects on the fly and
dynamically pass through
parameters to the constructor??

Thanks

---
Rob

**************************
Rob Cherry
mailto:rob@jamwarehouse.com
+27 21 447 7440
Jam Warehouse RSA
Smart Business Innovation
http://www.jamwarehouse.com
**************************



------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get 128 Bit SSL Encryption!
http://us.click.yahoo.com/LIgTpC/vN2EAA/xGHJAA/saFolB/TM
---------------------------------------------------------------------~->

Look here for Free PHP Classes of objects:
http://phpclasses.UpperDesign.com/
To unsubscribe from this group, send an email to:
php-objects-unsubscribe@egroups.com

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 



[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux