API16

JApplicationHelper/addClientInfo

From Joomla! Documentation

< API16:JApplicationHelper
Revision as of 21:49, 12 May 2013 by JoomlaWikiBot (talk | contribs) (removing red link to edit, no existant pages)

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[edit]

Adds information for a client.

[<! removed edit link to red link >]

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

Syntax[edit]

static addClientInfo($client)
Parameter Name Default Value Description
$client A client identifier either an array or object

Returns[edit]

boolean True if the information is added. False on error

Defined in[edit]

libraries/joomla/application/helper.php

Importing[edit]

jimport( 'joomla.application.helper' );

Source Body[edit]

public static function addClientInfo($client)
{
        if (is_array($client)) {
                $client = (object) $client;
        }

        if (!is_object($client)) {
                return false;
        }

        $info = &self::getClientInfo();

        if (!isset($client->id)) {
                $client->id = count($info);
        }

        $info[$client->id] = clone $client;

        return true;
}

[<! removed edit link to red link >] <! removed transcluded page call, red link never existed >

Examples[edit]

<CodeExamplesForm />