I haven't put much thought into this but what about something like this:
PHP Code:
$jack = $user->username->findAll("jack");
The usermodel class generates objects for each column in the database.
PHP Code:
Class UserModel
{
public $username = new UserNameModel();
}
If having the public var is considered bad practice then something like this maybe:
PHP Code:
$jack = $user->UserName()->FindAll("jack");
PHP Code:
Class UserModel
{
private $username = new UserNameModel();
public UserName()
{
return $username;
}
}
Bookmarks