This repository has been archived on 2024-10-25. You can view files and clone it, but cannot push or open issues or pull requests.
Sequenzia/install/ApplicationInstaller/Base.php

47 lines
876 B
PHP
Raw Normal View History

2013-10-27 01:06:58 +02:00
<?php
namespace ApplicationInstaller;
use Rails;
abstract class Base
{
static protected $instance;
static protected $step;
static public function instance()
{
if (!self::$instance) {
self::initialize();
}
return self::$instance;
}
static protected function initialize()
{
Rails::loader()->addPath(dirname(__DIR__));
self::$instance = new Installer();
}
protected function root()
{
return dirname(__DIR__);
}
protected function request()
{
return Rails::application()->dispatcher()->request();
}
protected function refreshPage()
{
$urlFor = new Rails\Routing\UrlFor('root');
header('Location: ' . $urlFor->url());
}
protected function step()
{
return self::$step;
}
}