Move Order controllers to same namespace

This commit is contained in:
Benoît Burnichon
2016-03-18 11:10:06 +01:00
parent 65550e8bd1
commit a547a04aa6
2 changed files with 7 additions and 9 deletions

View File

@@ -13,8 +13,8 @@ namespace Alchemy\Phrasea\ControllerProvider\Prod;
use Alchemy\Phrasea\Application as PhraseaApplication;
use Alchemy\Phrasea\Controller\LazyLocator;
use Alchemy\Phrasea\Controller\Prod\OrderController;
use Alchemy\Phrasea\ControllerProvider\ControllerProviderTrait;
use Alchemy\Phrasea\Order\Controller\ProdOrderController;
use Alchemy\Phrasea\Order\OrderBasketProvider;
use Alchemy\Phrasea\Order\OrderValidator;
use Silex\Application;
@@ -39,7 +39,7 @@ class Order implements ControllerProviderInterface, ServiceProviderInterface
});
$app['controller.prod.order'] = $app->share(function (PhraseaApplication $app) {
return (new OrderController($app))
return (new ProdOrderController($app))
->setDispatcher($app['dispatcher'])
->setEntityManagerLocator(new LazyLocator($app, 'orm.em'))
->setUserQueryFactory(new LazyLocator($app, 'phraseanet.user-query'))

View File

@@ -1,5 +1,5 @@
<?php
/*
/**
* This file is part of Phraseanet
*
* (c) 2005-2016 Alchemy
@@ -7,20 +7,18 @@
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Alchemy\Phrasea\Controller\Prod;
namespace Alchemy\Phrasea\Order\Controller;
use Alchemy\Phrasea\Application\Helper\DispatcherAware;
use Alchemy\Phrasea\Application\Helper\EntityManagerAware;
use Alchemy\Phrasea\Application\Helper\UserQueryAware;
use Alchemy\Phrasea\Controller\Controller;
use Alchemy\Phrasea\Controller\Prod\OrderControllerException;
use Alchemy\Phrasea\Controller\RecordsRequest;
use Alchemy\Phrasea\Core\Event\OrderDeliveryEvent;
use Alchemy\Phrasea\Core\Event\OrderEvent;
use Alchemy\Phrasea\Core\PhraseaEvents;
use Alchemy\Phrasea\Model\Entities\Basket;
use Alchemy\Phrasea\Model\Entities\BasketElement;
use Alchemy\Phrasea\Model\Entities\Order as OrderEntity;
use Alchemy\Phrasea\Model\Entities\Order;
use Alchemy\Phrasea\Model\Entities\OrderElement;
use Alchemy\Phrasea\Model\Entities\User;
use Alchemy\Phrasea\Model\Repositories\OrderElementRepository;
@@ -39,7 +37,7 @@ use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
class OrderController extends Controller
class ProdOrderController extends Controller
{
use DispatcherAware;
use EntityManagerAware;
@@ -275,7 +273,7 @@ class OrderController extends Controller
/**
* @param int $orderId
* @return Order
* @return OrderEntity
*/
private function findOr404($orderId)
{