added getter and setter to Router to use error layout
This commit is contained in:
@ -18,6 +18,8 @@ class Router
|
||||
|
||||
protected $default_layout = 'Default';
|
||||
|
||||
protected $error_layout = 'Error';
|
||||
|
||||
/**
|
||||
* @var Route
|
||||
*/
|
||||
@ -51,6 +53,24 @@ class Router
|
||||
$this->default_layout = $layout;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the name of error page layout
|
||||
* @param string $layout
|
||||
*/
|
||||
public function setErrorLayout($layout = 'Error')
|
||||
{
|
||||
$this->error_layout = $layout;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns error layout name
|
||||
* @return string Error layout name
|
||||
*/
|
||||
public function getErrorLayout()
|
||||
{
|
||||
return $this->error_layout . 'Layout';
|
||||
}
|
||||
|
||||
public function getRouteName()
|
||||
{
|
||||
return $this->route_name;
|
||||
|
Reference in New Issue
Block a user