Support Joomla!

Joomla! 1.5 Documentation

Packages

Package: Joomla-Framework

Developer Network License

The Joomla! Developer Network content is © copyright 2006 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution- NonCommercial- ShareAlike 2.5

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. Derived clases should supply the execute() and dispaly() functions.

Located in /joomla/application/application.php (line 34)

Class JObject   (Subpackage Base)

Abstract class JApplication   (Subpackage Application)
Variable Summary
Method Summary
Static method static void registerEvent (string $event, mixed $handler)
Static method static array triggerEvent (string $event, [array $args = null])
Constructor JApplication __construct ([integer $clientId = 0])
Method void addCustomHeadTag (string $html)
Method void addMetaTag (string $name, string $content, [string $prepend = ''], [string $append = ''])
Method void appendMetaTag (string $name, string $content)
Method void appendPathWay ( $name, [ $link = null])
Method void close ([int $code = 0])
Abstract method void dispatch ()
Method void enqueueMessage (string $msg, [string $type = 'message'])
Method void getBasePath ([ $client = 0], [ $addTrailingSlash = true])
Method The getCfg (string $varname)
Method int getClientId ()
Method void getHead ()
Method void getItemid ( $id)
Method void getPath ( $varname, [ $user_option = null])
Method object JRouter. &getRouter ()
Method string getTemplate ()
Method void &getUser ()
Method mixed getUserState (string $key)
Method The getUserStateFromRequest (string $key, string $request, [string $default = null])
Method void initialise ([array $options = array()])
Method boolean isAdmin ()
Method boolean isSite ()
Method void loadConfiguration (string $file, string 1)
Method void loadSession (string $name)
Method boolean login (string $username, string $password, boolean $remember)
Method void logout ()
Method void prependMetaTag (string $name, string $content)
Method none; redirect (string $url, [string $msg = ''], [string $msgType = 'message'])
Abstract method void render ()
Abstract method void route ()
Method mixed setUserState (string $key, string $value)
Variables
integer $_clientId = null (line 43)

The client identifier.

  • since: 1.5
  • access: protected
array $_messageQueue = array() (line 60)

The application message queue.

  • access: protected
object JRouter $_router = null (line 52)

The router object

  • var: object
  • access: protected
Methods
Constructor __construct (line 67)

Class constructor.

JApplication __construct (integer $clientId)
  • integer $clientId: A client identifier.

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

Deprecated, use JDocument->addCustomTag instead (only when document type is HTML).

void addCustomHeadTag (string $html)
  • string $html: Valid HTML
addMetaTag (line 723)

Deprecated, use JDocument->setMetaData instead.

void addMetaTag (string $name, string $content, [string $prepend = ''], [string $append = ''])
  • string $name: Name of the metadata tag
  • string $content: Content of the metadata tag
  • string $prepend: Deprecated, ignored
  • string $append: Deprecated, ignored
appendMetaTag (line 738)

Deprecated, use JDocument->setMetaData instead.

void appendMetaTag (string $name, string $content)
  • string $name: Name of the metadata tag
  • string $content: Content of the metadata tag
appendPathWay (line 668)

Deprecated, use JPathWay->addItem() method instead.

void appendPathWay ( $name, [ $link = null])
  • $name
  • $link
close (line 158)

Exit the application.

  • access: public
void close (int $code)
  • int $code: Exit code
dispatch (line 134)

Dispatch the applicaiton.

Dispatching is the process of pulling the option from the request object and mapping them to a component. If the component do not exist, it handles determining a default component to dispatch

  • access: public
  • abstract:
void dispatch ()
enqueueMessage (line 224)

Enqueue a system message.

  • since: 1.5
  • access: public
void enqueueMessage (string $msg, [string $type = 'message'])
  • string $msg: The message to enqueue.
  • string $type: The message type.
getBasePath (line 853)

Deprecated, use JURI::base() instead.

  • see: JURI::base()
  • deprecated: As of version 1.5
  • since: 1.0
void getBasePath ( $client, [ $addTrailingSlash = true])
  • $client
  • $addTrailingSlash
getBlogCategoryCount (line 791)

Deprecated.

  • deprecated: As of version 1.5
  • since: 1.0
void getBlogCategoryCount ()
getBlogSectionCount (line 779)

Deprecated.

  • deprecated: As of version 1.5
  • since: 1.0
void getBlogSectionCount ()
getCfg (line 270)

Gets a configuration value.

The getCfg (string $varname)
  • string $varname: The name of the value to get.
getClientId (line 628)

Gets the client id of the current running application.

  • return: A client identifier.
  • since: 1.5
  • access: public
