Commit c90071f5 authored by Tino Goratsch's avatar Tino Goratsch

removed the dev.php --> use an environment variable instead

parent 25dae913
......@@ -4,6 +4,8 @@
</IfModule>
</FilesMatch>
#SetEnv ACP3_APPLICATION_MODE dev
<IfModule mod_rewrite.c>
Options +FollowSymlinks
DirectoryIndex index.php
......@@ -13,4 +15,4 @@
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]
</IfModule>
\ No newline at end of file
</IfModule>
<?php
namespace ACP3\Core\Application;
use ACP3\Core\Environment\ApplicationMode;
use ACP3\Core\Environment\ApplicationPath;
use ACP3\Core\ErrorHandler;
......@@ -27,7 +26,7 @@ abstract class AbstractBootstrap implements BootstrapInterface
/**
* @param string $appMode
*/
public function __construct($appMode = ApplicationMode::PRODUCTION)
public function __construct($appMode)
{
$this->appMode = $appMode;
$this->setAppPath($appMode);
......
<?php
/**
* Debug
*
* @author Tino Goratsch
*/
define('ACP3_ROOT_DIR', realpath(__DIR__) . '/');
require './vendor/autoload.php';
(new \ACP3\Core\Application\Bootstrap(\ACP3\Core\Environment\ApplicationMode::DEVELOPMENT))->run();
\ No newline at end of file
......@@ -9,4 +9,9 @@ define('ACP3_ROOT_DIR', realpath(__DIR__) . '/');
require './vendor/autoload.php';
(new \ACP3\Core\Application\Bootstrap())->run();
$appMode = \ACP3\Core\Environment\ApplicationMode::PRODUCTION;
if (getenv('ACP3_APPLICATION_MODE') === \ACP3\Core\Environment\ApplicationMode::DEVELOPMENT) {
$appMode = \ACP3\Core\Environment\ApplicationMode::DEVELOPMENT;
}
(new \ACP3\Core\Application\Bootstrap($appMode))->run();
......@@ -22,7 +22,7 @@ class Bootstrap extends Core\Application\AbstractBootstrap
*/
public function run()
{
if ($this->appMode === Core\Environment\ApplicationMode::UPDATER && $this->startupChecks() === false) {
if ($this->startupChecks() === false) {
return;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment