From 236703389e48d303d81863f40cf5a1c1bf1dc4a7 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Fri, 1 Apr 2016 22:16:21 +0200 Subject: [PATCH] Routings moved to routing files --- Admin/Routes/console.php | 3 + Admin/Routes/http.php | 132 +++++++++++++++++++++++++++++++++++++++ Admin/Routes/socket.php | 3 + Controller.php | 29 --------- 4 files changed, 138 insertions(+), 29 deletions(-) create mode 100644 Admin/Routes/console.php create mode 100644 Admin/Routes/http.php create mode 100644 Admin/Routes/socket.php diff --git a/Admin/Routes/console.php b/Admin/Routes/console.php new file mode 100644 index 0000000..45b4afe --- /dev/null +++ b/Admin/Routes/console.php @@ -0,0 +1,3 @@ + [ + [ + 'dest' => '\Modules\Accounting\Controller:viewPersonalEntries', + 'verb' => RouteVerb::GET, + 'result' => ViewType::HTML, + 'layout' => ViewLayout::MAIN, + ], + ], + '^.*/backend/accounting/impersonal/entries.*$' => [ + [ + 'dest' => '\Modules\Accounting\Controller:viewImpersonalEntries', + 'verb' => RouteVerb::GET, + 'result' => ViewType::HTML, + 'layout' => ViewLayout::MAIN, + ], + ], + '^.*/backend/accounting/entries.*$' => [ + [ + 'dest' => '\Modules\Accounting\Controller:viewEntries', + 'verb' => RouteVerb::GET, + 'result' => ViewType::HTML, + 'layout' => ViewLayout::MAIN, + ], + ], + '^.*/backend/accounting/impersonal/journal/list.*$' => [ + [ + 'dest' => '\Modules\Accounting\Controller:viewJournalList', + 'verb' => RouteVerb::GET, + 'result' => ViewType::HTML, + 'layout' => ViewLayout::MAIN, + ], + ], + '^.*/backend/accounting/stack/list.*$' => [ + [ + 'dest' => '\Modules\Accounting\Controller:viewStackList', + 'verb' => RouteVerb::GET, + 'result' => ViewType::HTML, + 'layout' => ViewLayout::MAIN, + ], + ], + '^.*/backend/accounting/stack/entries.*$' => [ + [ + 'dest' => '\Modules\Accounting\Controller:viewStackEntries', + 'verb' => RouteVerb::GET, + 'result' => ViewType::HTML, + 'layout' => ViewLayout::MAIN, + ], + ], + '^.*/backend/accounting/stack/archive/list.*$' => [ + [ + 'dest' => '\Modules\Accounting\Controller:viewStackArchiveList', + 'verb' => RouteVerb::GET, + 'result' => ViewType::HTML, + 'layout' => ViewLayout::MAIN, + ], + ], + '^.*/backend/accounting/stack/create.*$' => [ + [ + 'dest' => '\Modules\Accounting\Controller:viewStackCreate', + 'verb' => RouteVerb::GET, + 'result' => ViewType::HTML, + 'layout' => ViewLayout::MAIN, + ], + ], + '^.*/backend/accounting/stack/predefined/list.*$' => [ + [ + 'dest' => '\Modules\Accounting\Controller:viewStackPredefinedList', + 'verb' => RouteVerb::GET, + 'result' => ViewType::HTML, + 'layout' => ViewLayout::MAIN, + ], + ], + '^.*/backend/accounting/gl/list.*$' => [ + [ + 'dest' => '\Modules\Accounting\Controller:viewGLList', + 'verb' => RouteVerb::GET, + 'result' => ViewType::HTML, + 'layout' => ViewLayout::MAIN, + ], + ], + '^.*/backend/accounting/gl/create.*$' => [ + [ + 'dest' => '\Modules\Accounting\Controller:viewGLCreate', + 'verb' => RouteVerb::GET, + 'result' => ViewType::HTML, + 'layout' => ViewLayout::MAIN, + ], + ], + '^.*/backend/accounting/gl/profile.*$' => [ + [ + 'dest' => '\Modules\Accounting\Controller:viewGLProfile', + 'verb' => RouteVerb::GET, + 'result' => ViewType::HTML, + 'layout' => ViewLayout::MAIN, + ], + ], + '^.*/api/accounting/dun/print.*$' => [ + [ + 'dest' => '\Modules\Accounting\Controller:viewCostCenterProfile', + 'verb' => RouteVerb::GET, + 'result' => ViewType::HTML, + 'layout' => ViewLayout::MAIN, + ], + ], + '^.*/api/accounting/statement/print.*$' => [ + [ + 'dest' => '\Modules\Accounting\Controller:viewCostCenterProfile', + 'verb' => RouteVerb::GET, + 'result' => ViewType::HTML, + 'layout' => ViewLayout::MAIN, + ], + ], + '^.*/api/accounting/balances/print.*$' => [ + [ + 'dest' => '\Modules\Accounting\Controller:viewCostCenterProfile', + 'verb' => RouteVerb::GET, + 'result' => ViewType::HTML, + 'layout' => ViewLayout::MAIN, + ], + ], + '^.*/api/accounting/accountform/print.*$' => [ + [ + 'dest' => '\Modules\Accounting\Controller:viewCostCenterProfile', + 'verb' => RouteVerb::GET, + 'result' => ViewType::HTML, + 'layout' => ViewLayout::MAIN, + ], + ], +]; diff --git a/Admin/Routes/socket.php b/Admin/Routes/socket.php new file mode 100644 index 0000000..d80e21c --- /dev/null +++ b/Admin/Routes/socket.php @@ -0,0 +1,3 @@ + [''], ]; - /** - * Routing elements. - * - * @var array - * @since 1.0.0 - */ - protected static $routes = [ - '^.*/backend/accounting/personal/entries.*$' => [['dest' => '\Modules\Accounting\Controller:viewPersonalEntries', 'method' => 'GET', 'type' => ViewLayout::MAIN],], - '^.*/backend/accounting/impersonal/entries.*$' => [['dest' => '\Modules\Accounting\Controller:viewImpersonalEntries', 'method' => 'GET', 'type' => ViewLayout::MAIN],], - '^.*/backend/accounting/entries.*$' => [['dest' => '\Modules\Accounting\Controller:viewEntries', 'method' => 'GET', 'type' => ViewLayout::MAIN],], - - '^.*/backend/accounting/impersonal/journal/list.*$' => [['dest' => '\Modules\Accounting\Controller:viewJournalList', 'method' => 'GET', 'type' => ViewLayout::MAIN],], - - '^.*/backend/accounting/stack/list.*$' => [['dest' => '\Modules\Accounting\Controller:viewStackList', 'method' => 'GET', 'type' => ViewLayout::MAIN],], - '^.*/backend/accounting/stack/entries.*$' => [['dest' => '\Modules\Accounting\Controller:viewStackEntries', 'method' => 'GET', 'type' => ViewLayout::MAIN],], - '^.*/backend/accounting/stack/archive/list.*$' => [['dest' => '\Modules\Accounting\Controller:viewStackArchiveList', 'method' => 'GET', 'type' => ViewLayout::MAIN],], - '^.*/backend/accounting/stack/create.*$' => [['dest' => '\Modules\Accounting\Controller:viewStackCreate', 'method' => 'GET', 'type' => ViewLayout::MAIN],], - '^.*/backend/accounting/stack/predefined/list.*$' => [['dest' => '\Modules\Accounting\Controller:viewStackPredefinedList', 'method' => 'GET', 'type' => ViewLayout::MAIN],], - - '^.*/backend/accounting/gl/list.*$' => [['dest' => '\Modules\Accounting\Controller:viewGLList', 'method' => 'GET', 'type' => ViewLayout::MAIN],], - '^.*/backend/accounting/gl/create.*$' => [['dest' => '\Modules\Accounting\Controller:viewGLCreate', 'method' => 'GET', 'type' => ViewLayout::MAIN],], - '^.*/backend/accounting/gl/profile.*$' => [['dest' => '\Modules\Accounting\Controller:viewGLProfile', 'method' => 'GET', 'type' => ViewLayout::MAIN],], - - '^.*/api/accounting/dun/print.*$' => [['dest' => '\Modules\Accounting\Controller:viewCostCenterProfile', 'method' => 'GET', 'type' => ViewLayout::MAIN],], - '^.*/api/accounting/statement/print.*$' => [['dest' => '\Modules\Accounting\Controller:viewCostCenterProfile', 'method' => 'GET', 'type' => ViewLayout::MAIN],], - '^.*/api/accounting/balances/print.*$' => [['dest' => '\Modules\Accounting\Controller:viewCostCenterProfile', 'method' => 'GET', 'type' => ViewLayout::MAIN],], - '^.*/api/accounting/accountform/print.*$' => [['dest' => '\Modules\Accounting\Controller:viewCostCenterProfile', 'method' => 'GET', 'type' => ViewLayout::MAIN],], - ]; - /** * Providing. *