8.3 Global & Session Variables
Bistro provides a number of predefined variables, many of which developers will need to access and, on occasion, modify.
$ADAO
ADAO is an instance of "A Database Abstraction Object". ADAO is responsible for maintaining the database connection, logging errors and ensuring that all of Bistro's database queries are both secure and correct.
FYI: ADAO was selected as the acronym to avoid confusion with other popular database abstraction systems, and as a tribute to a Lewis Media partner company: The Adao Institute for Change.
$theme
$theme is an array of values, which are output as part of the HTML that is rendered. The most common elements in the array are $theme[keywords], $theme[‘description'], $theme[‘title'], and $theme[‘content']. Generally, it is correct for a module to add/modify any of these fields.
$SAM
SAM is the system's instance of the System Administrator for Modules. SAM is responsible for tracking the modules that are installed and the hooks that they have registered. SAM is also responsible for evaluating whether a module is allowed to call a hook (given the rules provided when registering and when calling).
FYI: Historically, SAM was actually named for the image of a Six-Armed Man, who sat in a room filled with buttons at the heart of the Bistro system. Hearing a call to execute a hook, SAM was responsible for calculating who could run the hook, and would press all the appropriate buttons. It was a great image, and so the name stuck.