From 46d1119d6076ae7f2596b7ea56fbe044b9017450 Mon Sep 17 00:00:00 2001
From: megachriz <megachriz@654114.no-reply.drupal.org>
Date: Sun, 27 Dec 2015 19:55:06 +0100
Subject: [PATCH] Issue #2636342 by AndyF, MegaChriz: Improved documentation of
 FeedsConfigurable::__get().

---
 includes/FeedsConfigurable.inc | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/includes/FeedsConfigurable.inc b/includes/FeedsConfigurable.inc
index d809c20f..93ad2eb8 100644
--- a/includes/FeedsConfigurable.inc
+++ b/includes/FeedsConfigurable.inc
@@ -15,6 +15,10 @@ class FeedsNotExistingException extends Exception {
  * Base class for configurable classes. Captures configuration handling, form
  * handling and distinguishes between in-memory configuration and persistent
  * 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 {
 
@@ -139,8 +143,13 @@ abstract class FeedsConfigurable {
   }
 
   /**
-   * Override magic method __get(). Make sure that $this->config goes through
-   * getConfig().
+   * Overrides magic method __get().
+   *
+   * - 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) {
     if ($name == 'config') {
-- 
GitLab