Action Plugins

Access plugins are preloaded by bricklayer. Access plugins store session information. They tell you if your logged in and what role or level you are logged in as. Access plugins have several responsibilities. The first and most important is their response to the check_session method. Bricklayer provides the check_session method as a means of checking the most common session values. Access plugins are expected to return the following values when the following methods are called on them like so:
$session{login} = $access_plugin->login; # boolean value
if ($session{login} == 1) {
	$session{name} = $access_plugin->name;
	$session{sessionid} = $access_plugin->session_id;
	$session{level} = $access_plugin->level;
	$session{role} = $access_plugin->role;
}
Action Plugins are stored in the plugins/action directory. They are general purpose plugins. They will get called automatically by the execute and execute web convenience methods if you use them, or can be called at will by template tag handlers, or your application, or other plugins. Typically these plugins contain your application logic. They do the things your app is supposed to do. They may use the publish method to write to the disk. They may store things in the database. They may retrieve things from the database. In short use them for anything your feel like using them for. I will often bind an action plugin to a template tag using an attribute. These are the general purpose plugin that enables you to seperate your presentation and data from your application logic.
Jeremy Wall 2006-08-21