Alison Whittier wrote:

I created a simple plugin just to try out the process (I responded to the StartNoticeSave event and made it send the message via sms using Padpaw).

I'd probably hook the EndNoticeSave event instead; that way you're sure all the necessary data structures are set up. If you hook StartNoticeSave, it's not impossible that the notice gets rejected by the DB for some reason.
I also have a question regarding the addition of database tables. It looks like objects that inherit from Memcached_Dataobject match the database tables and inherit the database access from the base class. If we were to add a database table, could we create a corresponding object derived from Memcached_Dataobject and leverage that code?

I'd appreciate any suggestions you have that might help.

Yeah, absolutely. It's a complicated little process, though. It's probably worth looking at the DB_DataObject documentation:

http://pear.php.net/manual/en/package.database.db-dataobject.php

Specifically, there's an autobuilder that will create config files and class definitions based on a DB:

http://pear.php.net/manual/en/package.database.db-dataobject.intro-autobuilding.php

I made a specialized subclass of DB_DataObject which will cache objects in Memcached. There's a setting for the autobuilder to accomplish this; it's imperfect, though.

Let me know if you need any help; I believe Craig Andrews is doing something similar.

-Evan

_______________________________________________
Laconica-dev mailing list
[email protected]
http://mail.laconi.ca/mailman/listinfo/laconica-dev

Reply via email to