I have a class that produces singleton classes (note that for the purpose of this question Now to say that I want to cross an array of parameters which can vary in size, what is the best way to do this, which is the creator of the class formed? I imagine something with the classes of This is simplified and this means that the And for the original document: class singleton {public function load ($ Classname, $ params) {$ filepath = 'Classes /'. $ Classname '. Php '; Need_once ($ filepath); Return $ classname (); }}
call_user_func_array , but for classes?
Function Load ($ Square, $ Args) {$ reflection = new ReflectionClass ($ class); $ Object = $ reflection-> New instance ARGS ($ AGR); Return objects; }
__autoload function is used, nor does it check the namespace if you use them It will also create a new example, every time you call it, you will need to apply an array of objects, which you have already created, etc. ...
$ square is a string with the name of that class that you have , And there is an array of
$ args arguments, which you can call
__structure () method.
Comments
Post a Comment