Table of Contents

get

API Package Subpackage Class Method Reference Last reviewed Doc status
API Home Package Joomla.Framework Subpackage Base Class JObject Method get Reference get() Never Work in Progress

This function gets the value of an object’s property.

Syntax

mixed get ( $property, $default )

$property string is a string containing the name of the property to get.
$default mixed is the default value to return in the event that the specified property is not set. This parameter is optional and if omitted defaults to null.

See also: * JObject::set * JObject::setProperties * JObject::getProperties

Examples

This example uses the JBrowser class, which is a subclass of JObject.

Example

global $mainframe;

$browser = &$mainframe->getBrowser();

print_r( $browser->get( '_images' ) );

might produce:

Result

Array
(
    [0] => jpeg
    [1] => gif
    [2] => png
    [3] => pjpeg
    [4] => x-png
    [5] => bmp
)