Much similar to Java, Phrame supports a mechanism to enhance the functionality of a web page through tag libraries. Phrame tag libs contain variables and functions that can be used in a (PHP) web resource, for instance to get access to the ServerContext, HttpSession and HttpRequest storage containers.
To make use of Phrame taglibs you have to include a
_TAGLIBS parameter in the server configuration and specify an array with the paths to the taglibs (relative to your web application root) as its value.
To make use of Phrame taglibs you have to include the
_TAGLIBS parameter in the Phrame container configuration. See the code snippet below.
$containerConfig = array(
_TAGLIBS => array(
// Standard Phrame taglib
'/WEB-INF/lib/phrame/util/PhrameTagLib.php'
// Other taglibs
,'/path/to/myOwnTaglib.php'
,'/path/to/mySecondTaglib.php'
)
...
other container configuration parameters go here
...
);
Phrame comes with a standard tag library called
PhrameTagLib.php that resides in Phrame's
util subpackage. This library makes the following variables available to your (PHP) web resources:
Server context etc.
$_APPLICATION - ServerContext of your web application
$_HTTP_REQUEST - HttpRequest being processed
$_HTTP_SESSION - HttpSession currently linked to the request (could be NULL)
Module configuration, action mapping, action form
$_FORM - ActionForm related to current action, if any (could be NULL)
$_MAPPING - ActionMapping of the current action
$_MODULE_CONFIG - ModuleConfig of the current module
Action errors, message resources
$_ERRORS - ListIterator containing the current action errors obtained through ActionErrors::getErrors(), if any (could be NULL)
$_MESSAGES - synonym for $_ERRORS
$_MESSAGE_RESOURCES - MessageResources for the current module
Miscellaneous
$_LOCALE - user locale taken from the current request or Phrame's default locale if the request does not refer to a locale
$_TOKEN - transaction token stored in the current session, if any (could be NULL)