Code should be clear, consise, and written so that it is self-documenting as much as possible. I take pride in all the code that I produce.
This second code sample is a Kohana controller action from an internal web application. This is code reuse at it’s best. One single controller action to save four (easily expanded to more) different types of form submissions; each to it’s own appropriate database table. The action uses Doctrine as the database access layer (DBAL) and object relational mapping (ORM).
NOTE: This shows my older coding style. Today, I’m an advocate of the PSR-2 code style standard.
This view is from a Kohana web application. This is the corresponding view for the controller. Views incorporate PHP variables with HTML markup.
Copyright 2010-15 Kevin Gustavson