Actions

API16

JObject/def

From Joomla! Documentation

< API16:JObject
Revision as of 17:37, 22 March 2010 by Doxiki (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Replacement filing cabinet.png
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

Sets a default value if not alreay assigned

[Edit Descripton]

Description:JObject/def

Syntax

def($property, $default=null)
Parameter Name Default Value Description
$property $property The name of the property.
$default null $default The default value.

Defined in

libraries/joomla/base/object.php

Importing

jimport( 'joomla.base.object' );

Source Body

public function def($property, $default=null)
{
        $value = $this->get($property, $default);
        return $this->set($property, $value);
}

[Edit See Also] SeeAlso:JObject/def

Examples

<CodeExamplesForm />