Sibling Classes not getting along
ok here is my prediciment. i have just been recently working with php classes and oop.
i have a system class that i have contain all the other classes (they extend system)
how can i get the security and database classes to be able to access each other's functions without including each class file in each function that i want to use that class in
ex. i want to use
if someone could shed some light on this i would really really appriciate it.
you should have a property in your security class that would be an instance of database class:
Freenity is right. Well, not right, but it's also my most favourite way of implementation. Obviously there are occasions where inheritance is the sensible approach.
In Freenity's example, there is no limitation to how many object levels you could have. Such as like:
Oh the joys of OOP!
|All times are GMT. The time now is 02:54 AM.|
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0