API15

Difference between revisions of "JApplicationHelper/addClientInfo"

From Joomla! Documentation

< API15:JApplicationHelper
(New page: ===Description=== Adds information for a client. <span class="editsection" style="font-size:76%;"> <nowiki>[</nowiki>Edit Descripton<n...)
(No difference)

Revision as of 16:52, 22 March 2010

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]

Adds information for a client.

[Edit Descripton]

Template:Description:JApplicationHelper/addClientInfo

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;
}

[Edit See Also] Template:SeeAlso:JApplicationHelper/addClientInfo

Examples[edit]

<CodeExamplesForm />