The PHP Classes are now with backslash
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@4490 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
12
renderer.php
12
renderer.php
@@ -28,9 +28,9 @@ class renderer
|
||||
public function run ()
|
||||
{
|
||||
if (!@require_once ("domframework/output$this->output.php"))
|
||||
throw new Exception ("Renderer '$this->output' not found", 500);
|
||||
throw new \Exception ("Renderer '$this->output' not found", 500);
|
||||
$class = "output$this->output";
|
||||
$reflection = new ReflectionMethod ($class, "out");
|
||||
$reflection = new \ReflectionMethod ($class, "out");
|
||||
$res = $reflection->invokeArgs (new $class,
|
||||
array ($this->result, $this->title,
|
||||
$this->viewClass, $this->viewMethod, $this->layout,
|
||||
@@ -67,13 +67,13 @@ class renderer
|
||||
echo "ERROR: $message\n";
|
||||
break;
|
||||
default:
|
||||
throw new Exception ("Unknown flash priority '$priority'", 500);
|
||||
throw new \Exception ("Unknown flash priority '$priority'", 500);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (! isset ($_SESSION))
|
||||
throw new Exception ("No session available to store flash", 500);
|
||||
throw new \Exception ("No session available to store flash", 500);
|
||||
switch ($priority)
|
||||
{
|
||||
case 1:
|
||||
@@ -93,7 +93,7 @@ class renderer
|
||||
$_SESSION["renderer"]["flash"][] = array (4, $message);
|
||||
break;
|
||||
default:
|
||||
throw new Exception ("Unknown flash priority '$priority'", 500);
|
||||
throw new \Exception ("Unknown flash priority '$priority'", 500);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -111,7 +111,7 @@ class renderer
|
||||
$layoutfile = "views/layout.html", $route = null)
|
||||
{
|
||||
if ($layoutfile !== false && ! file_exists ($layoutfile))
|
||||
throw new Exception ("Layout file $layoutfile not found", 500);
|
||||
throw new \Exception ("Layout file $layoutfile not found", 500);
|
||||
require_once ("domframework/outputhtml.php");
|
||||
if ($route === null)
|
||||
$route = new route ();
|
||||
|
||||
Reference in New Issue
Block a user