PHP Basics

OverloadingGetter

Overloads a class with readable magic properties.

Internally it reads the protected $_data array whose keys are interpreted as property names.

Example: Reading Foo->bar will return the value of $_data['bar'].

Tags
author

Sebastian Meyer sebastian.meyer@opencultureconsulting.com

Table of Contents

Methods

__get()  : mixed
Read data from an overloaded property.
__isset()  : bool
Check if an overloaded property is set and not empty.

Methods

__get()

Read data from an overloaded property.

public __get(string $property) : mixed
Parameters
$property : string

The class property to get

Return values
mixed

The property's current value or NULL if not set

__isset()

Check if an overloaded property is set and not empty.

public __isset(string $property) : bool
Parameters
$property : string

The class property to check

Return values
bool

Whether the class property is set and not empty


        
On this page

Search results