| API | Package | Subpackage | Class | Method | Reference | Last reviewed | Doc status |
|---|---|---|---|---|---|---|---|
Home |
Joomla.Framework |
Base |
JObject |
set |
set() |
Never | Work in Progress |
This function sets the value of an object’s property.
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::setProperties * JObject::getProperties
This example uses the JBrowser class, which is a subclass of JObject.
Example
global $mainframe; $browser = &$mainframe->getBrowser(); $browser->set( '_mobile', false ); echo "Mobile: "; echo ($browser->get( '_mobile' )) ? "true" : "false";
Might produce:
Result
Mobile: false