From: Richard L. <ce...@l-...> - 2009-03-10 15:50:02
|
var_dump($_args) right before you make the call. Dollars to doughnuts, it's not what you think it is... On Tue, March 10, 2009 12:49 am, Walter Torres wrote: > I'm trying to make call to a random class and pass an array for its > arguements > > Similar to... > > http://www.php.net/manual/en/function.call-user-func-array.php#74427 > > $classObj = new ReflectionClass($_class); > return $classObj->newInstanceArgs($_args); > > $_class is a valid class name > $_arg is an array of parameters to send it > > The call sort of works; I get to the right class/method, but the > arguments are converted to a string, and I only get the first element > on my array. > > Not the behavior I'm reading/expecting. > > what am I doing wrong? > > I even tried this... > > return call_user_func_array( > array(new ReflectionClass($_class), 'newInstance'), > $_args > ); > > same result: no array, just the first element of the array gets into > the > > Thx > > Walter > -- > ...that's the thing about people who think they hate computers. > What they really hate is lousy programmers. > - Larry Niven and Jerry Pournelle in "Oath of Fealty" > > > ------------------------------------------------------------------------------ > _______________________________________________ > chiPHPug-discuss mailing list > chi...@li... > https://lists.sourceforge.net/lists/listinfo/chiphpug-discuss > -- Some people ask for gifts here. I just want you to buy an Indie CD for yourself: http://cdbaby.com/search/from/lynch |