Class Joomla JFactory

Used to construct and return objects. Detected / libraries / joomla / factory.php methods 1. global object authorization. The return type of object – JAuthorization. synopsis object JAuthorization getACL () This example received a global object authorization of $ acl = & JFactory:: getACL (); 2. reference to the global application object. The return type of object – JApplication.

synopsis object JApplication getApplication ($ client, $ attribs, $ prefix) where: $ client data type – string. The name under which the client is known of the application. For example, Joomla comes with three client applications: the site of administration and installation. By default – null. $ Attribs type of data – an array of associative array of attributes that will be taken by the application. By default – the array. $ Prefix data type – string prefix that is added to the client's behalf, to form the name of the application class. By default, – 'J'.

example The method used most often to get the reference to the global application object. In this If the method is invoked with no arguments. In this example, we get the application object to see what part of the site (the user or administrative) was launched by the code. $ App = & JFactory:: getApplication (); if ($ app-> isSite ()) echo 'Client is site'; if ($ app-> isAdmin ()) echo 'Client is administrator'; 3. reference to global object cache. The return type of object – JCache. synopsis object JCache getCache ($ group, $ handler, $ storage) where: $ group value type – a string.