Skip to content
Snippets Groups Projects
Commit 46d1119d authored by megachriz's avatar megachriz Committed by MegaChriz
Browse files

Issue #2636342 by AndyF, MegaChriz: Improved documentation of FeedsConfigurable::__get().

parent a885a625
No related branches found
No related tags found
No related merge requests found
...@@ -15,6 +15,10 @@ class FeedsNotExistingException extends Exception { ...@@ -15,6 +15,10 @@ class FeedsNotExistingException extends Exception {
* Base class for configurable classes. Captures configuration handling, form * Base class for configurable classes. Captures configuration handling, form
* handling and distinguishes between in-memory configuration and persistent * handling and distinguishes between in-memory configuration and persistent
* configuration. * configuration.
*
* Due to the magic method __get(), protected properties from this class and
* from classes that extend this class will be publicly readable (but not
* writeable).
*/ */
abstract class FeedsConfigurable { abstract class FeedsConfigurable {
...@@ -139,8 +143,13 @@ abstract class FeedsConfigurable { ...@@ -139,8 +143,13 @@ abstract class FeedsConfigurable {
} }
/** /**
* Override magic method __get(). Make sure that $this->config goes through * Overrides magic method __get().
* getConfig(). *
* - Makes sure that external reads of FeedsConfigurable::config go through
* ::getConfig();
* - Makes private and protected properties from this class and protected
* properties from child classes publicly readable.
* - Prevents warnings when accessing non-existent properties.
*/ */
public function __get($name) { public function __get($name) {
if ($name == 'config') { if ($name == 'config') {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment