call_user_function_array() and __construct

Posted by John on Stack Overflow See other posts from Stack Overflow or by John
Published on 2010-05-31T22:27:23Z Indexed on 2010/05/31 22:33 UTC
Read the original article Hit count: 162

Filed under:
|
|

I'm working on a simple framework, and I'm having a slight problem. I'd like to use call_user_function_array() to pass parameters to a function. That's fine, except the function I want to pass it to is __construct. I can't create an instance of an object with cufa(), and by instantiating an object, and then using cufa to call that instance's __construct(), I run into problems with a broken class because I'm calling the constructor twice (and one time it's called wrong.)

© Stack Overflow or respective owner

Related posts about php

Related posts about frameworks