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
This commit is contained in:
2014-03-25 13:25:23 +00:00
parent 350aa1dea8
commit 1f94cd2455

View File

@@ -30,9 +30,9 @@ class outputhtml extends output
$resView = $data; $resView = $data;
if ($viewClass !== FALSE && $viewMethod !== FALSE) if ($viewClass !== FALSE && $viewMethod !== FALSE)
{ {
require ("views/$viewClass.php"); require_once ("views/$viewClass.php");
$reflection = new ReflectionMethod ($viewClass, $viewMethod); $obj = new $viewClass;
$resView = $reflection->invokeArgs (new $viewClass, array ($data)); $resView = $obj->$viewMethod ($data);
} }
if ($layout !== FALSE) if ($layout !== FALSE)