Abstract Class JApplication

Description

Base class for a Joomla! application

Acts as a Factory class for application specific objects and provides many supporting API functions.

Located in /application/application.php (line 28)

JObject
   |
   --JApplication
Direct descendents
Class Description
 class mosMainFrame Legacy class, derive from JApplication instead
Variable Summary
Method Summary
 JApplication __construct (string $client, integer 1)
 void addCustomHeadTag (mixed $html)
 void addMetaTag (mixed $name, mixed $content, [mixed $prepend = ''], [mixed $append = ''])
 void appendMetaTag (mixed $name, mixed $content)
 void appendPathWay (mixed $name, [mixed $link = null])
 string getBaseURL ()
 jbrowser &getBrowser ()
 The getCfg (string $varname)
 void getClient (mixed 0)
 jdatabase &getDBO ([string $host = null], [string $user = null], [string $password = null], [string $db = null], [string $dbprefix = null], [string $dbtype = null], [string $debug = null])
 void &getDocument ()
 void getHead ()
 void getItemid (mixed $id, [mixed $typed = 1], [mixed $link = 1], [mixed $bs = 1], [mixed $bc = 1], [mixed $gbs = 1])
 jlanguage &getLanguage ()
 string getOption ()
 void getPath (mixed $varname, [mixed $user_option = null])
 jpathway &getPathWay ()
 string getTemplate ()
 juri &getURI ()
 The getUserState (string $key)
 The getUserStateFromRequest (string $key, string $request, [string $default = null])
 boolean isAdmin ()
 boolean isSite ()
 void login ([mixed $username = null], [mixed $passwd = null])
 void logout ()
 void prependMetaTag (mixed $name, mixed $content)
 void registerEvent (string $event, mixed $handler)
 void setConfiguration (string $file, [string $type = 'config'])
 void setLanguage ([string $lang = null])
 void setSession (string $name)
 mixed setUserState (string $key, string $value)
 array triggerEvent (string $event, [array $args = null])
 void _createConfiguration (string $file, [string $type = 'PHP'])
 boolean _createPathWay ()
 void _createSession (string $name, [boolean $useCookies = true])
Variables
string $_baseURL = null (line 84)

The url of the application

  • access: protected
integer $_client = null (line 52)

The client identifier

  • access: protected
string $_lang = null (line 60)

A string holding the active language

  • access: protected
object JPathWay $_pathway = null (line 44)

The pathway store

  • var: object
  • access: protected
object JRegistry $_registry = null (line 68)

Application persistent store

  • var: object
  • access: protected
JModelSession $_session = null (line 36)

The current session

  • access: protected
object JModelUser $_user = null (line 76)

The active user object

  • access: protected
Methods
Constructor __construct (line 92)

Class constructor

JApplication __construct (string $client, integer 1)
  • integer 1: A client identifier
  • string $client: The URL option passed in

Redefinition of:
JObject::__construct()
Class constructor, overridden in descendant classes.

Redefined in descendants as:
addCustomHeadTag (line 677)

Depreacted, use JDocument->addCustomTag instead

  • since: 1.1
void addCustomHeadTag (mixed $html)
addMetaTag (line 652)

Depreacted, use JDocument->setMetadata instead

  • since: 1.1
void addMetaTag (mixed $name, mixed $content, [mixed $prepend = ''], [mixed $append = ''])
appendMetaTag (line 661)

Depreacted, use JDocument->setMetadata instead

  • since: 1.1
void appendMetaTag (mixed $name, mixed $content)
appendPathWay (line 613)

Depreceated, use JPathWay->addItem() method instead

  • since: 1.1
void appendPathWay (mixed $name, [mixed $link = null])
getBaseURL (line 257)

Return the application url

  • return: The url of the application
  • since: 1.1
  • access: public
string getBaseURL ()
getBlogCategoryCount (line 702)

Depreacted, use JApplicationHelper::getBlogCategoryCount instead

  • since: 1.1
void getBlogCategoryCount ()
getBlogSectionCount (line 694)

Depreacted, use JApplicationHelper::getBlogSectionCount instead

  • since: 1.1
void getBlogSectionCount ()
getBrowser (line 424)

Return a reference to the JBrowser object

  • return: A JBrowser object holding the browser information
jbrowser &getBrowser ()
getCfg (line 104)

Gets a configuration value

  • return: user state
  • access: public
The getCfg (string $varname)
  • string $varname: The name of the value to get
getClient (line 585)

Gets the client id

  • since: 1.1
void getClient (mixed 0)
  • mixed 0: A client identifier
getContentItemLinkCount (line 726)

Depreacted, use JApplicationHelper::getContentItemLinkCount instead

  • since: 1.1
void getContentItemLinkCount ()
getCustomPathWay (line 635)

Depreceated, use JPathWay->getNamePathWay() method instead

  • since: 1.1
void getCustomPathWay ()
getDBO (line 401)

Return a reference to a JDatabase instance

  • return: A JDatabase object
  • since: 1.1
  • access: public
jdatabase &getDBO ([string $host = null], [string $user = null], [string $password = null], [string $db = null], [string $dbprefix = null], [string $dbtype = null], [string $debug = null])
  • string $host: Database host
  • string $user: Database user name
  • string $password: Database user password
  • string $db: Database name
  • string $dbprefix: Common prefix for all tables
  • string $dbtype: Database type
  • string $debug: True if database needs to be set in debug mode
