Prev | Current Page 28 | Next

James Kennard

"Mastering Joomla! 1.5 Extension and Framework Development"

This enables us
to modify the output before sending it; for example, we can add a link to a JavaScript
file in the document header at almost any point during the application lifetime.
Getting Started
[ 18 ]
The application object is always stored in the $mainframe variable. The application
object is a global variable, which can be accessed from within functions and methods
by declaring $mainframe global:
/**
* Pass-through method to check for admin application.
*
* @access public
* @return boolean True if application is JAdministrator
*/
function isAdmin()
{
global $mainframe;
return $mainframe->isAdmin();
}
Unlike the application, to access the global document object we use the static
JFactory::getInstance() method:
$document =& JFactory::getDocument();
Note that we use the =& assignment operator to retrieve the document.
This ensures that we get a reference to the global document object and
that we do not create a copy of the object.
Request to Response
Frontend and backend requests are placed with the root index.


Pages:
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
wierszyki dieta light katalog stron London Escort Agencies Okulary