Commit b0d713f1 authored by Tino Goratsch's avatar Tino Goratsch

moved the application Bootstrapping files into own namespace

parent ae4a083d
<?php
namespace ACP3\Core;
namespace ACP3\Core\Application;
use ACP3\Core\Application\BootstrapInterface;
use ACP3\Core\Enum\Environment;
use ACP3\Core\ErrorHandler;
use Monolog\Logger;
use Monolog\Formatter\LineFormatter;
use Monolog\Handler\StreamHandler;
/**
* Class AbstractApplication
* @package ACP3\Core
* Class AbstractBootstrap
* @package ACP3\Core\Application
*/
abstract class AbstractApplication implements ApplicationInterface
abstract class AbstractBootstrap implements BootstrapInterface
{
/**
* @var \Symfony\Component\DependencyInjection\ContainerInterface
......
<?php
namespace ACP3\Core;
namespace ACP3\Core\Application;
use ACP3\Core\Application\AbstractBootstrap;
use ACP3\Core\Enum\Environment;
use ACP3\Core\Exceptions;
use ACP3\Core\FrontController;
use ACP3\Core\Http\RequestInterface;
use ACP3\Core\Modules;
use ACP3\Core\Logger as ACP3Logger;
use ACP3\Core\Redirect;
use ACP3\Core\ServiceContainerBuilder;
use Patchwork\Utf8;
use Symfony\Component\Config\ConfigCache;
use Symfony\Component\DependencyInjection\ContainerInterface;
......@@ -13,9 +18,9 @@ use Symfony\Component\DependencyInjection\Dumper\PhpDumper;
/**
* Bootstraps the application
* @package ACP3
* @package ACP3\Core\Application
*/
class Application extends AbstractApplication
class Bootstrap extends AbstractBootstrap
{
/**
* @var array
......
<?php
namespace ACP3\Core;
namespace ACP3\Core\Application;
/**
* Interface ApplicationInterface
* @package ACP3\Core
* Interface BootstrapInterface
* @package ACP3\Core\Application
*/
interface ApplicationInterface
interface BootstrapInterface
{
/**
* Contains the current ACP3 version string
......
<?php
namespace ACP3\Core;
use ACP3\Core\Application\Bootstrap;
/**
* Parses XML files
......@@ -37,7 +38,7 @@ class XML
if ($value->attributes()) {
foreach ($value->attributes() as $attrKey => $attrValue) {
if ($key === 'version' && $attrKey === 'core' && (string)$attrValue === 'true') {
$this->info[$path][$xpath]['version'] = Application::VERSION;
$this->info[$path][$xpath]['version'] = Bootstrap::VERSION;
} else {
$this->info[$path][$xpath][(string)$key][(string)$attrKey] = (string)$attrValue;
}
......
<?php
namespace kcfinder\cms;
use ACP3\Core\Application;
use ACP3\Core\Application\Bootstrap;
/**
* Class ACP3
......@@ -27,7 +27,7 @@ class ACP3
require_once ACP3_ROOT_DIR . 'vendor/autoload.php';
$application = new Application();
$application = new Bootstrap();
$application->defineDirConstants();
if ($application->startupChecks()) {
$application->initializeClasses();
......
......@@ -57,7 +57,7 @@ class Maintenance extends Core\Modules\AdminController
$data = explode('||', $file);
if (count($data) === 2) {
$update = [
'installed_version' => Core\ApplicationInterface::VERSION,
'installed_version' => Core\Application\BootstrapInterface::VERSION,
'current_version' => $data[0],
];
......
......@@ -9,4 +9,4 @@ define('ACP3_ROOT_DIR', realpath(__DIR__) . '/');
require './vendor/autoload.php';
(new \ACP3\Core\Application(\ACP3\Core\Enum\Environment::DEVELOPMENT))->run();
\ No newline at end of file
(new \ACP3\Core\Application\Bootstrap(\ACP3\Core\Enum\Environment::DEVELOPMENT))->run();
\ No newline at end of file
......@@ -9,4 +9,4 @@ define('ACP3_ROOT_DIR', realpath(__DIR__) . '/');
require './vendor/autoload.php';
(new \ACP3\Core\Application())->run();
\ No newline at end of file
(new \ACP3\Core\Application\Bootstrap())->run();
\ No newline at end of file
<?php
namespace ACP3\Installer\Core;
namespace ACP3\Installer\Core\Application;
use ACP3\Core;
use ACP3\Installer\Core\FrontController;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
use Symfony\Component\Config\FileLocator;
/**
* Class Application
* @package ACP3\Installer
* Class Bootstrap
* @package ACP3\Installer\Core\Application
*/
class Application extends Core\AbstractApplication
class Bootstrap extends Core\Application\AbstractBootstrap
{
/**
* @inheritdoc
......
......@@ -9,4 +9,4 @@ define('ACP3_ROOT_DIR', realpath(__DIR__ . '/../') . '/');
require '../vendor/autoload.php';
(new \ACP3\Installer\Core\Application(\ACP3\Core\Enum\Environment::INSTALLER))->run();
(new \ACP3\Installer\Core\Application\Bootstrap(\ACP3\Core\Enum\Environment::INSTALLER))->run();
......@@ -9,4 +9,4 @@ define('ACP3_ROOT_DIR', realpath(__DIR__ . '/../') . '/');
require '../vendor/autoload.php';
(new \ACP3\Installer\Core\Application(\ACP3\Core\Enum\Environment::UPDATER))->run();
\ No newline at end of file
(new \ACP3\Installer\Core\Application\Bootstrap(\ACP3\Core\Enum\Environment::UPDATER))->run();
\ No newline at end of file
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