Elgg
Version 3.0
|
Wrap an object and display warnings whenever the object's variables are accessed or a method is used. More...
Public Member Functions | |
__construct ($object, $message, $version, $reporter= 'elgg_deprecated_notice') | |
Create the wrapper. More... | |
__get ($name) | |
Get a property on the object. More... | |
__set ($name, $value) | |
Set a property on the object. More... | |
__isset ($name) | |
Is a property set? More... | |
__call ($name, $arguments) | |
Call a method on the object. More... | |
__toString () | |
Get the object as string. More... | |
offsetSet ($key, $value) | |
Array access interface. More... | |
offsetGet ($key) | |
Array access interface. More... | |
offsetUnset ($key) | |
Array access interface. More... | |
offsetExists ($offset) | |
Array access interface. More... | |
Protected Member Functions | |
displayWarning () | |
Display a warning. More... | |
Protected Attributes | |
$object | |
$string | |
$message | |
$version | |
$reporter | |
Wrap an object and display warnings whenever the object's variables are accessed or a method is used.
It can also be used to wrap a string.
Note that the wrapper will not share the type of the wrapped object and will fail type hints, instanceof, etc.
This was introduced for deprecating passing particular variables to views automatically in elgg_view(). It can be removed once that use is no longer required.
Wraps: url string in ViewsService config object in ViewsService user object in ViewsService session object in session lib config object in ElggPlugin::includeFile
Definition at line 27 of file DeprecationWrapper.php.
Elgg\DeprecationWrapper::__construct | ( | $object, | |
$message, | |||
$version, | |||
$reporter = 'elgg_deprecated_notice' |
|||
) |
Create the wrapper.
mixed | $object | The object or string to wrap |
string | $message | The deprecation message to display when used |
string | $version | The Elgg version this was deprecated |
callable | $reporter | function called to report deprecation |
Definition at line 51 of file DeprecationWrapper.php.
Elgg\DeprecationWrapper::__call | ( | $name, | |
$arguments | |||
) |
Call a method on the object.
string | $name | Method name |
array | $arguments | Method arguments |
Definition at line 103 of file DeprecationWrapper.php.
Elgg\DeprecationWrapper::__get | ( | $name | ) |
Get a property on the object.
string | $name | Property name |
Definition at line 68 of file DeprecationWrapper.php.
Elgg\DeprecationWrapper::__isset | ( | $name | ) |
Is a property set?
string | $name | Property name |
Definition at line 91 of file DeprecationWrapper.php.
Elgg\DeprecationWrapper::__set | ( | $name, | |
$value | |||
) |
Set a property on the object.
string | $name | Property name |
mixed | $value | Property value |
Definition at line 80 of file DeprecationWrapper.php.
Elgg\DeprecationWrapper::__toString | ( | ) |
|
protected |
Elgg\DeprecationWrapper::offsetExists | ( | $offset | ) |
Array access interface.
mixed | $offset | Offset |
Definition at line 204 of file DeprecationWrapper.php.
Elgg\DeprecationWrapper::offsetGet | ( | $key | ) |
Array access interface.
mixed | $key | Name |
Definition at line 168 of file DeprecationWrapper.php.
Elgg\DeprecationWrapper::offsetSet | ( | $key, | |
$value | |||
) |
Array access interface.
mixed | $key | Name |
mixed | $value | Value |
Definition at line 145 of file DeprecationWrapper.php.
Elgg\DeprecationWrapper::offsetUnset | ( | $key | ) |
Array access interface.
mixed | $key | Name |
Definition at line 186 of file DeprecationWrapper.php.
|
protected |
Definition at line 35 of file DeprecationWrapper.php.
|
protected |
Definition at line 29 of file DeprecationWrapper.php.
|
protected |
Definition at line 41 of file DeprecationWrapper.php.
|
protected |
Definition at line 32 of file DeprecationWrapper.php.
|
protected |
Definition at line 38 of file DeprecationWrapper.php.