Simplify chat controllers directory stucture

This commit is contained in:
Dmitriy Simushev 2014-06-03 09:55:28 +00:00
parent 6c9734648a
commit 5244480d4c
5 changed files with 15 additions and 19 deletions

View File

@ -15,9 +15,8 @@
* limitations under the License. * limitations under the License.
*/ */
namespace Mibew\Controller\Chat\User; namespace Mibew\Controller\Chat;
use Mibew\Controller\Chat\AbstractController;
use Mibew\Http\Exception\NotFoundException; use Mibew\Http\Exception\NotFoundException;
use Mibew\Settings; use Mibew\Settings;
use Mibew\Thread; use Mibew\Thread;

View File

@ -15,9 +15,8 @@
* limitations under the License. * limitations under the License.
*/ */
namespace Mibew\Controller\Chat\Operator; namespace Mibew\Controller\Chat;
use Mibew\Controller\Chat\AbstractController;
use Mibew\Http\Exception\NotFoundException; use Mibew\Http\Exception\NotFoundException;
use Mibew\Style\PageStyle; use Mibew\Style\PageStyle;
use Mibew\Thread; use Mibew\Thread;
@ -26,7 +25,7 @@ use Symfony\Component\HttpFoundation\Request;
/** /**
* Contains all actions which are related with operator's chat window. * Contains all actions which are related with operator's chat window.
*/ */
class ChatController extends AbstractController class OperatorChatController extends AbstractController
{ {
/** /**
* Process chat pages. * Process chat pages.

View File

@ -15,9 +15,8 @@
* limitations under the License. * limitations under the License.
*/ */
namespace Mibew\Controller\Chat\Operator; namespace Mibew\Controller\Chat;
use Mibew\Controller\Chat\AbstractController;
use Mibew\Database; use Mibew\Database;
use Mibew\Http\Exception\BadRequestException; use Mibew\Http\Exception\BadRequestException;
use Mibew\Http\Exception\NotFoundException; use Mibew\Http\Exception\NotFoundException;

View File

@ -15,9 +15,8 @@
* limitations under the License. * limitations under the License.
*/ */
namespace Mibew\Controller\Chat\User; namespace Mibew\Controller\Chat;
use Mibew\Controller\Chat\AbstractController;
use Mibew\Http\Exception\NotFoundException; use Mibew\Http\Exception\NotFoundException;
use Mibew\Settings; use Mibew\Settings;
use Mibew\Thread; use Mibew\Thread;
@ -26,7 +25,7 @@ use Symfony\Component\HttpFoundation\Request;
/** /**
* Contains all actions which are related with user's chat window. * Contains all actions which are related with user's chat window.
*/ */
class ChatController extends AbstractController class UserChatController extends AbstractController
{ {
/** /**
* Process chat pages. * Process chat pages.

View File

@ -4,7 +4,7 @@
chat_operator: chat_operator:
path: /operator/chat/{thread_id}/{token} path: /operator/chat/{thread_id}/{token}
defaults: defaults:
_controller: Mibew\Controller\Chat\Operator\ChatController::indexAction _controller: Mibew\Controller\Chat\OperatorChatController::indexAction
_access_check: Mibew\AccessControl\Check\LoggedInCheck _access_check: Mibew\AccessControl\Check\LoggedInCheck
requirements: requirements:
thread_id: \d{1,10} thread_id: \d{1,10}
@ -13,7 +13,7 @@ chat_operator:
chat_operator_redirect: chat_operator_redirect:
path: /operator/chat/{thread_id}/{token}/redirect path: /operator/chat/{thread_id}/{token}/redirect
defaults: defaults:
_controller: Mibew\Controller\Chat\Operator\RedirectController::redirectAction _controller: Mibew\Controller\Chat\RedirectController::redirectAction
_access_check: Mibew\AccessControl\Check\LoggedInCheck _access_check: Mibew\AccessControl\Check\LoggedInCheck
requirements: requirements:
thread_id: \d{1,10} thread_id: \d{1,10}
@ -22,7 +22,7 @@ chat_operator_redirect:
chat_operator_start: chat_operator_start:
path: /operator/chat/{thread_id} path: /operator/chat/{thread_id}
defaults: defaults:
_controller: Mibew\Controller\Chat\Operator\ChatController::startAction _controller: Mibew\Controller\Chat\OperatorChatController::startAction
_access_check: Mibew\AccessControl\Check\LoggedInCheck _access_check: Mibew\AccessControl\Check\LoggedInCheck
requirements: requirements:
thread_id: \d{1,10} thread_id: \d{1,10}
@ -30,7 +30,7 @@ chat_operator_start:
chat_operator_redirection_links: chat_operator_redirection_links:
path: /operator/chat/{thread_id}/{token}/redirection-links path: /operator/chat/{thread_id}/{token}/redirection-links
defaults: defaults:
_controller: Mibew\Controller\Chat\Operator\RedirectController::showRedirectionLinksAction _controller: Mibew\Controller\Chat\RedirectController::showRedirectionLinksAction
_access_check: Mibew\AccessControl\Check\LoggedInCheck _access_check: Mibew\AccessControl\Check\LoggedInCheck
requirements: requirements:
thread_id: \d{1,10} thread_id: \d{1,10}
@ -40,7 +40,7 @@ chat_operator_redirection_links:
chat_user: chat_user:
path: /chat/{thread_id}/{token} path: /chat/{thread_id}/{token}
defaults: defaults:
_controller: Mibew\Controller\Chat\User\ChatController::indexAction _controller: Mibew\Controller\Chat\UserChatController::indexAction
requirements: requirements:
thread_id: \d{1,10} thread_id: \d{1,10}
token: \d{1,10} token: \d{1,10}
@ -48,12 +48,12 @@ chat_user:
chat_user_invitation: chat_user_invitation:
path: /chat/invitation path: /chat/invitation
defaults: defaults:
_controller: Mibew\Controller\Chat\User\ChatController::invitationAction _controller: Mibew\Controller\Chat\UserChatController::invitationAction
chat_user_mail: chat_user_mail:
path: /chat/{thread_id}/{token}/mail path: /chat/{thread_id}/{token}/mail
defaults: defaults:
_controller: Mibew\Controller\Chat\User\MailController::showFormAction _controller: Mibew\Controller\Chat\MailController::showFormAction
requirements: requirements:
thread_id: \d{1,10} thread_id: \d{1,10}
token: \d{1,10} token: \d{1,10}
@ -62,7 +62,7 @@ chat_user_mail:
chat_user_mail_send: chat_user_mail_send:
path: /chat/{thread_id}/{token}/mail path: /chat/{thread_id}/{token}/mail
defaults: defaults:
_controller: Mibew\Controller\Chat\User\MailController::submitFormAction _controller: Mibew\Controller\Chat\MailController::submitFormAction
requirements: requirements:
thread_id: \d{1,10} thread_id: \d{1,10}
token: \d{1,10} token: \d{1,10}
@ -71,7 +71,7 @@ chat_user_mail_send:
chat_user_start: chat_user_start:
path: /chat path: /chat
defaults: defaults:
_controller: Mibew\Controller\Chat\User\ChatController::startAction _controller: Mibew\Controller\Chat\UserChatController::startAction
# Pages that are available for all users # Pages that are available for all users
button: button: