I think I missed something in my PHP journey. Are there no static object methods in PHP (prior to 5, which I haven't even looked into yet)? I'm trying to wrap objects around my DB tables and giving each a select($id) method that is called on the class level and returns an instance... IE:
[code]$myAcct = Accounts->Select($id);[/code]
Is that not possible? Is there a workaround that's not more complicated than it's worth? I'm trying to avoid a DB wrapper class that's nothing but a series of variously named functions like selectAccount($id), selectUser($id), ...
Any help would be appreciated.
0 · ·