PHP Class Elgg\DeprecationWrapper

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 variabled to views automatically in elgg_view(). It also used to wrap the deprecated global $SESSION. 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
Inheritance: implements ArrayAccess
Afficher le fichier Open project: elgg/elgg

Protected Properties

Свойство Type Description
$message string
$object object
$reporter callable
$string string
$version string

Méthodes publiques

Méthode Description
__call ( string $name, array $arguments ) : mixed Call a method on the object
__construct ( mixed $object, string $message, string $version, callable $reporter = 'elgg_deprecated_notice' ) Create the wrapper
__get ( string $name ) : mixed Get a property on the object
__set ( string $name, mixed $value ) : void Set a property on the object
__toString ( ) : string Get the object as string
offsetExists ( mixed $offset ) : boolean Array access interface
offsetGet ( mixed $key ) : mixed Array access interface
offsetSet ( mixed $key, mixed $value ) : void Array access interface
offsetUnset ( mixed $key ) : void Array access interface

Méthodes protégées

Méthode Description
displayWarning ( ) : void Display a warning

Method Details

__call() public méthode

Call a method on the object
public __call ( string $name, array $arguments ) : mixed
$name string Method name
$arguments array Method arguments
Résultat mixed

__construct() public méthode

Create the wrapper
public __construct ( mixed $object, string $message, string $version, callable $reporter = 'elgg_deprecated_notice' )
$object mixed The object or string to wrap
$message string The deprecation message to display when used
$version string The Elgg version this was deprecated
$reporter callable function called to report deprecation

__get() public méthode

Get a property on the object
public __get ( string $name ) : mixed
$name string Property name
Résultat mixed

__set() public méthode

Set a property on the object
public __set ( string $name, mixed $value ) : void
$name string Property name
$value mixed Property value
Résultat void

__toString() public méthode

Get the object as string
public __toString ( ) : string
Résultat string

displayWarning() protected méthode

Display a warning
protected displayWarning ( ) : void
Résultat void

offsetExists() public méthode

Array access interface
See also: ArrayAccess::offsetExists()
public offsetExists ( mixed $offset ) : boolean
$offset mixed Offset
Résultat boolean

offsetGet() public méthode

Array access interface
See also: ArrayAccess::offsetGet()
public offsetGet ( mixed $key ) : mixed
$key mixed Name
Résultat mixed

offsetSet() public méthode

Array access interface
See also: ArrayAccess::offsetSet()
public offsetSet ( mixed $key, mixed $value ) : void
$key mixed Name
$value mixed Value
Résultat void

offsetUnset() public méthode

Array access interface
See also: ArrayAccess::offsetUnset()
public offsetUnset ( mixed $key ) : void
$key mixed Name
Résultat void

Property Details

$message protected_oe property

protected string $message
Résultat string

$object protected_oe property

protected object $object
Résultat object

$reporter protected_oe property

protected callable $reporter
Résultat callable

$string protected_oe property

protected string $string
Résultat string

$version protected_oe property

protected string $version
Résultat string