| @@ 959-966 (lines=8) @@ | ||
| 956 | */ |
|
| 957 | public function setControllerName($controllerName) |
|
| 958 | { |
|
| 959 | if (null === $controllerName) { |
|
| 960 | $this->controllerName = null; |
|
| 961 | } elseif (preg_match(self::SANE_CONTROLLER_NAME, $controllerName)) { |
|
| 962 | $controllerName = Toolkit::canonicalName($controllerName); |
|
| 963 | $this->controllerName = $controllerName; |
|
| 964 | } else { |
|
| 965 | throw new AgaviException(sprintf('Invalid controller name "%1$s"', $controllerName)); |
|
| 966 | } |
|
| 967 | } |
|
| 968 | ||
| 969 | /** |
|
| @@ 998-1005 (lines=8) @@ | ||
| 995 | */ |
|
| 996 | public function setViewName($viewName) |
|
| 997 | { |
|
| 998 | if (null === $viewName) { |
|
| 999 | $this->viewName = null; |
|
| 1000 | } elseif (preg_match(self::SANE_VIEW_NAME, $viewName)) { |
|
| 1001 | $viewName = Toolkit::canonicalName($viewName); |
|
| 1002 | $this->viewName = $viewName; |
|
| 1003 | } else { |
|
| 1004 | throw new AgaviException(sprintf('Invalid view name "%1$s"', $viewName)); |
|
| 1005 | } |
|
| 1006 | } |
|
| 1007 | ||
| 1008 | /** |
|