HMVC the right way ?! |
The solution I implemented in Sprint is part of the Themer system, but could be taken out and used on it's own with a little modification. It's modeled after ModX's style somewhat. In this you pass a string that contains the class/method name as well as any number of key/value pairs. The system tries to find a namespaced class that matches and, if that doesn't work, assumes it's a standard Library so it will try to load that up. The parameters are broken apart and sent as an array to the callable method so that you can implement a form of named parameter in PHP, and doesn't require any specific order to the params.
- View Callables Docs - View Callables Source I was thinking this weekend that I should split this out into it's own package and will probably do that later this week. |
Welcome Guest, Not a member yet? Register Sign In |