Re:The Micro PHP Manifesto's Missing Tenet
by ericingram on Tuesday January 10, 2012 @02:20PM
(#3448504)
Note: I purposely called it MVc vs. MVC. The controller is minimized in favor of native REST access to models/resources. If anyone is curious about this, I'll be writing about the new convention soon.
My answer was to use plain functions as helpers, at first because they could easily become Smarty modifiers, and later realized the function-only pattern worked really well across the whole app.
I write code like this...
# file: helpers/say_hello.php
Which is auto loaded by the framework and usable like this:(PHP):
(Smarty):