Commit 121fc34e authored by Tino Goratsch's avatar Tino Goratsch

moved some classes around

parent a7c6fd78
......@@ -2,6 +2,7 @@
namespace ACP3\Core;
use ACP3\Core\Http\RequestInterface;
use ACP3\Core\Modules;
use ACP3\Core\Logger as ACP3Logger;
use Monolog\ErrorHandler;
......@@ -102,7 +103,7 @@ class Application extends AbstractApplication
/**
* Checks, whether the maintenance mode is active
*
* @param \ACP3\Core\RequestInterface $request
* @param \ACP3\Core\Http\RequestInterface $request
*
* @return bool
*/
......@@ -197,7 +198,7 @@ class Application extends AbstractApplication
*/
public function outputPage()
{
/** @var \ACP3\Core\Request $request */
/** @var \ACP3\Core\Http\Request $request */
$request = $this->container->get('core.request');
$request->processQuery();
......
......@@ -14,7 +14,7 @@ class PageCssClasses
*/
protected $breadcrumb;
/**
* @var \ACP3\Core\RequestInterface
* @var \ACP3\Core\Http\RequestInterface
*/
protected $request;
......@@ -33,11 +33,11 @@ class PageCssClasses
/**
* @param \ACP3\Core\Breadcrumb $breadcrumb
* @param \ACP3\Core\RequestInterface $request
* @param \ACP3\Core\Http\RequestInterface $request
*/
public function __construct(
Core\Breadcrumb $breadcrumb,
Core\RequestInterface $request
Core\Http\RequestInterface $request
)
{
$this->breadcrumb = $breadcrumb;
......
<?php
namespace ACP3\Core;
use ACP3\Core\Http\RequestInterface;
use ACP3\Modules\ACP3\Menus;
use Symfony\Component\DependencyInjection\Container;
......@@ -50,7 +51,7 @@ class Breadcrumb
*/
protected $lang;
/**
* @var \ACP3\Core\RequestInterface
* @var \ACP3\Core\Http\RequestInterface
*/
protected $request;
/**
......@@ -69,7 +70,7 @@ class Breadcrumb
/**
* @param \Symfony\Component\DependencyInjection\Container $container
* @param \ACP3\Core\Lang $lang
* @param \ACP3\Core\RequestInterface $request
* @param \ACP3\Core\Http\RequestInterface $request
* @param \ACP3\Core\Router $router
* @param \ACP3\Core\Config $config
*/
......
......@@ -3,6 +3,7 @@
namespace ACP3\Core;
use ACP3\Core\Helpers\Forms;
use ACP3\Core\Http\RequestInterface;
/**
* Stellt Funktionen zur Datumsformatierung und Ausrichtung an den Zeitzonen bereit
......@@ -34,7 +35,7 @@ class Date
*/
protected $lang;
/**
* @var \ACP3\Core\RequestInterface
* @var \ACP3\Core\Http\RequestInterface
*/
protected $request;
/**
......@@ -53,7 +54,7 @@ class Date
/**
* @param \ACP3\Core\Auth $auth
* @param \ACP3\Core\Lang $lang
* @param \ACP3\Core\RequestInterface $request
* @param \ACP3\Core\Http\RequestInterface $request
* @param \ACP3\Core\Helpers\Forms $formsHelper
* @param \ACP3\Core\Validator\Rules\Date $dateValidator
* @param \ACP3\Core\Config $config
......
<?php
namespace ACP3\Core;
use ACP3\Core\Http\RequestInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
/**
......@@ -72,7 +73,7 @@ class FrontController
* Checks, whether there is an URI alias available for the current request.
* If so, set the alias as the canonical URI
*
* @param \ACP3\Core\RequestInterface $request
* @param \ACP3\Core\Http\RequestInterface $request
*/
private function _checkForUriAlias(RequestInterface $request)
{
......
......@@ -18,17 +18,17 @@ class Alerts
*/
protected $view;
/**
* @var \ACP3\Core\RequestInterface
* @var \ACP3\Core\Http\RequestInterface
*/
protected $request;
/**
* @param \ACP3\Core\RequestInterface $request
* @param \ACP3\Core\Http\RequestInterface $request
* @param \ACP3\Core\View $view
* @param \ACP3\Core\Helpers\Output $outputHelper
*/
public function __construct(
Core\RequestInterface $request,
Core\Http\RequestInterface $request,
Core\View $view,
Core\Helpers\Output $outputHelper
) {
......
......@@ -10,7 +10,7 @@ use ACP3\Core;
class FormToken
{
/**
* @var \ACP3\Core\RequestInterface
* @var \ACP3\Core\Http\RequestInterface
*/
protected $request;
/**
......@@ -23,12 +23,12 @@ class FormToken
protected $view;
/**
* @param \ACP3\Core\RequestInterface $request
* @param \ACP3\Core\Http\RequestInterface $request
* @param \ACP3\Core\SessionHandler $sessionHandler
* @param \ACP3\Core\View $view
*/
public function __construct(
Core\RequestInterface $request,
Core\Http\RequestInterface $request,
Core\SessionHandler $sessionHandler,
Core\View $view
)
......
<?php
namespace ACP3\Core\Helpers;
use ACP3\Core\Request;
use ACP3\Core\RequestInterface;
use ACP3\Core\Http\Request;
use ACP3\Core\Http\RequestInterface;
/**
* Class Forms
......@@ -10,12 +10,12 @@ use ACP3\Core\RequestInterface;
class Forms
{
/**
* @var \ACP3\Core\RequestInterface
* @var \ACP3\Core\Http\RequestInterface
*/
protected $request;
/**
* @param \ACP3\Core\RequestInterface $request
* @param \ACP3\Core\Http\RequestInterface $request
*/
public function __construct(RequestInterface $request)
{
......
......@@ -10,7 +10,7 @@ use ACP3\Core;
class RedirectMessages
{
/**
* @var \ACP3\Core\RequestInterface
* @var \ACP3\Core\Http\RequestInterface
*/
private $request;
/**
......@@ -28,13 +28,13 @@ class RedirectMessages
/**
* @param \ACP3\Core\Redirect $redirect
* @param \ACP3\Core\RequestInterface $request
* @param \ACP3\Core\Http\RequestInterface $request
* @param \ACP3\Core\SessionHandler $sessionHandler
* @param \ACP3\Core\View $view
*/
public function __construct(
Core\Redirect $redirect,
Core\RequestInterface $request,
Core\Http\RequestInterface $request,
Core\SessionHandler $sessionHandler,
Core\View $view
)
......
......@@ -22,7 +22,7 @@ class TableOfContents
*/
protected $seo;
/**
* @var \ACP3\Core\RequestInterface
* @var \ACP3\Core\Http\RequestInterface
*/
protected $request;
/**
......@@ -42,7 +42,7 @@ class TableOfContents
* @param \ACP3\Core\Breadcrumb $breadcrumb
* @param \ACP3\Core\Lang $lang
* @param \ACP3\Core\SEO $seo
* @param \ACP3\Core\RequestInterface $request
* @param \ACP3\Core\Http\RequestInterface $request
* @param \ACP3\Core\Router $router
* @param \ACP3\Core\Validator\Rules\Misc $validate
* @param \ACP3\Core\View $view
......@@ -51,7 +51,7 @@ class TableOfContents
Core\Breadcrumb $breadcrumb,
Core\Lang $lang,
Core\SEO $seo,
Core\RequestInterface $request,
Core\Http\RequestInterface $request,
Core\Router $router,
Core\Validator\Rules\Misc $validate,
Core\View $view
......
<?php
namespace ACP3\Core;
namespace ACP3\Core\Http;
use ACP3\Core\Request\FilesParameterBag;
use ACP3\Core\Request\ParameterBag;
use ACP3\Core\Http\Request\FilesParameterBag;
use ACP3\Core\http\Request\ParameterBag;
/**
* Class AbstractRequest
* @package ACP3\Core
* @package ACP3\Core\Http
*/
abstract class AbstractRequest implements RequestInterface
{
......@@ -99,7 +99,7 @@ abstract class AbstractRequest implements RequestInterface
/**
* Returns the parameter bag of the uploaded files ($_FILES superglobal)
*
* @return \ACP3\Core\Request\ParameterBag
* @return \ACP3\Core\http\Request\ParameterBag
*/
public function getFiles()
{
......@@ -119,7 +119,7 @@ abstract class AbstractRequest implements RequestInterface
/**
* Returns the parameter bag of the $_SERVER superglobal
*
* @return \ACP3\Core\Request\ParameterBag
* @return \ACP3\Core\http\Request\ParameterBag
*/
public function getServer()
{
......
<?php
namespace ACP3\Core;
namespace ACP3\Core\Http;
use ACP3\Core\Request\ParameterBag;
use ACP3\Core\Config;
use ACP3\Core\Modules;
use ACP3\Core\http\Request\ParameterBag;
use ACP3\Modules\ACP3\Seo;
/**
* Class Request
* @package ACP3\Core
* @package ACP3\Core\Http
*/
class Request extends AbstractRequest
{
......
<?php
namespace ACP3\Core\Request;
namespace ACP3\Core\Http\Request;
/**
* Class FilesParameterBag
* @package ACP3\Core\Request
* @package ACP3\Core\Http\Request
*/
class FilesParameterBag extends ParameterBag
{
......
<?php
namespace ACP3\Core\Request;
namespace ACP3\Core\http\Request;
/**
* Class ParameterBag
* @package ACP3\Core\Request
* @package ACP3\Core\http\Request
*/
class ParameterBag
{
......
<?php
namespace ACP3\Core;
namespace ACP3\Core\Http;
use ACP3\Core\Request\ParameterBag;
use ACP3\Core\http\Request\ParameterBag;
/**
* Interface RequestInterface
* @package ACP3\Core
* @package ACP3\Core\Http
*/
interface RequestInterface
{
......@@ -111,7 +111,7 @@ interface RequestInterface
/**
* Returns the parameter bag of the uploaded files ($_FILES superglobal)
*
* @return \ACP3\Core\Request\ParameterBag
* @return \ACP3\Core\http\Request\ParameterBag
*/
public function getFiles();
......@@ -125,7 +125,7 @@ interface RequestInterface
/**
* Returns the parameter bag of the $_SERVER superglobal
*
* @return \ACP3\Core\Request\ParameterBag
* @return \ACP3\Core\http\Request\ParameterBag
*/
public function getServer();
}
\ No newline at end of file
<?php
namespace ACP3\Core\Modules\Controller;
namespace ACP3\Core\Modules;
use ACP3\Core;
use ACP3\Core\Modules\Controller\Context;
/**
* Class Admin
* @package ACP3\Core\Modules\Controller
* Class AdminController
* @package ACP3\Core\Modules
*/
abstract class Admin extends Core\Modules\Controller\Frontend
abstract class AdminController extends Core\Modules\FrontendController
{
/**
* @var \ACP3\Core\SessionHandler
......@@ -20,9 +21,9 @@ abstract class Admin extends Core\Modules\Controller\Frontend
protected $validate;
/**
* @param \ACP3\Core\Context\Admin $adminContext
* @param \ACP3\Core\Modules\Controller\AdminContext $adminContext
*/
public function __construct(Core\Context\Admin $adminContext)
public function __construct(Controller\AdminContext $adminContext)
{
parent::__construct($adminContext);
......
......@@ -32,7 +32,7 @@ abstract class Controller
*/
protected $modules;
/**
* @var \ACP3\Core\Request
* @var \ACP3\Core\Http\Request
*/
protected $request;
/**
......@@ -71,9 +71,9 @@ abstract class Controller
protected $content = '';
/**
* @param Core\Context $context
* @param \ACP3\Core\Modules\Controller\Context $context
*/
public function __construct(Core\Context $context)
public function __construct(Controller\Context $context)
{
$this->acl = $context->getACL();
$this->auth = $context->getAuth();
......
<?php
namespace ACP3\Core\Context;
namespace ACP3\Core\Modules\Controller;
use ACP3\Core;
/**
* Class Admin
* @package ACP3\Core\Context
* Class AdminContext
* @package ACP3\Core\Modules\Controller
*/
class Admin extends Frontend
class AdminContext extends FrontendContext
{
/**
* @var \ACP3\Core\Validator\Rules\Misc
......@@ -19,15 +19,16 @@ class Admin extends Frontend
protected $session;
/**
* @param \ACP3\Core\Context\Frontend $frontendContext
* @param \ACP3\Core\Validator\Rules\Misc $validate
* @param \ACP3\Core\SessionHandler $session
* @param \ACP3\Core\Modules\Controller\FrontendContext $frontendContext
* @param \ACP3\Core\Validator\Rules\Misc $validate
* @param \ACP3\Core\SessionHandler $session
*/
public function __construct(
Core\Context\Frontend $frontendContext,
Core\Modules\Controller\FrontendContext $frontendContext,
Core\Validator\Rules\Misc $validate,
Core\SessionHandler $session
) {
)
{
parent::__construct(
$frontendContext,
$frontendContext->getAssets(),
......
<?php
namespace ACP3\Core;
namespace ACP3\Core\Modules\Controller;
use ACP3\Core\ACL;
use ACP3\Core\Auth;
use ACP3\Core\Config;
use ACP3\Core\Http\RequestInterface;
use ACP3\Core\Lang;
use ACP3\Core\Modules;
use ACP3\Core\Router;
use ACP3\Core\View;
/**
* Class Context
* @package ACP3\Core
* @package ACP3\Core\Modules\Controller
*/
class Context
{
......@@ -24,7 +33,7 @@ class Context
*/
protected $modules;
/**
* @var \ACP3\Core\RequestInterface
* @var \ACP3\Core\Http\RequestInterface
*/
protected $request;
/**
......@@ -41,14 +50,14 @@ class Context
protected $config;
/**
* @param \ACP3\Core\ACL $acl
* @param \ACP3\Core\Auth $auth
* @param \ACP3\Core\Lang $lang
* @param \ACP3\Core\Modules $modules
* @param \ACP3\Core\RequestInterface $request
* @param \ACP3\Core\Router $router
* @param \ACP3\Core\View $view
* @param \ACP3\Core\Config $config
* @param \ACP3\Core\ACL $acl
* @param \ACP3\Core\Auth $auth
* @param \ACP3\Core\Lang $lang
* @param \ACP3\Core\Modules $modules
* @param \ACP3\Core\Http\RequestInterface $request
* @param \ACP3\Core\Router $router
* @param \ACP3\Core\View $view
* @param \ACP3\Core\Config $config
*/
public function __construct(
ACL $acl,
......@@ -59,7 +68,8 @@ class Context
Router $router,
View $view,
Config $config
) {
)
{
$this->acl = $acl;
$this->auth = $auth;
$this->lang = $lang;
......@@ -103,7 +113,7 @@ class Context
}
/**
* @return \ACP3\Core\Request
* @return \ACP3\Core\Http\Request
*/
public function getRequest()
{
......
<?php
namespace ACP3\Core\Context;
namespace ACP3\Core\Modules\Controller;
use ACP3\Core;
use ACP3\Core\Modules\Controller\Context;
/**
* Class Frontend
* @package ACP3\Core\Context
* Class FrontendContext
* @package ACP3\Core\Modules\Controller
*/
class Frontend extends Core\Context
class FrontendContext extends Core\Modules\Controller\Context
{
/**
* @var \ACP3\Core\Assets
......@@ -23,17 +24,18 @@ class Frontend extends Core\Context
protected $seo;
/**
* @param Core\Context $context
* @param Core\Assets $assets
* @param Core\Breadcrumb $breadcrumb
* @param Core\SEO $seo
* @param \ACP3\Core\Modules\Controller\Context $context
* @param \ACP3\Core\Assets $assets
* @param \ACP3\Core\Breadcrumb $breadcrumb
* @param \ACP3\Core\SEO $seo
*/
public function __construct(
Core\Context $context,
Core\Modules\Controller\Context $context,
Core\Assets $assets,
Core\Breadcrumb $breadcrumb,
Core\SEO $seo
) {
)
{
parent::__construct(
$context->getACL(),
$context->getAuth(),
......
<?php
namespace ACP3\Core\Modules\Controller;
namespace ACP3\Core\Modules;
use ACP3\Core;
use ACP3\Core\Modules\Controller\Context;
/**
* Class Frontend
* @package ACP3\Core\Modules\Controller
* Class FrontendController
* @package ACP3\Core\Modules
*/
abstract class Frontend extends Core\Modules\Controller
abstract class FrontendController extends Core\Modules\Controller
{
/**
* @var \ACP3\Core\Assets
......@@ -34,9 +35,9 @@ abstract class Frontend extends Core\Modules\Controller
protected $contentType = 'Content-Type: text/html; charset=UTF-8';
/**
* @param \ACP3\Core\Context\Frontend $frontendContext
* @param \ACP3\Core\Modules\Controller\FrontendContext $frontendContext
*/
public function __construct(Core\Context\Frontend $frontendContext)
public function __construct(Controller\FrontendContext $frontendContext)
{
parent::__construct($frontendContext);
......
<?php
namespace ACP3\Core;
use ACP3\Core\Http\RequestInterface;
use ACP3\Core\Validator\Rules\Misc;
/**
......@@ -26,7 +27,7 @@ class Pagination
*/
protected $seo;
/**
* @var \ACP3\Core\RequestInterface
* @var \ACP3\Core\Http\RequestInterface
*/
protected $request;
/**
......@@ -83,7 +84,7 @@ class Pagination
* @param \ACP3\Core\Breadcrumb $breadcrumb
* @param \ACP3\Core\Lang $lang
* @param \ACP3\Core\SEO $seo
* @param \ACP3\Core\RequestInterface $request
* @param \ACP3\Core\Http\RequestInterface $request
* @param \ACP3\Core\Router $router
* @param \ACP3\Core\View $view
* @param \ACP3\Core\Validator\Rules\Misc $miscValidator
......
<?php
namespace ACP3\Core;
use ACP3\Core\Http\RequestInterface;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\RedirectResponse;
......@@ -11,7 +12,7 @@ use Symfony\Component\HttpFoundation\RedirectResponse;
class Redirect
{
/**
* @var \ACP3\Core\RequestInterface
* @var \ACP3\Core\Http\RequestInterface
*/
protected $request;
/**
......@@ -20,7 +21,7 @@ class Redirect
protected $router;
/**
* @param \ACP3\Core\RequestInterface $request
* @param \ACP3\Core\Http\RequestInterface $request
* @param \ACP3\Core\Router $router
*/
public function __construct(
......
......@@ -2,6 +2,7 @@
namespace ACP3\Core;
use ACP3\Core\Http\RequestInterface;
use ACP3\Core\Router\Aliases;
use ACP3\Modules\ACP3\System;
......@@ -18,7 +19,7 @@ class Router
*/
protected $aliases;
/**
* @var \ACP3\Core\RequestInterface
* @var \ACP3\Core\Http\RequestInterface
*/
protected $request;
/**
......@@ -28,7 +29,7 @@ class Router
/**
* @param \ACP3\Core\Router\Aliases $aliases
* @param \ACP3\Core\RequestInterface $request
* @param \ACP3\Core\Http\RequestInterface $request
* @param \ACP3\Core\Config $config
*/
public function __construct(
......
......@@ -2,6 +2,7 @@
namespace ACP3\Core;
use ACP3\Core\Helpers\Forms;
use ACP3\Core\Http\RequestInterface;
use ACP3\Core\Router\Aliases;
use ACP3\Modules\ACP3\Seo\Cache as SeoCache;
use ACP3\Modules\ACP3\Seo\Model as SeoModel;
......@@ -21,7 +22,7 @@ class SEO
*/
protected $lang;
/**
* @var \ACP3\Core\RequestInterface
* @var \ACP3\Core\Http\RequestInterface
*/
protected $request;
/**
......@@ -64,7 +65,7 @@ class SEO
/**
* @param \ACP3\Core\Lang $lang
* @param \ACP3\Core\RequestInterface $request
* @param \ACP3\Core\Http\RequestInterface $request
* @param \ACP3\Core\Router\Aliases $aliases
* @param \ACP3\Core\Helpers\Forms $formsHelper
* @param \ACP3\Modules\ACP3\Seo\Cache $seoCache
......
......@@ -10,7 +10,7 @@ use ACP3\Core;
class Captcha
{
/**
* @var \ACP3\Core\RequestInterface
* @var \ACP3\Core\Http\RequestInterface
*/
protected $request;
/**
......@@ -23,12 +23,12 @@ class Captcha
protected $sessionHandler;
/**
* @param \ACP3\Core\RequestInterface $request
* @param \ACP3\Core\Http\RequestInterface $request
* @param \ACP3\Core\Router $router
* @param \ACP3\Core\SessionHandler $sessionHandler
*/
public function __construct(
Core\RequestInterface $request,
Core\Http\RequestInterface $request,
Core\Router $router,
Core\SessionHandler $sessionHandler
) {
......
......@@ -2,7 +2,7 @@
namespace ACP3\Core\Validator\Rules;
use ACP3\Core\RequestInterface;
use ACP3\Core\Http\RequestInterface;
use ACP3\Core\SessionHandler;