MediaWiki REL1_35
|
ArrayAccess implementation that supports deprecating access to certain properties. More...
Public Member Functions | |
__construct (array $initializer, array $deprecatedProperties, string $name, string $component=null) | |
offsetExists ( $offset) | |
offsetGet ( $offset) | |
offsetSet ( $offset, $value) | |
offsetUnset ( $offset) | |
Private Member Functions | |
checkDeprecatedAccess ( $offset, string $fname) | |
Private Attributes | |
string null | $component |
array | $container |
array | $deprecatedProperties |
Map of deprecated property names to deprecation versions. | |
string | $name |
ArrayAccess implementation that supports deprecating access to certain properties.
It behaves mostly as a normal array, however in order to avoid instantiating deprecated properties by default, a callable initializer can be set to the property. It will be executed upon 'get'.
Definition at line 16 of file DeprecatablePropertyArray.php.
MediaWiki\Debug\DeprecatablePropertyArray::__construct | ( | array | $initializer, |
array | $deprecatedProperties, | ||
string | $name, | ||
string | $component = null |
||
) |
array | $initializer | Initial value of the array. |
array | $deprecatedProperties | Map of deprecated property names to versions. |
string | $name | Descriptive identifier for the array |
string | null | $component | Component to which array belongs. If not provided, assumed to be MW Core |
Definition at line 37 of file DeprecatablePropertyArray.php.
References MediaWiki\Debug\DeprecatablePropertyArray\$component, MediaWiki\Debug\DeprecatablePropertyArray\$deprecatedProperties, and MediaWiki\Debug\DeprecatablePropertyArray\$name.
|
private |
string | int | $offset | |
string | $fname |
Definition at line 82 of file DeprecatablePropertyArray.php.
References wfDeprecated().
MediaWiki\Debug\DeprecatablePropertyArray::offsetExists | ( | $offset | ) |
Definition at line 49 of file DeprecatablePropertyArray.php.
MediaWiki\Debug\DeprecatablePropertyArray::offsetGet | ( | $offset | ) |
Definition at line 55 of file DeprecatablePropertyArray.php.
MediaWiki\Debug\DeprecatablePropertyArray::offsetSet | ( | $offset, | |
$value | |||
) |
Definition at line 64 of file DeprecatablePropertyArray.php.
MediaWiki\Debug\DeprecatablePropertyArray::offsetUnset | ( | $offset | ) |
Definition at line 72 of file DeprecatablePropertyArray.php.
|
private |
Definition at line 28 of file DeprecatablePropertyArray.php.
Referenced by MediaWiki\Debug\DeprecatablePropertyArray\__construct().
|
private |
Definition at line 19 of file DeprecatablePropertyArray.php.
|
private |
Map of deprecated property names to deprecation versions.
Definition at line 22 of file DeprecatablePropertyArray.php.
Referenced by MediaWiki\Debug\DeprecatablePropertyArray\__construct().
|
private |
Definition at line 25 of file DeprecatablePropertyArray.php.
Referenced by MediaWiki\Debug\DeprecatablePropertyArray\__construct().