getDocument (line 374)

Return a reference to the JDocument object

  • since: 1.1
  • access: public
void &getDocument ()
getGlobalBlogSectionCount (line 710)

Depreacted, use JApplicationHelper::getGlobalBlogSectionCount instead

  • since: 1.1
void getGlobalBlogSectionCount ()
getHead (line 643)

Depreacted, use JDocument->renderHead instead

  • since: 1.1
void getHead ()
getItemid (line 686)

Depreacted, use JApplicationHelper::getItemid instead

  • since: 1.1
void getItemid (mixed $id, [mixed $typed = 1], [mixed $link = 1], [mixed $bs = 1], [mixed $bc = 1], [mixed $gbs = 1])
getLanguage (line 458)

Return a reference to the JLanguage object

  • return: A JLanguage object
  • since: 1.1
jlanguage &getLanguage ()
getOption (line 246)

Return the application option string [main component]

  • return: Option
  • since: 1.1
  • access: public
string getOption ()
getPath (line 734)

Depreacted, use JApplicationHelper::getPath instead

  • since: 1.1
void getPath (mixed $varname, [mixed $user_option = null])
getPathWay (line 364)

Return a reference to the JPathWay object

  • return: JPathWay object
  • since: 1.1
  • access: public
jpathway &getPathWay ()
getStaticContentCount (line 718)

Depreacted, use JApplicationHelper::getStaticContentCount instead

  • since: 1.1
void getStaticContentCount ()
getTemplate (line 339)

Gets the name of the current template

string getTemplate ()
getURI (line 350)

Return a reference to the JURI object

  • return: JURI object
  • since: 1.1
  • access: public
juri &getURI ()
getUser (line 436)

Returns a reference to the JUser object

  • return: A user object with the information from the current session
JModelUser &getUser ()
getUserState (line 115)

Gets a user state

  • return: user state
  • access: public
The getUserState (string $key)
  • string $key: The path of the state
getUserStateFromRequest (line 150)

Gets the value of a user state variable

  • return: request user state
  • access: public
The getUserStateFromRequest (string $key, string $request, [string $default = null])
  • string $key: The key of the user state variable
  • string $request: The name of the variable passed in a request
  • string $default: The default value for the variable if not found
isAdmin (line 593)

Is admin interface?

  • since: 1.0.2
boolean isAdmin ()
isSite (line 601)

Is site interface?

  • since: 1.1
boolean isSite ()
login (line 199)

Login authentication function

Username and encoded password are passed the the onLoginUser event who is responsible for the user validation. A successful validation updates the current session record with the users details.

void login ([mixed $username = null], [mixed $passwd = null])
logout (line 233)

Logout authentication function

Passed the current user information to the onLogoutUser event and reverts the current session record back to 'anonymous' parameters

void logout ()
prependMetaTag (line 669)

Depreacted, use JDocument->setMetadata instead

  • since: 1.1
void prependMetaTag (mixed $name, mixed $content)
registerEvent (line 172)

Registers a handler to a particular event group

  • since: 1.1
  • static:
void registerEvent (string $event, mixed $handler)
  • string $event: The event name
  • mixed $handler: The handler, a function or an instance of a event object
setConfiguration (line 330)

Set the configuration

  • since: 1.1
  • access: public
void setConfiguration (string $file, [string $type = 'config'])
  • string $file: The path to the configuration file
  • string $type: The type of the configuration file
setLanguage (line 294)

Set the application language

  • since: 1.1
  • access: private
void setLanguage ([string $lang = null])
  • string $lang: The language name
setSession (line 282)

Set the user session

  • access: public
void setSession (string $name)
  • string $name: The sessions name
setUserState (line 132)

Sets the value of a user state variable

  • return: The previous state if exist
  • access: public
mixed setUserState (string $key, string $value)
  • string $key: The path of the state
  • string $value: The value of the variable
triggerEvent (line 186)

Calls all handlers associated with an event group

  • return: An array of results from each function call
  • since: 1.1
  • static:
array triggerEvent (string $event, [array $args = null])
  • string $event: The event name
  • array $args: An array of arguments
_createConfiguration (line 526)

Create the configuration registry

  • access: private
void _createConfiguration (string $file, [string $type = 'PHP'])
  • string $file: The path to the configuration file
  • string $type: The format type
_createPathWay (line 477)

Create a JPathWay object and set the home/component items of the pathway

  • return: True if successful
  • since: 1.1
  • access: private
boolean _createPathWay ()
_createSession (line 548)

Create the user session

Old sessions are flushed based on the configuration value for the cookie lifetime. If an existing session, then the last access time is updated. If a new session, a session id is generated and a record is created in the #__sessions table.

  • access: private
void _createSession (string $name, [boolean $useCookies = true])
  • string $name: The sessions name
  • boolean $useCookies: Use cookies to store the session on the client

Inherited Methods

Inherited From JObject

 JObject::__construct()
 JObject::JObject()
 JObject::get()
 JObject::set()
 JObject::toString()
 JObject::__destruct()

Documentation generated on Sat, 4 Feb 2006 14:22:37 +0100 by phpDocumentor 1.3.0RC4