Custom modules should be able to swap in their own Hackpad classes to extend functionality. For example, they might want to run additional API settings calls when creating a user or a pad.

The attached patch adds a simple class info hook for all classes. We don't cache across requests since the hooks are so simple. See hackpad.api.php for details on how it works.

Comments

deviantintegral’s picture

Status: Active » Needs review
StatusFileSize
new6.87 KB
deviantintegral’s picture

StatusFileSize
new10.84 KB

Updated patch that fixes a few missing fromAccount() calls and lets static factory methods handle creating the right subclass.

deviantintegral’s picture

Version: 7.x-1.x-dev » 6.x-1.x-dev
Status: Needs review » Patch (to be ported)

I split this into two commits (382aaa7 and aa41374) and pushed them to 7.x-1.x.