Solars manual has a getting started section that walks you through setting up a basic app, This app extends "Solar_Controller_Page" which handles a lot of the backend work for you.
As you get into your project you will find that pretty much every controller you have needs access to some basic structures and information, how can you ensure these are always available?
By making your page controller, IE Example_App_Base.. All your apps extend this base class instead of the Solar_Controller_Page class
{
/**
* A copy of the model catalog
*/
protected $_catalog;
/**
* A copy of the user object
*/
public $user;
protected function _setup() {
// Now you will always be able to access the models you need
$this->_catalog = Solar_Registry::get('model_catalog');
// register a Solar_User object if not already.
// this will trigger the authentication process.
if (! Solar_Registry::exists('user')) {
Solar_Registry::set('user', Solar::factory('Solar_User'));
}
$this->user = Solar_Registry::get('user');
// Provide automatic basic access control for all your pages
// A user has to at least have basic read access to the class to access
if ($this->user->access->isAllowed(get_class($this), 'Read')) {
$this->_redirect('/nowallowed');
}
}
}
Now you can ensure all your pages have access to the model catalog, the user object and that the user accessing has at least the basic permissions to access the page in question.