int getClientId ()
getContentItemLinkCount (line 827)

Deprecated.

  • deprecated: As of version 1.5
  • since: 1.0
void getContentItemLinkCount ()
getCustomPathWay (line 693)

Deprecated, use JPathWay->getPathWayNames() method instead.

void getCustomPathWay ()
getGlobalBlogSectionCount (line 803)

Deprecated.

  • deprecated: As of version 1.5
  • since: 1.0
void getGlobalBlogSectionCount ()
getHead (line 706)

Deprecated, use JDocument->get( 'head' ) instead.

void getHead ()
getItemid (line 878)

Deprecated, use JContentHelper::getItemid instead.

  • see: JContentHelper::getItemid()
  • deprecated: As of version 1.5
  • since: 1.0
void getItemid ( $id)
  • $id
getMessageQueue (line 247)

Get the system message queue.

  • return: system message queue.
  • since: 1.5
  • access: public
The getMessageQueue ()
getPath (line 840)

Deprecated, use JApplicationHelper::getPath instead.

void getPath ( $varname, [ $user_option = null])
  • $varname
  • $user_option
getRouter (line 518)

Return a reference to the JRouter object.

  • since: 1.5
  • access: public
object JRouter. &getRouter ()
getStaticContentCount (line 815)

Deprecated.

  • deprecated: As of version 1.5
  • since: 1.0
void getStaticContentCount ()
getTemplate (line 506)

Gets the name of the current template.

string getTemplate ()
getUser (line 865)

Deprecated, use JFactory::getUser instead.

void &getUser ()
getUserState (line 283)

Gets a user state.

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

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. Optional.
initialise (line 79)

Initialise the application.

  • access: public
void initialise ([array $options = array()])
  • array $options: An optional associative array of configuration settings.
isAdmin (line 640)

Is admin interface?

  • return: True if this application is administrator.
  • since: 1.0.2
  • access: public
boolean isAdmin ()
isSite (line 652)

Is site interface?

  • return: True if this application is site.
  • since: 1.5
  • access: public
boolean isSite ()
loadConfiguration (line 492)

Load the configuration

  • since: 1.5
  • access: public
void loadConfiguration (string $file, string 1)
  • string 1: The type of the configuration file
  • string $file: The path to the configuration file
loadSession (line 472)

Load the user session.

  • access: public
void loadSession (string $name)
  • string $name: The session's name.
login (line 382)

Login authentication function.

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

Username and encoded password are sent as credentials (along with other possibilities) to each observer (JAuthenticatePlugin) for user validation. Successful validation will update the current session with the user details.

  • return: True on success.
  • since: 1.5
  • access: public
boolean login (string $username, string $password, boolean $remember)
  • string $username: The username.
  • string $password: The password.
  • boolean $remember: True, if the user login needs to be remembered by the application.
logout (line 432)

Logout authentication function.

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

  • access: public
void logout ()
prependMetaTag (line 752)

Deprecated, use JDocument->setMetaData instead

void prependMetaTag (string $name, string $content)
  • string $name: Name of the metadata tag
  • string $content: Content of the metadata tag
redirect (line 182)

Redirect to another URL.

Optionally enqueues a message in the system message queue (which will be displayed the next time a page is loaded) using the enqueueMessage method. If the headers have not been sent the redirect will be accomplished using a "301 Moved Permanently" code in the header pointing to the new location. If the headers have already been sent this will be accomplished using a JavaScript statement.

none; redirect (string $url, [string $msg = ''], [string $msgType = 'message'])
  • string $url: The URL to redirect to.
  • string $msg: An optional message to display on redirect.
  • string $msgType: An optional message type.
registerEvent (line 342)

Registers a handler to a particular event group.

  • since: 1.5
void registerEvent (string $event, mixed $handler)
  • string $event: The event name.
  • mixed $handler: The handler, a function or an instance of a event object.
render (line 147)

Render the application.

Rendering is the process of rendering the application into the JResponse buffer

  • access: public
  • abstract:
void render ()
route (line 115)

Route the applicaiton.

Routing is the process of examining the request environment to determine which which component should receive the request. This component optional parameters are then set in the request object to be processed when the application is being dispatched

  • access: public
  • abstract:
void route ()
setUserState (line 301)

Sets the value of a user state variable.

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

Calls all handlers associated with an event group.

  • return: An array of results from each function call.
  • since: 1.5
array triggerEvent (string $event, [array $args = null])
  • string $event: The event name.
  • array $args: An array of arguments.

Inherited Methods

Inherited From JObject

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

Documentation generated on Mon, 05 Mar 2007 20:52:14 +0000 by phpDocumentor 1.3.1