]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-21150 finally we have a general agreement that plugin_renderes now "magically...
authorPetr Skoda <skodak@moodle.org>
Sun, 20 Dec 2009 16:34:18 +0000 (16:34 +0000)
committerPetr Skoda <skodak@moodle.org>
Sun, 20 Dec 2009 16:34:18 +0000 (16:34 +0000)
lib/outputrenderers.php

index 15c2c98d60ba2f6fa38d764da346c7d9f4503867..fe6aa4a1cce3a828816118d8c07139712b0490c8 100644 (file)
@@ -238,10 +238,11 @@ class plugin_renderer_base extends renderer_base {
      * @param string $method
      * @param array $arguments
      * @return mixed
-     *
-     * TODO: this might not be the best idea, see MDL-21148 for pros&cons
      */
     public function __call($method, $arguments) {
+        if (method_exists('renderer_base', $method)) {
+            throw new coding_exception('Protected method called against '.__CLASS__.' :: '.$method);
+        }
         if (method_exists($this->output, $method)) {
             return call_user_func_array(array($this->output, $method), $arguments);
         } else {