diff --git a/modules/welcome/controllers/welcome.php b/modules/welcome/controllers/welcome.php index 9601cbe..2cbe222 100644 --- a/modules/welcome/controllers/welcome.php +++ b/modules/welcome/controllers/welcome.php @@ -23,4 +23,13 @@ class Welcome extends MM_Controller { $this->output->set_output($output); } + + function reflect() + { + $this->r = new R($this); + + $obj = $this->r->get_all(); + + $this->output->set_output($this->__toString('print_r', $obj)); + } } \ No newline at end of file diff --git a/modules/welcome/models/welcome_model.php b/modules/welcome/models/welcome_model.php index d3f4e40..b8b6b95 100644 --- a/modules/welcome/models/welcome_model.php +++ b/modules/welcome/models/welcome_model.php @@ -1,6 +1,6 @@ $name)) + { + //Add $this object to args + array_push($args, $this); + + //Call the dynamic function + return call_user_func_array($this->$name, $args); + } + } + + /** + * Retrieve as much information about the class as possible + */ + public function get_all() + { + $this->methods = $this->getMethods(); + $this->properties = $this->getProperties(); + $this->doc_comments = $this->getDocComment(); + $this->parent_class = $this->getParentClass(); + $this->static_properties = $this->getStaticProperties(); + $this->internal = (int)$this->isInternal(); + + return $this; + } + +} \ No newline at end of file