PHP methods as functions // change scope -


i have class such as

class myclass {      function mymethod(){          include(something);      }      function callme(){      }  } 

i want call callme()from include rather than$this->callme();

i hope makes sense?

something this?

class myclass {      public function mymethod(){          include(something);      }      public function callme(){      }  } 

some other php file:

include 'myclass.php'; $myclass = new myclass(); $myclass->callme(); 

Comments

Popular posts from this blog

c# - Unity IoC Lifetime per HttpRequest for UserStore -

Change the color of an oval at click in Java AWT -

I am trying to solve the error message 'incompatible ranks 0 and 1 in assignment' in a fortran 95 program. -