1234567891011121314151617181920212223242526 |
- <?php
- class InstallRoute implements IRoute
- {
- public static function getInstance()
- {
- return new InstallRoute(new View(), new HeaderWrapper());
- }
- private $view;
- private $header;
- private function __construct(View $view, HeaderWrapper $header)
- {
- $this->view = $view;
- $this->header = $header;
- }
- public function run(Url $url)
- {
- if(!file_exists(APPROOT . "setup/install.php"))
- {
- $this->header->location("/");
- }
- return $this->view->render("../setup/install.php", array());
- }
- }
|