X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=application%2Finstall%2Fclass_ApplicationHelper.php;h=eead48f5be88dca93746da5bca8de8d581666b6f;hb=f879e5fa8fc0dfa07ef72edba6090c65c197214d;hp=49939771c650ae3b868106a470668706f39d589c;hpb=732f557f4f51ced66c7258445098758e58a08cd0;p=install.git diff --git a/application/install/class_ApplicationHelper.php b/application/install/class_ApplicationHelper.php index 4993977..eead48f 100644 --- a/application/install/class_ApplicationHelper.php +++ b/application/install/class_ApplicationHelper.php @@ -43,17 +43,17 @@ class ApplicationHelper extends BaseApplication implements ManageableApplication /** * The version number of this application */ - private $appVersion = ""; + private $appVersion = ''; /** * The human-readable name for this application */ - private $appName = ""; + private $appName = ''; /** * The short uni*-like name for this application */ - private $shortName = ""; + private $shortName = ''; /** * An instance of a controller @@ -63,7 +63,7 @@ class ApplicationHelper extends BaseApplication implements ManageableApplication /** * An instance of this class */ - private static $thisInstance = null; + private static $selfInstance = null; /** * Protected constructor @@ -78,16 +78,16 @@ class ApplicationHelper extends BaseApplication implements ManageableApplication /** * Getter for an instance of this class * - * @return $thisInstance An instance of this class + * @return $selfInstance An instance of this class */ - public static final function getInstance () { + public static final function getSelfInstance () { // Is the instance there? - if (is_null(self::$thisInstance)) { - self::$thisInstance = new ApplicationHelper(); - } + if (is_null(self::$selfInstance)) { + self::$selfInstance = new ApplicationHelper(); + } // END - if // Return the instance - return self::$thisInstance; + return self::$selfInstance; } /** @@ -160,7 +160,7 @@ class ApplicationHelper extends BaseApplication implements ManageableApplication */ public function buildMasterTemplateName () { // Get short name and add suffix - $masterTemplateName = str_replace("-", "", $this->getAppShortName()) . "_main"; + $masterTemplateName = str_replace('-', '', $this->getAppShortName()) . '_main'; // Return it return $masterTemplateName; @@ -172,6 +172,9 @@ class ApplicationHelper extends BaseApplication implements ManageableApplication * @return void */ public final function entryPoint () { + // Set this application in registry + Registry::getRegistry()->addInstance('app', $this); + // Create a new request object $requestInstance = ObjectFactory::createObjectByName('HttpRequest'); @@ -179,8 +182,8 @@ class ApplicationHelper extends BaseApplication implements ManageableApplication $this->setRequestInstance($requestInstance); // Default response is HTTP (HTML page) and type is "Web" - $response = "http"; - $responseType = "web"; + $response = $this->getResponseTypeFromSystem(); + $responseType = $this->getResponseTypeFromSystem(); // Do we have another response? if ($requestInstance->isRequestElementSet('request')) {