The things I find myself using over and over again are some action helpers. One that loads and caches Models, another that validates parameters, another that manages error warning and info messages (similar to flashMessenger except that it works whether you _forward or redirect or access them inside the current query). Also some customised form controls (like a Save and Cancel button that appear beside each other with no Label), and some view Helpers that return an a href if the user has ACL permissions to visit the module/view/action. These are generic and live in a shared include directory used by all projects.
I had a whole bunch of generic classes (like an extension of Zend_Controller_Action) but as the framework has matured, these have been needed less and less often because the behaviours can be shifted into smaller more general helpers and utilities that can be loaded on demand. [I've been using ZF since 0.9]
The Model helper is below
//-------------------------------------------------------------------------
/*! \brief loads and caches models
usage in an Action controller: eg
$users = $this->_helper->model( 'User' );
loads MODEL_PATH . User.php
Idea stolen from
http://fedecarg.com/wiki/Module-specific_Models
*/
class LSS_Controller_Action_Helper_Model extends Zend_Controller_Action_Helper_Abstract
{
const PREFIX = 'MODEL_';
//-------------------------------------------------------------------------
/*! \brief return a global instance of the specified model.
Uses Zend_registry to store a cached instance of the model so we don't have to load it
in each function.
You can use sub directories by passing in the class name eg Customer_Session
\param $type string type of value to return
\return model instance
*/
function direct( $name )
{
$regName = self::PREFIX . $name;
if (Zend_Registry::isRegistered( $regName )) return Zend_Registry::get( $regName );
require_once( MODEL_PATH . str_replace( '_', '/', $name ) . '.php' );
$instance = new $name;
Zend_Registry::set( $regName, $instance );
return $instance;
}
}