API15:JObject/set
From Joomla! Documentation
This Namespace has been archived - Please Do Not Edit or Create Pages in this namespace. Pages contain information for a Joomla! version which is no longer supported. It exists only as a historical reference, will not be improved and its content may be incomplete.
Contents |
Description
Modifies a property of the object, creating it if it does not already exist.
Syntax
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
mixed Previous value of the property
Defined in
libraries/joomla/base/object.php
Importing
jimport( 'joomla.base.object' );
Source Body
function set( $property, $value = null ) { $previous = isset($this->$property) ? $this->$property : null; $this->$property = $value; return $previous; }
[Edit See Also] SeeAlso:JObject/set
Examples
<CodeExamplesForm />
