seyha Posted August 12, 2011 Share Posted August 12, 2011 Dear All, I have a problem relate to getContent function. I would like to instantiate one Object from other class in order to access the method in that class. the problem is : I can not create Ojbect in getContent functions. These are my codes : This is work as normally public function getContent($tab = 'AdminModules') { global $currentIndex, $cookie; $token = Tools::getAdminToken($tab.intval(Tab::getIdFromClassName($tab)).intval($cookie->id_employee)); $this->_postProcess($token); //internal method if(isset($_GET['view']) && $_GET['view']=='device'){ $this->createDevice($token); // internal method }else{ $this->employeeList($token); // internal method } return $this->_html; } But this is not works public function getContent($tab = 'AdminModules') { global $currentIndex, $cookie; $token = Tools::getAdminToken($tab.intval(Tab::getIdFromClassName($tab)).intval($cookie->id_employee)); $obj = new functions(); (This is not works) $obj->postProcess($token);//external method if(isset($_GET['view']) && $_GET['view']=='device'){ $this->createDevice($token); // display create device screen }else{ $this->employeeList($token); // display customers list } return $this->_html; } If anyone know how to fix this problem please tell me. I am appreciate with your helps. Best Regards, I am looking forward to hearing from you. Link to comment Share on other sites More sharing options...
affect Posted August 12, 2011 Share Posted August 12, 2011 You're not including the corresponding file that contains the functions class, most likely. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now