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

PHPMotion implementation - URL based videos (Hosted on separate location) -

javascript - Using Windows Media Player as video fallback for video tag -

c# - Unity IoC Lifetime per HttpRequest for UserStore -