tPropertyGetter
MMO\core\classes · 1 symbol · generated 5 Oct 2026
tPropertyGetter
tPropertyGetter.php:14Trait to make protected and private properties readable from outside the class, as $obj->propertyName, through PHP's __get/__isset magic methods. Properties remain read-only from the outside: nothing in this trait implements __set, so $obj->propertyName = ... still fails with PHP's own visibility error.
- Namespace
MMO\core\classes
Index
| __get($key) | __get -- allow read access to a protected/private property from outside the class. | |
| __isset($key) | __isset |
Methods2
__get($key)
tPropertyGetter.php:25__get -- allow read access to a protected/private property from outside the class.
| $key | ||
| returns | ||
| throws | if no such property exists at all (a declared-but-uninitialized typed property is returned as-is here, and would raise PHP's own "must not be accessed before initialization" error, not this exception) |
__isset($key)
tPropertyGetter.php:36__isset
| $key | ||
| returns |