• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Accessing methods from more than one class

Hi all,

Hope you can help guide me here:

I am building as app and have different controllers per object. One Controller I have is, let's say, Car, and then I have separate controllers for enginewheelschassisGPS. I know that for my car to access the wheels methods i can use:

PHP Code:
class Car extends Wheels 

But then how can my Car class also access the methods in the Engine, Chassis and GPS classes.
As I understand it, I can't extend to multiple classes. So do I just need to replicate the relevant Wheels methods in Car. It seems inefficient.

Messages In This Thread
Accessing methods from more than one class - by fraggley - 05-14-2020, 12:05 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.