====== set ======
{#JAPI Joomla.Framework Base JObject::set #}
This function sets the value of an object's property.
===== Syntax =====
void set ( **$property**, **$value** )
| **$property** | string | is a string containing the name of the property to set. |
| **$value** | mixed | is a variable containing the value to assign to the property. |
See also:
* [[JObject-get|JObject::get]]
* [[JObject-setProperties|JObject::setProperties]]
* [[JObject-getProperties|JObject::getProperties]]
===== Examples =====
This example uses the JBrowser class, which is a subclass of JObject.
global $mainframe;
$browser = &$mainframe->getBrowser();
$browser->set( '_mobile', false );
echo "Mobile: ";
echo ($browser->get( '_mobile' )) ? "true" : "false";
Might produce:
Mobile: false
----
~~DISCUSSION~~