How about something like this? Note, the PHP probably doesn't compile. The thrust of my post is that your model objects aren't database objects. Create a database object that is separate and provides the basic functionality that most of your model/DAO/ActiveRecord/whatever classes need. Then let your model focus on business logic, not database code. You might find that if you need to switch from Mongo to some other database later, it'll be easier because you've encapsulated all the database specific code into one place.
So, something like the following. My post is about the design, not the language.
class Db {
private static $mongoDb;
public static function _init() {
self::$mongoDb = \Mongo_Db::instance( 'content' );
}
public static function getValue( $table, $name ) {
$value = "";
return self::$mongoDb->get( $table, array( "name", $name ) );
}
}
class Model_Users extends Model {
private $db;
public static function _init() {
$this->db = new Db();
}
public static function getUser( $name ) {
return $this->db->getValue( "users", $name );
}
}