Ver Mensaje Individual
  #4 (permalink)  
Antiguo 27/07/2013, 12:46
Avatar de dashtrash
dashtrash
Colaborador
 
Fecha de Ingreso: abril-2007
Ubicación: Ni en Sevilla,ni en Sanlúcar..qué más da..
Mensajes: 927
Antigüedad: 17 años, 1 mes
Puntos: 270
Respuesta: Llamar metodo con variable

Código PHP:
Ver original
  1. class object
  2. {
  3.     function mi_metodo($string)
  4.     {
  5.         print "funciona ". $string;
  6.     }
  7.     function __call($name,$arguments)
  8.     {
  9.           if(method_exists($this,$name))
  10.               call_user_func_array(array($this,$name),$arguments);
  11.      }
  12. }
  13. $obj = new object();
  14. $obj->mi_metodo("correctamente");