Calling a function from Class in another function

passports

New Member
I'd like to understand better how calls to functions work in OOP. I have the following sample:\[code\]class SomeClass { function __construct(){ //run function do() //run function include() //run function run() } public function do($foo){ //do some stuff } public function include(){ require_once( CONSTANT . 'required.php' ); } public function run(){ required_func(); }}$load_class = new SomeClass();\[/code\]in required.php:\[code\]function required_func(){ $customerInfo = "info"; $customer = $this -> do($customerInfo); //--> This isn't right return $customer;}\[/code\]What I'm trying to do is to have required_func() run the do() with the $customerInfo. So essentially: How to call a Class public function from another function included in the require_once file? Am I even remotely on track here?Thanks for your help
 
Back
Top