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.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 2039869.2-class-hook.patch | 10.84 KB | deviantintegral |
| #1 | 2039869.1-class-hook.patch | 6.87 KB | deviantintegral |
Comments
Comment #1
deviantintegral commentedComment #2
deviantintegral commentedUpdated patch that fixes a few missing fromAccount() calls and lets static factory methods handle creating the right subclass.
Comment #3
deviantintegral commentedI split this into two commits (382aaa7 and aa41374) and pushed them to 7.x-1.x.