From 1f94cd245550a6e7ec91e7bfb443ae66ae29ec90 Mon Sep 17 00:00:00 2001 From: Dominique Fournier Date: Tue, 25 Mar 2014 13:25:23 +0000 Subject: [PATCH] Simplify outputhtml.php (Removing the Reflexion). Use a require_once instead of require git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1249 bf3deb0d-5f1a-0410-827f-c0cc1f45334c --- outputhtml.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/outputhtml.php b/outputhtml.php index 7ad3214..ac36be8 100644 --- a/outputhtml.php +++ b/outputhtml.php @@ -30,9 +30,9 @@ class outputhtml extends output $resView = $data; if ($viewClass !== FALSE && $viewMethod !== FALSE) { - require ("views/$viewClass.php"); - $reflection = new ReflectionMethod ($viewClass, $viewMethod); - $resView = $reflection->invokeArgs (new $viewClass, array ($data)); + require_once ("views/$viewClass.php"); + $obj = new $viewClass; + $resView = $obj->$viewMethod ($data); } if ($layout !== FALSE)