__call method needs to know when to pass var by reference or by value

ansaf

New Member
I have an object that uses the magic __call method to call methods on different objects.There are times when this method will be used to call a method that requires one or more of its parameters to be a reference.As of php 5.3 call-time pass-by-reference has been deprecated so I cant rely on passing the arguments by reference. I need to predict if the arguments need to be passed by reference or value!I will try to explain this in code. I have the following two classes:
  • Main_Object
  • Extension_Object
note: there is no inheritance structure between the two classes.\[code\]class Main_Object { public function __call($method, $arguments) { // check this method is in an extended class //
 
Top