Tuesday, November 16, 2010

To update classes to make use of php 5.3 static magic

Something for my own user only, some changes to make to program
Even better have clsEmailRecord::factory($oRegistry)->get($email)
Then we can also create new record this way! it should extend clsMongoDocument

Just extend static class MongoDocument then use get_calling_class()
and call_static() magic
then it will be as easy as just
creating blank classes than extend clsMongoDocument
Heck, we can even make it serializable, just
use clsRegistry::getInstance() in unserialize and we good to go

clsMongoDocument::getByEmail($email)
clsMongoEmail::getByEmail($oMongo, $email)

clsMongoEmail::create($oMongo, $aData);

clsMongoEmail::factory($oMongo, $aData); the normal object

No comments:

Post a Comment