Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

mainframe in Joomla

Tags:

joomla

The hello world tutorial for Joomla states:

$mainframe is a global variable in Joomla that has lots of useful methods attached to it.

How do I find out what these methods are? I tried searching through their documentation, but I couldn't find any clues.

like image 485
Casebash Avatar asked Dec 28 '22 21:12

Casebash


1 Answers

The $mainframe object is ultimately an instance the JApplication class. The JApplication class is defined in libraries/joomla/application/application.php. Depending on whether you're in the administrator or frontend section of Joomla, the $mainframe object is a direct instance of JAdministrator or JSite respectively. These classes are in includes/application.php and administrator/includes/application.php.

like image 178
jlleblanc Avatar answered Jan 06 '23 09:01

jlleblanc