Add NAMESPACE support (not activated, but just needed to add the namespace on top of file)
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@4630 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
15
renderer.php
15
renderer.php
@@ -27,14 +27,13 @@ class renderer
|
||||
$this->output */
|
||||
public function run ()
|
||||
{
|
||||
if (!@require_once ("domframework/output$this->output.php"))
|
||||
throw new \Exception ("Renderer '$this->output' not found", 500);
|
||||
$class = "output$this->output";
|
||||
$reflection = new \ReflectionMethod ($class, "out");
|
||||
$res = $reflection->invokeArgs (new $class,
|
||||
array ($this->result, $this->title,
|
||||
$this->viewClass, $this->viewMethod, $this->layout,
|
||||
$this->replacement, $this->variable));
|
||||
require_once ("domframework/outputhtml.php");
|
||||
$class = __NAMESPACE__."\\output$this->output";
|
||||
$obj = new $class ();
|
||||
$res = call_user_func_array (array ($obj, "out"),
|
||||
array ($this->result, $this->title,
|
||||
$this->viewClass, $this->viewMethod, $this->layout,
|
||||
$this->replacement, $this->variable));
|
||||
echo $res;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user