JObject/set
From Joomla! Documentation
< API16:JObject
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]
Modifies a property of the object, creating it if it does not already exist.
Template:Description:JObject/set
Syntax[edit]
set($property, $value=null)
Parameter Name | Default Value | Description |
---|---|---|
$property | $property The name of the property. | |
$value | null | $value The value of the property to set. |
Returns[edit]
mixed Previous value of the property.
Defined in[edit]
libraries/joomla/base/object.php
Importing[edit]
jimport( 'joomla.base.object' );
Source Body[edit]
public function set($property, $value = null)
{
$previous = isset($this->$property) ? $this->$property : null;
$this->$property = $value;
return $previous;
}
[Edit See Also] Template:SeeAlso:JObject/set
Examples[edit]
<CodeExamplesForm />