API16

API16:JException/set

From Joomla! Documentation

Description

Modifies a property of the object, creating it if it does not already exist.


<! removed transcluded page call, red link never existed >

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/error/exception.php

Importing

jimport( 'joomla.error.exception' );

Source Body

public function set($property, $value = null)
{
        $previous = isset($this->$property) ? $this->$property : null;
        $this->$property = $value;
        return $previous;
}


<! removed transcluded page call, red link never existed >

Examples

Code Examples