{ $this->setParams($params); $this->_templateName = $action; $methodName = $action . 'Action'; if (method_exists($this, $methodName)) { $this->$methodName(); // tu jest require dla layout'u, może ktoś wie jak powiedzieć php żeby ponownie nie uruchamiać tego require'a, domyślam się ze trzeba zastosować odpowiednią instrukcję warunkową, ale jak ma wyglądac to niestety nie wiem, dlatego proszę o pomoc require_once PROJECT_DIRECTORY . DIRECTORY_SEPARATOR . 'views' . DIRECTORY_SEPARATOR . 'layouts' . DIRECTORY_SEPARATOR . $this->_layoutName . '.phtml'; } else { $controller->run('notfound', $this->getParams()); } }
może będzie ktoś w stanie mi doradzić jak sobie z tym poradzić;