So, I'm mulling around in my head an idea for an object oriented framework and I wanted to solicit some feedback on what the best practice might be in implementing it.
I want to create a single class that I'll reference as the "master" class.
$CORE = new Core();
But, I also want to reference several other classes that are designed to perform specific functions like user information lookup, custom form validation and data handling and datastore connection management. Would the best implementation of that be something like:
class Core
{
var $User;
var $Oracle;
var $LDAP;
function __construct()
{
$this->User = new User();
$this->Oracle = new Oracle();
$this->LDAP = new LDAP();
}
}
So, in the long run, I could do something like:
$CORE->LDAP->connect();
$CORE->LDAP->isUser($username);
Is there a better way to handle implementing a library of classes like this?