JApplicationHelper/addClientInfo: Difference between revisions
From Joomla! Documentation
New page: ===Description===
Adds information for a client.
<span class="editsection" style="font-size:76%;">
<nowiki>[</nowiki>Edit Descripton<n... |
m preparing for archive only |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 2: | Line 2: | ||
Adds information for a client. | Adds information for a client. | ||
<! removed transcluded page call, red link never existed > | |||
===Syntax=== | ===Syntax=== | ||
| Line 54: | Line 52: | ||
</source> | </source> | ||
<! removed transcluded page call, red link never existed > | |||
< | |||
===Examples=== | ===Examples=== | ||
=== Code Examples === | |||
<dpl> | <dpl> | ||
noresultsheader=\n | noresultsheader=\n | ||
category=addClientInfo | category=addClientInfo | ||
category=JApplicationHelper | category=JApplicationHelper | ||
namespace=CodeExample | |||
category=MethodExample | category=MethodExample | ||
include=* | include=* | ||
format= ,,, | format= ,,, | ||
</dpl> | </dpl> | ||
[[Category:Archived pages API16]] | |||
Latest revision as of 01:18, 25 March 2017
Description
Adds information for a client.
<! removed transcluded page call, red link never existed >
Syntax
static addClientInfo($client)
| Parameter Name | Default Value | Description |
|---|---|---|
| $client | A client identifier either an array or object |
Returns
boolean True if the information is added. False on error
Defined in
libraries/joomla/application/helper.php
Importing
jimport( 'joomla.application.helper' );
Source Body
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 transcluded page call, red link never existed >
Examples
Code Examples