API15

JApplication/registerEvent

From Joomla! Documentation

< API15:JApplication
Revision as of 16:51, 22 March 2010 by Doxiki (talk | contribs) (New page: ===Description=== Registers a handler to a particular event group. <span class="editsection" style="font-size:76%;"> <nowiki>[</nowiki>[[Description:JApplication/registerEvent|Edit De...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

The "API15" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.

Description[edit]

Registers a handler to a particular event group.

[Edit Descripton]

Template:Description:JApplication/registerEvent

Syntax[edit]

static registerEvent($event, $handler)
Parameter Name Default Value Description
$event The event name.
$handler The handler, a function or an instance of a event object.

Returns[edit]

void

Defined in[edit]

libraries/joomla/application/application.php

Importing[edit]

jimport( 'joomla.application.application' );

Source Body[edit]

public static function registerEvent($event, $handler)
{
        $dispatcher = &JDispatcher::getInstance();
        $dispatcher->register($event, $handler);
}

[Edit See Also] Template:SeeAlso:JApplication/registerEvent

Examples[edit]

<CodeExamplesForm />