API16

JDispatcher/getInstance

< API16:JDispatcher

The "API16" 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

Returns the global Event Dispatcher object, only creating it if it doesn't already exist.


<! removed transcluded page call, red link never existed >

Syntax

static getInstance()


Returns

The EventDispatcher object. 

Defined in

libraries/joomla/event/dispatcher.php

Importing

jimport( 'joomla.event.dispatcher' );

Source Body

public static function getInstance()
{
        static $instance;

        if (!is_object($instance)) {
                $instance = new JDispatcher();
        }

        return $instance;
}


<! removed transcluded page call, red link never existed >

Examples

Code Examples


Advertisement