diff --git a/lib/Alchemy/Phrasea/Application.php b/lib/Alchemy/Phrasea/Application.php index b208509542..9c245e0ce0 100644 --- a/lib/Alchemy/Phrasea/Application.php +++ b/lib/Alchemy/Phrasea/Application.php @@ -11,63 +11,63 @@ namespace Alchemy\Phrasea; -use Alchemy\Phrasea\Controller\Lightbox; -use Alchemy\Phrasea\Controller\Datafiles; -use Alchemy\Phrasea\Controller\Permalink; -use Alchemy\Phrasea\Controller\Admin\Collection; -use Alchemy\Phrasea\Controller\Admin\ConnectedUsers; -use Alchemy\Phrasea\Controller\Admin\Dashboard; -use Alchemy\Phrasea\Controller\Admin\Databox; -use Alchemy\Phrasea\Controller\Admin\Databoxes; -use Alchemy\Phrasea\Controller\Admin\Fields; -use Alchemy\Phrasea\Controller\Admin\Publications; -use Alchemy\Phrasea\Controller\Admin\Root as AdminRoot; -use Alchemy\Phrasea\Controller\Admin\Setup; -use Alchemy\Phrasea\Controller\Admin\SearchEngine; -use Alchemy\Phrasea\Controller\Admin\Subdefs; -use Alchemy\Phrasea\Controller\Admin\TaskManager; -use Alchemy\Phrasea\Controller\Admin\Users; -use Alchemy\Phrasea\Controller\Client\Root as ClientRoot; -use Alchemy\Phrasea\Controller\Minifier; -use Alchemy\Phrasea\Controller\Prod\BasketController; -use Alchemy\Phrasea\Controller\Prod\Bridge; -use Alchemy\Phrasea\Controller\Prod\Download; -use Alchemy\Phrasea\Controller\Prod\DoDownload; -use Alchemy\Phrasea\Controller\Prod\Edit; -use Alchemy\Phrasea\Controller\Prod\Export; -use Alchemy\Phrasea\Controller\Prod\Feed; -use Alchemy\Phrasea\Controller\Prod\Language; -use Alchemy\Phrasea\Controller\Prod\Lazaret; -use Alchemy\Phrasea\Controller\Prod\MoveCollection; -use Alchemy\Phrasea\Controller\Prod\Order; -use Alchemy\Phrasea\Controller\Prod\Printer; -use Alchemy\Phrasea\Controller\Prod\Push; -use Alchemy\Phrasea\Controller\Prod\Query; -use Alchemy\Phrasea\Controller\Prod\Property; -use Alchemy\Phrasea\Controller\Prod\Records; -use Alchemy\Phrasea\Controller\Prod\Root as Prod; -use Alchemy\Phrasea\Controller\Prod\Share; -use Alchemy\Phrasea\Controller\Prod\Story; -use Alchemy\Phrasea\Controller\Prod\Tools; -use Alchemy\Phrasea\Controller\Prod\Tooltip; -use Alchemy\Phrasea\Controller\Prod\TOU; -use Alchemy\Phrasea\Controller\Prod\Upload; -use Alchemy\Phrasea\Controller\Prod\UsrLists; -use Alchemy\Phrasea\Controller\Prod\WorkZone; -use Alchemy\Phrasea\Controller\Report\Activity as ReportActivity; -use Alchemy\Phrasea\Controller\Report\Informations as ReportInformations; -use Alchemy\Phrasea\Controller\Report\Root as ReportRoot; -use Alchemy\Phrasea\Controller\Root\Account; -use Alchemy\Phrasea\Controller\Root\Developers; -use Alchemy\Phrasea\Controller\Root\Login; -use Alchemy\Phrasea\Controller\Root\Root; -use Alchemy\Phrasea\Controller\Root\RSSFeeds; -use Alchemy\Phrasea\Controller\Root\Session; -use Alchemy\Phrasea\Controller\Setup as SetupController; -use Alchemy\Phrasea\Controller\Thesaurus\Thesaurus; -use Alchemy\Phrasea\Controller\Thesaurus\Xmlhttp as ThesaurusXMLHttp; -use Alchemy\Phrasea\Controller\User\Notifications; -use Alchemy\Phrasea\Controller\User\Preferences; +use Alchemy\Phrasea\ControllerProvider\Lightbox; +use Alchemy\Phrasea\ControllerProvider\Datafiles; +use Alchemy\Phrasea\ControllerProvider\Permalink; +use Alchemy\Phrasea\ControllerProvider\Admin\Collection; +use Alchemy\Phrasea\ControllerProvider\Admin\ConnectedUsers; +use Alchemy\Phrasea\ControllerProvider\Admin\Dashboard; +use Alchemy\Phrasea\ControllerProvider\Admin\Databox; +use Alchemy\Phrasea\ControllerProvider\Admin\Databoxes; +use Alchemy\Phrasea\ControllerProvider\Admin\Fields; +use Alchemy\Phrasea\ControllerProvider\Admin\Publications; +use Alchemy\Phrasea\ControllerProvider\Admin\Root as AdminRoot; +use Alchemy\Phrasea\ControllerProvider\Admin\Setup; +use Alchemy\Phrasea\ControllerProvider\Admin\SearchEngine; +use Alchemy\Phrasea\ControllerProvider\Admin\Subdefs; +use Alchemy\Phrasea\ControllerProvider\Admin\TaskManager; +use Alchemy\Phrasea\ControllerProvider\Admin\Users; +use Alchemy\Phrasea\ControllerProvider\Client\Root as ClientRoot; +use Alchemy\Phrasea\ControllerProvider\Minifier; +use Alchemy\Phrasea\ControllerProvider\Prod\BasketController; +use Alchemy\Phrasea\ControllerProvider\Prod\Bridge; +use Alchemy\Phrasea\ControllerProvider\Prod\Download; +use Alchemy\Phrasea\ControllerProvider\Prod\DoDownload; +use Alchemy\Phrasea\ControllerProvider\Prod\Edit; +use Alchemy\Phrasea\ControllerProvider\Prod\Export; +use Alchemy\Phrasea\ControllerProvider\Prod\Feed; +use Alchemy\Phrasea\ControllerProvider\Prod\Language; +use Alchemy\Phrasea\ControllerProvider\Prod\Lazaret; +use Alchemy\Phrasea\ControllerProvider\Prod\MoveCollection; +use Alchemy\Phrasea\ControllerProvider\Prod\Order; +use Alchemy\Phrasea\ControllerProvider\Prod\Printer; +use Alchemy\Phrasea\ControllerProvider\Prod\Push; +use Alchemy\Phrasea\ControllerProvider\Prod\Query; +use Alchemy\Phrasea\ControllerProvider\Prod\Property; +use Alchemy\Phrasea\ControllerProvider\Prod\Records; +use Alchemy\Phrasea\ControllerProvider\Prod\Root as Prod; +use Alchemy\Phrasea\ControllerProvider\Prod\Share; +use Alchemy\Phrasea\ControllerProvider\Prod\Story; +use Alchemy\Phrasea\ControllerProvider\Prod\Tools; +use Alchemy\Phrasea\ControllerProvider\Prod\Tooltip; +use Alchemy\Phrasea\ControllerProvider\Prod\TOU; +use Alchemy\Phrasea\ControllerProvider\Prod\Upload; +use Alchemy\Phrasea\ControllerProvider\Prod\UsrLists; +use Alchemy\Phrasea\ControllerProvider\Prod\WorkZone; +use Alchemy\Phrasea\ControllerProvider\Report\Activity as ReportActivity; +use Alchemy\Phrasea\ControllerProvider\Report\Informations as ReportInformations; +use Alchemy\Phrasea\ControllerProvider\Report\Root as ReportRoot; +use Alchemy\Phrasea\ControllerProvider\Root\Account; +use Alchemy\Phrasea\ControllerProvider\Root\Developers; +use Alchemy\Phrasea\ControllerProvider\Root\Login; +use Alchemy\Phrasea\ControllerProvider\Root\Root; +use Alchemy\Phrasea\ControllerProvider\Root\RSSFeeds; +use Alchemy\Phrasea\ControllerProvider\Root\Session; +use Alchemy\Phrasea\ControllerProvider\Setup as SetupController; +use Alchemy\Phrasea\ControllerProvider\Thesaurus\Thesaurus; +use Alchemy\Phrasea\ControllerProvider\Thesaurus\Xmlhttp as ThesaurusXMLHttp; +use Alchemy\Phrasea\ControllerProvider\User\Notifications; +use Alchemy\Phrasea\ControllerProvider\User\Preferences; use Alchemy\Phrasea\Core\Event\Subscriber\BasketSubscriber; use Alchemy\Phrasea\Core\Event\Subscriber\BridgeSubscriber; use Alchemy\Phrasea\Core\Event\Subscriber\ExportSubscriber; diff --git a/lib/Alchemy/Phrasea/Application/Api.php b/lib/Alchemy/Phrasea/Application/Api.php index 268bdac5a3..d8b86ac541 100644 --- a/lib/Alchemy/Phrasea/Application/Api.php +++ b/lib/Alchemy/Phrasea/Application/Api.php @@ -12,17 +12,17 @@ namespace Alchemy\Phrasea\Application; use Alchemy\Phrasea\Application as PhraseaApplication; -use Alchemy\Phrasea\Controller\Minifier; -use Alchemy\Phrasea\Controller\Permalink; -use Alchemy\Phrasea\Controller\Datafiles; -use Alchemy\Phrasea\Core\Event\Subscriber\ApiCorsSubscriber; -use Alchemy\Phrasea\Core\PhraseaEvents; -use Alchemy\Phrasea\Controller\Api\Oauth2; use Alchemy\Phrasea\Controller\Api\Result; -use Alchemy\Phrasea\Controller\Api\V1; +use Alchemy\Phrasea\ControllerProvider\Api\Oauth2; +use Alchemy\Phrasea\ControllerProvider\Api\V1; +use Alchemy\Phrasea\ControllerProvider\Datafiles; +use Alchemy\Phrasea\ControllerProvider\Minifier; +use Alchemy\Phrasea\ControllerProvider\Permalink; use Alchemy\Phrasea\Core\Event\ApiResultEvent; -use Alchemy\Phrasea\Core\Event\Subscriber\ApiOauth2ErrorsSubscriber; +use Alchemy\Phrasea\Core\Event\Subscriber\ApiCorsSubscriber; use Alchemy\Phrasea\Core\Event\Subscriber\ApiExceptionHandlerSubscriber; +use Alchemy\Phrasea\Core\Event\Subscriber\ApiOauth2ErrorsSubscriber; +use Alchemy\Phrasea\Core\PhraseaEvents; use Alchemy\Phrasea\Core\Provider\JsonSchemaServiceProvider; use Monolog\Logger; use Monolog\Processor\WebProcessor; diff --git a/lib/Alchemy/Phrasea/Controller/Api/Result.php b/lib/Alchemy/Phrasea/Controller/Api/Result.php index e01ab79862..fd849e10b2 100644 --- a/lib/Alchemy/Phrasea/Controller/Api/Result.php +++ b/lib/Alchemy/Phrasea/Controller/Api/Result.php @@ -11,7 +11,7 @@ namespace Alchemy\Phrasea\Controller\Api; -use Silex\Application; +use Alchemy\Phrasea\ControllerProvider\Api\V1; use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; diff --git a/lib/Alchemy/Phrasea/Controller/Admin/Collection.php b/lib/Alchemy/Phrasea/ControllerProvider/Admin/Collection.php similarity index 99% rename from lib/Alchemy/Phrasea/Controller/Admin/Collection.php rename to lib/Alchemy/Phrasea/ControllerProvider/Admin/Collection.php index 0d1d5ad807..ac64c19ea5 100644 --- a/lib/Alchemy/Phrasea/Controller/Admin/Collection.php +++ b/lib/Alchemy/Phrasea/ControllerProvider/Admin/Collection.php @@ -9,10 +9,11 @@ * file that was distributed with this source code. */ -namespace Alchemy\Phrasea\Controller\Admin; +namespace Alchemy\Phrasea\ControllerProvider\Admin; use Alchemy\Phrasea\Exception\RuntimeException; use Silex\Application; +use Silex\ControllerCollection; use Silex\ControllerProviderInterface; use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\RedirectResponse; @@ -25,11 +26,12 @@ class Collection implements ControllerProviderInterface { $app['controller.admin.collection'] = $this; + /** @var ControllerCollection $controllers */ $controllers = $app['controllers_factory']; $app['firewall']->addMandatoryAuthentication($controllers); - $controllers->before(function (Request $request) use ($app) { + $controllers->before(function () use ($app) { $app['firewall']->requireAccessToModule('admin') ->requireRightOnBase($app['request']->attributes->get('bas_id'), 'canadmin'); }); diff --git a/lib/Alchemy/Phrasea/Controller/Admin/ConnectedUsers.php b/lib/Alchemy/Phrasea/ControllerProvider/Admin/ConnectedUsers.php similarity index 98% rename from lib/Alchemy/Phrasea/Controller/Admin/ConnectedUsers.php rename to lib/Alchemy/Phrasea/ControllerProvider/Admin/ConnectedUsers.php index 6ed8fe1b67..a881a6fee8 100644 --- a/lib/Alchemy/Phrasea/Controller/Admin/ConnectedUsers.php +++ b/lib/Alchemy/Phrasea/ControllerProvider/Admin/ConnectedUsers.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Alchemy\Phrasea\Controller\Admin; +namespace Alchemy\Phrasea\ControllerProvider\Admin; use Alchemy\Geonames\Exception\ExceptionInterface as GeonamesExceptionInterface; use Silex\Application; diff --git a/lib/Alchemy/Phrasea/Controller/Admin/Dashboard.php b/lib/Alchemy/Phrasea/ControllerProvider/Admin/Dashboard.php similarity index 98% rename from lib/Alchemy/Phrasea/Controller/Admin/Dashboard.php rename to lib/Alchemy/Phrasea/ControllerProvider/Admin/Dashboard.php index 4f21177602..b5fa997ff3 100644 --- a/lib/Alchemy/Phrasea/Controller/Admin/Dashboard.php +++ b/lib/Alchemy/Phrasea/ControllerProvider/Admin/Dashboard.php @@ -9,8 +9,9 @@ * file that was distributed with this source code. */ -namespace Alchemy\Phrasea\Controller\Admin; +namespace Alchemy\Phrasea\ControllerProvider\Admin; +use Alchemy\Phrasea\Controller\Admin\RedirectResponse; use Alchemy\Phrasea\Notification\Receiver; use Alchemy\Phrasea\Notification\Mail\MailTest; use Alchemy\Phrasea\Exception\InvalidArgumentException; diff --git a/lib/Alchemy/Phrasea/Controller/Admin/Databox.php b/lib/Alchemy/Phrasea/ControllerProvider/Admin/Databox.php similarity index 99% rename from lib/Alchemy/Phrasea/Controller/Admin/Databox.php rename to lib/Alchemy/Phrasea/ControllerProvider/Admin/Databox.php index ee3fc77f34..d439998719 100644 --- a/lib/Alchemy/Phrasea/Controller/Admin/Databox.php +++ b/lib/Alchemy/Phrasea/ControllerProvider/Admin/Databox.php @@ -9,8 +9,10 @@ * file that was distributed with this source code. */ -namespace Alchemy\Phrasea\Controller\Admin; +namespace Alchemy\Phrasea\ControllerProvider\Admin; +use Alchemy\Phrasea\Controller\Admin\JsonResponse; +use Alchemy\Phrasea\Controller\Admin\RedirectResponse; use Silex\Application; use Silex\ControllerProviderInterface; use Symfony\Component\HttpFoundation\Request; diff --git a/lib/Alchemy/Phrasea/Controller/Admin/Databoxes.php b/lib/Alchemy/Phrasea/ControllerProvider/Admin/Databoxes.php similarity index 99% rename from lib/Alchemy/Phrasea/Controller/Admin/Databoxes.php rename to lib/Alchemy/Phrasea/ControllerProvider/Admin/Databoxes.php index b2f78f8cd4..0e08f4b0c2 100644 --- a/lib/Alchemy/Phrasea/Controller/Admin/Databoxes.php +++ b/lib/Alchemy/Phrasea/ControllerProvider/Admin/Databoxes.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Alchemy\Phrasea\Controller\Admin; +namespace Alchemy\Phrasea\ControllerProvider\Admin; use Doctrine\DBAL\DBALException; use Silex\Application; diff --git a/lib/Alchemy/Phrasea/Controller/Admin/Fields.php b/lib/Alchemy/Phrasea/ControllerProvider/Admin/Fields.php similarity index 99% rename from lib/Alchemy/Phrasea/Controller/Admin/Fields.php rename to lib/Alchemy/Phrasea/ControllerProvider/Admin/Fields.php index bbbbf967fb..a6cf25f42f 100644 --- a/lib/Alchemy/Phrasea/Controller/Admin/Fields.php +++ b/lib/Alchemy/Phrasea/ControllerProvider/Admin/Fields.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Alchemy\Phrasea\Controller\Admin; +namespace Alchemy\Phrasea\ControllerProvider\Admin; use Alchemy\Phrasea\Metadata\TagProvider; use Alchemy\Phrasea\Vocabulary\Controller as VocabularyController; diff --git a/lib/Alchemy/Phrasea/Controller/Admin/Publications.php b/lib/Alchemy/Phrasea/ControllerProvider/Admin/Publications.php similarity index 99% rename from lib/Alchemy/Phrasea/Controller/Admin/Publications.php rename to lib/Alchemy/Phrasea/ControllerProvider/Admin/Publications.php index 45fefa7c0c..f4de24e844 100644 --- a/lib/Alchemy/Phrasea/Controller/Admin/Publications.php +++ b/lib/Alchemy/Phrasea/ControllerProvider/Admin/Publications.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Alchemy\Phrasea\Controller\Admin; +namespace Alchemy\Phrasea\ControllerProvider\Admin; use Alchemy\Phrasea\Application as PhraseaApplication; use Alchemy\Phrasea\Model\Entities\Feed; diff --git a/lib/Alchemy/Phrasea/Controller/Admin/Root.php b/lib/Alchemy/Phrasea/ControllerProvider/Admin/Root.php similarity index 99% rename from lib/Alchemy/Phrasea/Controller/Admin/Root.php rename to lib/Alchemy/Phrasea/ControllerProvider/Admin/Root.php index c7055443d5..8d043cb6cb 100644 --- a/lib/Alchemy/Phrasea/Controller/Admin/Root.php +++ b/lib/Alchemy/Phrasea/ControllerProvider/Admin/Root.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Alchemy\Phrasea\Controller\Admin; +namespace Alchemy\Phrasea\ControllerProvider\Admin; use Alchemy\Phrasea\Exception\SessionNotFound; use Alchemy\Phrasea\Helper\DatabaseHelper; diff --git a/lib/Alchemy/Phrasea/Controller/Admin/SearchEngine.php b/lib/Alchemy/Phrasea/ControllerProvider/Admin/SearchEngine.php similarity index 96% rename from lib/Alchemy/Phrasea/Controller/Admin/SearchEngine.php rename to lib/Alchemy/Phrasea/ControllerProvider/Admin/SearchEngine.php index 45530d43fd..2d6efe97ea 100644 --- a/lib/Alchemy/Phrasea/Controller/Admin/SearchEngine.php +++ b/lib/Alchemy/Phrasea/ControllerProvider/Admin/SearchEngine.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Alchemy\Phrasea\Controller\Admin; +namespace Alchemy\Phrasea\ControllerProvider\Admin; use Alchemy\Phrasea\Application as PhraseaApplication; use Symfony\Component\HttpFoundation\Request; diff --git a/lib/Alchemy/Phrasea/Controller/Admin/Setup.php b/lib/Alchemy/Phrasea/ControllerProvider/Admin/Setup.php similarity index 96% rename from lib/Alchemy/Phrasea/Controller/Admin/Setup.php rename to lib/Alchemy/Phrasea/ControllerProvider/Admin/Setup.php index 42196b81f9..58694a7287 100644 --- a/lib/Alchemy/Phrasea/Controller/Admin/Setup.php +++ b/lib/Alchemy/Phrasea/ControllerProvider/Admin/Setup.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Alchemy\Phrasea\Controller\Admin; +namespace Alchemy\Phrasea\ControllerProvider\Admin; use Alchemy\Phrasea\Application; use Silex\Application as SilexApplication; diff --git a/lib/Alchemy/Phrasea/Controller/Admin/Subdefs.php b/lib/Alchemy/Phrasea/ControllerProvider/Admin/Subdefs.php similarity index 98% rename from lib/Alchemy/Phrasea/Controller/Admin/Subdefs.php rename to lib/Alchemy/Phrasea/ControllerProvider/Admin/Subdefs.php index 1476378348..e51bd45020 100644 --- a/lib/Alchemy/Phrasea/Controller/Admin/Subdefs.php +++ b/lib/Alchemy/Phrasea/ControllerProvider/Admin/Subdefs.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Alchemy\Phrasea\Controller\Admin; +namespace Alchemy\Phrasea\ControllerProvider\Admin; use Silex\Application; use Silex\ControllerProviderInterface; diff --git a/lib/Alchemy/Phrasea/Controller/Admin/TaskManager.php b/lib/Alchemy/Phrasea/ControllerProvider/Admin/TaskManager.php similarity index 99% rename from lib/Alchemy/Phrasea/Controller/Admin/TaskManager.php rename to lib/Alchemy/Phrasea/ControllerProvider/Admin/TaskManager.php index 0f6eb6b888..83145dc8fb 100644 --- a/lib/Alchemy/Phrasea/Controller/Admin/TaskManager.php +++ b/lib/Alchemy/Phrasea/ControllerProvider/Admin/TaskManager.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Alchemy\Phrasea\Controller\Admin; +namespace Alchemy\Phrasea\ControllerProvider\Admin; use Alchemy\Phrasea\Exception\InvalidArgumentException; use Alchemy\Phrasea\Exception\RuntimeException; diff --git a/lib/Alchemy/Phrasea/Controller/Admin/Users.php b/lib/Alchemy/Phrasea/ControllerProvider/Admin/Users.php similarity index 99% rename from lib/Alchemy/Phrasea/Controller/Admin/Users.php rename to lib/Alchemy/Phrasea/ControllerProvider/Admin/Users.php index 70702c73ec..2d68b30422 100644 --- a/lib/Alchemy/Phrasea/Controller/Admin/Users.php +++ b/lib/Alchemy/Phrasea/ControllerProvider/Admin/Users.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Alchemy\Phrasea\Controller\Admin; +namespace Alchemy\Phrasea\ControllerProvider\Admin; use Alchemy\Phrasea\Core\Response\CSVFileResponse; use Alchemy\Phrasea\Helper\User as UserHelper; diff --git a/lib/Alchemy/Phrasea/Controller/Api/Oauth2.php b/lib/Alchemy/Phrasea/ControllerProvider/Api/Oauth2.php similarity index 99% rename from lib/Alchemy/Phrasea/Controller/Api/Oauth2.php rename to lib/Alchemy/Phrasea/ControllerProvider/Api/Oauth2.php index f212ea76b5..42e700ec3f 100644 --- a/lib/Alchemy/Phrasea/Controller/Api/Oauth2.php +++ b/lib/Alchemy/Phrasea/ControllerProvider/Api/Oauth2.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Alchemy\Phrasea\Controller\Api; +namespace Alchemy\Phrasea\ControllerProvider\Api; use Alchemy\Phrasea\Authentication\Context; use Alchemy\Phrasea\Authentication\Exception\AccountLockedException; diff --git a/lib/Alchemy/Phrasea/Controller/Api/V1.php b/lib/Alchemy/Phrasea/ControllerProvider/Api/V1.php similarity index 99% rename from lib/Alchemy/Phrasea/Controller/Api/V1.php rename to lib/Alchemy/Phrasea/ControllerProvider/Api/V1.php index 0b69729251..c71927802d 100644 --- a/lib/Alchemy/Phrasea/Controller/Api/V1.php +++ b/lib/Alchemy/Phrasea/ControllerProvider/Api/V1.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Alchemy\Phrasea\Controller\Api; +namespace Alchemy\Phrasea\ControllerProvider\Api; use Alchemy\Phrasea\Authentication\Context; use Alchemy\Phrasea\Border\Attribute\Status; @@ -17,6 +17,16 @@ use Alchemy\Phrasea\Border\File; use Alchemy\Phrasea\Border\Manager as BorderManager; use Alchemy\Phrasea\Border\Manager; use Alchemy\Phrasea\Cache\Cache as CacheInterface; +use Alchemy\Phrasea\Controller\Api\API_V1_exception_badrequest; +use Alchemy\Phrasea\Controller\Api\API_V1_exception_forbidden; +use Alchemy\Phrasea\Controller\Api\caption_field; +use Alchemy\Phrasea\Controller\Api\caption_record; +use Alchemy\Phrasea\Controller\Api\collection; +use Alchemy\Phrasea\Controller\Api\media_Permalink_Adapter; +use Alchemy\Phrasea\Controller\Api\media_subdef; +use Alchemy\Phrasea\Controller\Api\Result; +use Alchemy\Phrasea\Controller\Api\Symfony; +use Alchemy\Phrasea\Controller\Api\type; use Alchemy\Phrasea\Core\Event\ApiOAuth2EndEvent; use Alchemy\Phrasea\Core\Event\ApiOAuth2StartEvent; use Alchemy\Phrasea\Core\Event\PreAuthenticate; @@ -701,10 +711,10 @@ class V1 implements ControllerProviderInterface switch ($request->get('forceBehavior')) { case '0' : - $behavior = BorderManager::FORCE_RECORD; + $behavior = Manager::FORCE_RECORD; break; case '1' : - $behavior = BorderManager::FORCE_LAZARET; + $behavior = Manager::FORCE_LAZARET; break; case null: $behavior = null; diff --git a/lib/Alchemy/Phrasea/Controller/Client/Root.php b/lib/Alchemy/Phrasea/ControllerProvider/Client/Root.php similarity index 96% rename from lib/Alchemy/Phrasea/Controller/Client/Root.php rename to lib/Alchemy/Phrasea/ControllerProvider/Client/Root.php index 67fb145c03..af354d89be 100644 --- a/lib/Alchemy/Phrasea/Controller/Client/Root.php +++ b/lib/Alchemy/Phrasea/ControllerProvider/Client/Root.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Alchemy\Phrasea\Controller\Client; +namespace Alchemy\Phrasea\ControllerProvider\Client; use Alchemy\Phrasea\Feed\Aggregate; use Alchemy\Phrasea\SearchEngine\SearchEngineOptions; diff --git a/lib/Alchemy/Phrasea/Controller/Datafiles.php b/lib/Alchemy/Phrasea/ControllerProvider/Datafiles.php similarity index 97% rename from lib/Alchemy/Phrasea/Controller/Datafiles.php rename to lib/Alchemy/Phrasea/ControllerProvider/Datafiles.php index 3cfe8aa39d..9b313fd03a 100644 --- a/lib/Alchemy/Phrasea/Controller/Datafiles.php +++ b/lib/Alchemy/Phrasea/ControllerProvider/Datafiles.php @@ -9,14 +9,15 @@ * file that was distributed with this source code. */ -namespace Alchemy\Phrasea\Controller; +namespace Alchemy\Phrasea\ControllerProvider; use Alchemy\Phrasea\Application as PhraseaApplication; +use Alchemy\Phrasea\Controller\AbstractDelivery; use Silex\Application; use Silex\ControllerProviderInterface; use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException; +use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; class Datafiles extends AbstractDelivery implements ControllerProviderInterface { diff --git a/lib/Alchemy/Phrasea/Controller/Lightbox.php b/lib/Alchemy/Phrasea/ControllerProvider/Lightbox.php similarity index 99% rename from lib/Alchemy/Phrasea/Controller/Lightbox.php rename to lib/Alchemy/Phrasea/ControllerProvider/Lightbox.php index 9434052482..0378f6de37 100644 --- a/lib/Alchemy/Phrasea/Controller/Lightbox.php +++ b/lib/Alchemy/Phrasea/ControllerProvider/Lightbox.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Alchemy\Phrasea\Controller; +namespace Alchemy\Phrasea\ControllerProvider; use Alchemy\Phrasea\Core\Event\ValidationEvent; use Alchemy\Phrasea\Core\PhraseaEvents; diff --git a/lib/Alchemy/Phrasea/Controller/Minifier.php b/lib/Alchemy/Phrasea/ControllerProvider/Minifier.php similarity index 99% rename from lib/Alchemy/Phrasea/Controller/Minifier.php rename to lib/Alchemy/Phrasea/ControllerProvider/Minifier.php index fe471634c1..29946f1278 100644 --- a/lib/Alchemy/Phrasea/Controller/Minifier.php +++ b/lib/Alchemy/Phrasea/ControllerProvider/Minifier.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Alchemy\Phrasea\Controller; +namespace Alchemy\Phrasea\ControllerProvider; use Silex\ControllerProviderInterface; use Silex\Application; diff --git a/lib/Alchemy/Phrasea/Controller/Permalink.php b/lib/Alchemy/Phrasea/ControllerProvider/Permalink.php similarity index 98% rename from lib/Alchemy/Phrasea/Controller/Permalink.php rename to lib/Alchemy/Phrasea/ControllerProvider/Permalink.php index 988dbabe84..9dc9a44476 100644 --- a/lib/Alchemy/Phrasea/Controller/Permalink.php +++ b/lib/Alchemy/Phrasea/ControllerProvider/Permalink.php @@ -9,9 +9,10 @@ * file that was distributed with this source code. */ -namespace Alchemy\Phrasea\Controller; +namespace Alchemy\Phrasea\ControllerProvider; use Alchemy\Phrasea\Application as PhraseaApplication; +use Alchemy\Phrasea\Controller\AbstractDelivery; use Alchemy\Phrasea\Model\Serializer\CaptionSerializer; use Silex\Application; use Silex\ControllerProviderInterface; diff --git a/lib/Alchemy/Phrasea/Controller/Prod/BasketController.php b/lib/Alchemy/Phrasea/ControllerProvider/Prod/BasketController.php similarity index 99% rename from lib/Alchemy/Phrasea/Controller/Prod/BasketController.php rename to lib/Alchemy/Phrasea/ControllerProvider/Prod/BasketController.php index a4239ea019..ce26694168 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/BasketController.php +++ b/lib/Alchemy/Phrasea/ControllerProvider/Prod/BasketController.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Alchemy\Phrasea\Controller\Prod; +namespace Alchemy\Phrasea\ControllerProvider\Prod; use Alchemy\Phrasea\Controller\RecordsRequest; use Alchemy\Phrasea\Model\Entities\Basket as BasketEntity; diff --git a/lib/Alchemy/Phrasea/Controller/Prod/Bridge.php b/lib/Alchemy/Phrasea/ControllerProvider/Prod/Bridge.php similarity index 99% rename from lib/Alchemy/Phrasea/Controller/Prod/Bridge.php rename to lib/Alchemy/Phrasea/ControllerProvider/Prod/Bridge.php index 8cd68f601c..6bd482886b 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/Bridge.php +++ b/lib/Alchemy/Phrasea/ControllerProvider/Prod/Bridge.php @@ -9,8 +9,9 @@ * file that was distributed with this source code. */ -namespace Alchemy\Phrasea\Controller\Prod; +namespace Alchemy\Phrasea\ControllerProvider\Prod; +use Alchemy\Phrasea\Controller\Prod\HttpException; use Alchemy\Phrasea\Helper\Record as RecordHelper; use Silex\Application; use Silex\ControllerProviderInterface; diff --git a/lib/Alchemy/Phrasea/Controller/Prod/DoDownload.php b/lib/Alchemy/Phrasea/ControllerProvider/Prod/DoDownload.php similarity index 99% rename from lib/Alchemy/Phrasea/Controller/Prod/DoDownload.php rename to lib/Alchemy/Phrasea/ControllerProvider/Prod/DoDownload.php index c3062f2900..a3a74ba26f 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/DoDownload.php +++ b/lib/Alchemy/Phrasea/ControllerProvider/Prod/DoDownload.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Alchemy\Phrasea\Controller\Prod; +namespace Alchemy\Phrasea\ControllerProvider\Prod; use Alchemy\Phrasea\Http\DeliverDataInterface; use Alchemy\Phrasea\Model\Entities\Token; diff --git a/lib/Alchemy/Phrasea/Controller/Prod/Download.php b/lib/Alchemy/Phrasea/ControllerProvider/Prod/Download.php similarity index 97% rename from lib/Alchemy/Phrasea/Controller/Prod/Download.php rename to lib/Alchemy/Phrasea/ControllerProvider/Prod/Download.php index 65a03e26ce..98347f0317 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/Download.php +++ b/lib/Alchemy/Phrasea/ControllerProvider/Prod/Download.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Alchemy\Phrasea\Controller\Prod; +namespace Alchemy\Phrasea\ControllerProvider\Prod; use Alchemy\Phrasea\Core\Event\ExportEvent; use Alchemy\Phrasea\Core\PhraseaEvents; diff --git a/lib/Alchemy/Phrasea/Controller/Prod/Edit.php b/lib/Alchemy/Phrasea/ControllerProvider/Prod/Edit.php similarity index 99% rename from lib/Alchemy/Phrasea/Controller/Prod/Edit.php rename to lib/Alchemy/Phrasea/ControllerProvider/Prod/Edit.php index 41706cbcc3..ab87c3d775 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/Edit.php +++ b/lib/Alchemy/Phrasea/ControllerProvider/Prod/Edit.php @@ -9,8 +9,9 @@ * file that was distributed with this source code. */ -namespace Alchemy\Phrasea\Controller\Prod; +namespace Alchemy\Phrasea\ControllerProvider\Prod; +use Alchemy\Phrasea\Controller\Prod\record_adapter; use Alchemy\Phrasea\Core\Event\RecordEdit; use Alchemy\Phrasea\Core\PhraseaEvents; use Alchemy\Phrasea\Vocabulary\Controller as VocabularyController; diff --git a/lib/Alchemy/Phrasea/Controller/Prod/Export.php b/lib/Alchemy/Phrasea/ControllerProvider/Prod/Export.php similarity index 99% rename from lib/Alchemy/Phrasea/Controller/Prod/Export.php rename to lib/Alchemy/Phrasea/ControllerProvider/Prod/Export.php index 67a8b7150d..99a030a842 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/Export.php +++ b/lib/Alchemy/Phrasea/ControllerProvider/Prod/Export.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Alchemy\Phrasea\Controller\Prod; +namespace Alchemy\Phrasea\ControllerProvider\Prod; use Alchemy\Phrasea\Core\Event\ExportFailureEvent; use Alchemy\Phrasea\Core\PhraseaEvents; diff --git a/lib/Alchemy/Phrasea/Controller/Prod/Feed.php b/lib/Alchemy/Phrasea/ControllerProvider/Prod/Feed.php similarity index 99% rename from lib/Alchemy/Phrasea/Controller/Prod/Feed.php rename to lib/Alchemy/Phrasea/ControllerProvider/Prod/Feed.php index 0d1868d1a7..4302911c6c 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/Feed.php +++ b/lib/Alchemy/Phrasea/ControllerProvider/Prod/Feed.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Alchemy\Phrasea\Controller\Prod; +namespace Alchemy\Phrasea\ControllerProvider\Prod; use Alchemy\Phrasea\Controller\RecordsRequest; use Alchemy\Phrasea\Core\Event\FeedEntryEvent; diff --git a/lib/Alchemy/Phrasea/Controller/Prod/Language.php b/lib/Alchemy/Phrasea/ControllerProvider/Prod/Language.php similarity index 99% rename from lib/Alchemy/Phrasea/Controller/Prod/Language.php rename to lib/Alchemy/Phrasea/ControllerProvider/Prod/Language.php index ae9572e469..07e30c3cab 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/Language.php +++ b/lib/Alchemy/Phrasea/ControllerProvider/Prod/Language.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Alchemy\Phrasea\Controller\Prod; +namespace Alchemy\Phrasea\ControllerProvider\Prod; use Silex\Application; use Silex\ControllerProviderInterface; diff --git a/lib/Alchemy/Phrasea/Controller/Prod/Lazaret.php b/lib/Alchemy/Phrasea/ControllerProvider/Prod/Lazaret.php similarity index 99% rename from lib/Alchemy/Phrasea/Controller/Prod/Lazaret.php rename to lib/Alchemy/Phrasea/ControllerProvider/Prod/Lazaret.php index 36631e2f23..1672d97d97 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/Lazaret.php +++ b/lib/Alchemy/Phrasea/ControllerProvider/Prod/Lazaret.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Alchemy\Phrasea\Controller\Prod; +namespace Alchemy\Phrasea\ControllerProvider\Prod; use Alchemy\Phrasea\Model\Entities\LazaretFile; use Alchemy\Phrasea\Border; diff --git a/lib/Alchemy/Phrasea/Controller/Prod/MoveCollection.php b/lib/Alchemy/Phrasea/ControllerProvider/Prod/MoveCollection.php similarity index 98% rename from lib/Alchemy/Phrasea/Controller/Prod/MoveCollection.php rename to lib/Alchemy/Phrasea/ControllerProvider/Prod/MoveCollection.php index feded8b21c..c1d2bd6b09 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/MoveCollection.php +++ b/lib/Alchemy/Phrasea/ControllerProvider/Prod/MoveCollection.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Alchemy\Phrasea\Controller\Prod; +namespace Alchemy\Phrasea\ControllerProvider\Prod; use Alchemy\Phrasea\Controller\RecordsRequest; use Silex\Application; diff --git a/lib/Alchemy/Phrasea/Controller/Prod/Order.php b/lib/Alchemy/Phrasea/ControllerProvider/Prod/Order.php similarity index 99% rename from lib/Alchemy/Phrasea/Controller/Prod/Order.php rename to lib/Alchemy/Phrasea/ControllerProvider/Prod/Order.php index a76c9c8d19..69d8cf8619 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/Order.php +++ b/lib/Alchemy/Phrasea/ControllerProvider/Prod/Order.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Alchemy\Phrasea\Controller\Prod; +namespace Alchemy\Phrasea\ControllerProvider\Prod; use Alchemy\Phrasea\Controller\RecordsRequest; use Alchemy\Phrasea\Core\Event\OrderDeliveryEvent; diff --git a/lib/Alchemy/Phrasea/Controller/Prod/Printer.php b/lib/Alchemy/Phrasea/ControllerProvider/Prod/Printer.php similarity index 97% rename from lib/Alchemy/Phrasea/Controller/Prod/Printer.php rename to lib/Alchemy/Phrasea/ControllerProvider/Prod/Printer.php index 4fcecaab27..2dfdea170a 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/Printer.php +++ b/lib/Alchemy/Phrasea/ControllerProvider/Prod/Printer.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Alchemy\Phrasea\Controller\Prod; +namespace Alchemy\Phrasea\ControllerProvider\Prod; use Silex\Application; use Silex\ControllerProviderInterface; diff --git a/lib/Alchemy/Phrasea/Controller/Prod/Property.php b/lib/Alchemy/Phrasea/ControllerProvider/Prod/Property.php similarity index 98% rename from lib/Alchemy/Phrasea/Controller/Prod/Property.php rename to lib/Alchemy/Phrasea/ControllerProvider/Prod/Property.php index 23c5e9f92d..69e299ce28 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/Property.php +++ b/lib/Alchemy/Phrasea/ControllerProvider/Prod/Property.php @@ -9,8 +9,9 @@ * file that was distributed with this source code. */ -namespace Alchemy\Phrasea\Controller\Prod; +namespace Alchemy\Phrasea\ControllerProvider\Prod; +use Alchemy\Phrasea\Controller\Prod\type; use Alchemy\Phrasea\Controller\RecordsRequest; use Silex\Application; use Silex\ControllerProviderInterface; diff --git a/lib/Alchemy/Phrasea/Controller/Prod/Push.php b/lib/Alchemy/Phrasea/ControllerProvider/Prod/Push.php similarity index 99% rename from lib/Alchemy/Phrasea/Controller/Prod/Push.php rename to lib/Alchemy/Phrasea/ControllerProvider/Prod/Push.php index 1874d89a43..10666ea1f9 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/Push.php +++ b/lib/Alchemy/Phrasea/ControllerProvider/Prod/Push.php @@ -9,8 +9,9 @@ * file that was distributed with this source code. */ -namespace Alchemy\Phrasea\Controller\Prod; +namespace Alchemy\Phrasea\ControllerProvider\Prod; +use Alchemy\Phrasea\Controller\Prod\record_adapter; use Alchemy\Phrasea\Core\Event\PushEvent; use Alchemy\Phrasea\Core\Event\ValidationEvent; use Alchemy\Phrasea\Core\PhraseaEvents; diff --git a/lib/Alchemy/Phrasea/Controller/Prod/Query.php b/lib/Alchemy/Phrasea/ControllerProvider/Prod/Query.php similarity index 99% rename from lib/Alchemy/Phrasea/Controller/Prod/Query.php rename to lib/Alchemy/Phrasea/ControllerProvider/Prod/Query.php index 958428fd41..a2af6fc1d6 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/Query.php +++ b/lib/Alchemy/Phrasea/ControllerProvider/Prod/Query.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Alchemy\Phrasea\Controller\Prod; +namespace Alchemy\Phrasea\ControllerProvider\Prod; use Alchemy\Phrasea\SearchEngine\SearchEngineOptions; use Alchemy\Phrasea\SearchEngine\SearchEngineResult; @@ -234,4 +234,4 @@ class Query implements ControllerProviderInterface ]) ]); } -} \ No newline at end of file +} diff --git a/lib/Alchemy/Phrasea/Controller/Prod/Records.php b/lib/Alchemy/Phrasea/ControllerProvider/Prod/Records.php similarity index 99% rename from lib/Alchemy/Phrasea/Controller/Prod/Records.php rename to lib/Alchemy/Phrasea/ControllerProvider/Prod/Records.php index 1519263683..a432bc174e 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/Records.php +++ b/lib/Alchemy/Phrasea/ControllerProvider/Prod/Records.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Alchemy\Phrasea\Controller\Prod; +namespace Alchemy\Phrasea\ControllerProvider\Prod; use Alchemy\Phrasea\Controller\RecordsRequest; use Alchemy\Phrasea\SearchEngine\SearchEngineOptions; diff --git a/lib/Alchemy/Phrasea/Controller/Prod/Root.php b/lib/Alchemy/Phrasea/ControllerProvider/Prod/Root.php similarity index 99% rename from lib/Alchemy/Phrasea/Controller/Prod/Root.php rename to lib/Alchemy/Phrasea/ControllerProvider/Prod/Root.php index 8c14998c7e..029d347cfe 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/Root.php +++ b/lib/Alchemy/Phrasea/ControllerProvider/Prod/Root.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Alchemy\Phrasea\Controller\Prod; +namespace Alchemy\Phrasea\ControllerProvider\Prod; use Alchemy\Phrasea\Application; use Alchemy\Phrasea\Exception\SessionNotFound; diff --git a/lib/Alchemy/Phrasea/Controller/Prod/Share.php b/lib/Alchemy/Phrasea/ControllerProvider/Prod/Share.php similarity index 97% rename from lib/Alchemy/Phrasea/Controller/Prod/Share.php rename to lib/Alchemy/Phrasea/ControllerProvider/Prod/Share.php index d28213aab2..a423bddf89 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/Share.php +++ b/lib/Alchemy/Phrasea/ControllerProvider/Prod/Share.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Alchemy\Phrasea\Controller\Prod; +namespace Alchemy\Phrasea\ControllerProvider\Prod; use Silex\Application; use Silex\ControllerProviderInterface; diff --git a/lib/Alchemy/Phrasea/Controller/Prod/Story.php b/lib/Alchemy/Phrasea/ControllerProvider/Prod/Story.php similarity index 99% rename from lib/Alchemy/Phrasea/Controller/Prod/Story.php rename to lib/Alchemy/Phrasea/ControllerProvider/Prod/Story.php index 08682d064f..ee6b216c27 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/Story.php +++ b/lib/Alchemy/Phrasea/ControllerProvider/Prod/Story.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Alchemy\Phrasea\Controller\Prod; +namespace Alchemy\Phrasea\ControllerProvider\Prod; use Alchemy\Phrasea\Controller\Exception as ControllerException; use Alchemy\Phrasea\Controller\RecordsRequest; diff --git a/lib/Alchemy/Phrasea/Controller/Prod/TOU.php b/lib/Alchemy/Phrasea/ControllerProvider/Prod/TOU.php similarity index 98% rename from lib/Alchemy/Phrasea/Controller/Prod/TOU.php rename to lib/Alchemy/Phrasea/ControllerProvider/Prod/TOU.php index b784ab0006..d8b52f0e6c 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/TOU.php +++ b/lib/Alchemy/Phrasea/ControllerProvider/Prod/TOU.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Alchemy\Phrasea\Controller\Prod; +namespace Alchemy\Phrasea\ControllerProvider\Prod; use Silex\Application; use Silex\ControllerProviderInterface; diff --git a/lib/Alchemy/Phrasea/Controller/Prod/Tools.php b/lib/Alchemy/Phrasea/ControllerProvider/Prod/Tools.php similarity index 99% rename from lib/Alchemy/Phrasea/Controller/Prod/Tools.php rename to lib/Alchemy/Phrasea/ControllerProvider/Prod/Tools.php index 0e08f2a79d..3ef4dc7b38 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/Tools.php +++ b/lib/Alchemy/Phrasea/ControllerProvider/Prod/Tools.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Alchemy\Phrasea\Controller\Prod; +namespace Alchemy\Phrasea\ControllerProvider\Prod; use Alchemy\Phrasea\Controller\RecordsRequest; use Alchemy\Phrasea\Exception\RuntimeException; diff --git a/lib/Alchemy/Phrasea/Controller/Prod/Tooltip.php b/lib/Alchemy/Phrasea/ControllerProvider/Prod/Tooltip.php similarity index 99% rename from lib/Alchemy/Phrasea/Controller/Prod/Tooltip.php rename to lib/Alchemy/Phrasea/ControllerProvider/Prod/Tooltip.php index 45f98c337f..b63b5208b2 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/Tooltip.php +++ b/lib/Alchemy/Phrasea/ControllerProvider/Prod/Tooltip.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Alchemy\Phrasea\Controller\Prod; +namespace Alchemy\Phrasea\ControllerProvider\Prod; use Alchemy\Phrasea\Model\Entities\Basket; use Alchemy\Phrasea\SearchEngine\SearchEngineOptions; diff --git a/lib/Alchemy/Phrasea/Controller/Prod/Upload.php b/lib/Alchemy/Phrasea/ControllerProvider/Prod/Upload.php similarity index 99% rename from lib/Alchemy/Phrasea/Controller/Prod/Upload.php rename to lib/Alchemy/Phrasea/ControllerProvider/Prod/Upload.php index 4202438e2d..8af201d5a1 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/Upload.php +++ b/lib/Alchemy/Phrasea/ControllerProvider/Prod/Upload.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Alchemy\Phrasea\Controller\Prod; +namespace Alchemy\Phrasea\ControllerProvider\Prod; use Alchemy\Phrasea\Border\File; use Alchemy\Phrasea\Border\Attribute\Status; diff --git a/lib/Alchemy/Phrasea/Controller/Prod/UsrLists.php b/lib/Alchemy/Phrasea/ControllerProvider/Prod/UsrLists.php similarity index 99% rename from lib/Alchemy/Phrasea/Controller/Prod/UsrLists.php rename to lib/Alchemy/Phrasea/ControllerProvider/Prod/UsrLists.php index c19cc93879..f787b62182 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/UsrLists.php +++ b/lib/Alchemy/Phrasea/ControllerProvider/Prod/UsrLists.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Alchemy\Phrasea\Controller\Prod; +namespace Alchemy\Phrasea\ControllerProvider\Prod; use Alchemy\Phrasea\Model\Entities\UsrList; use Alchemy\Phrasea\Model\Entities\UsrListEntry; diff --git a/lib/Alchemy/Phrasea/Controller/Prod/WorkZone.php b/lib/Alchemy/Phrasea/ControllerProvider/Prod/WorkZone.php similarity index 99% rename from lib/Alchemy/Phrasea/Controller/Prod/WorkZone.php rename to lib/Alchemy/Phrasea/ControllerProvider/Prod/WorkZone.php index 29bceffb21..8afb3253bf 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/WorkZone.php +++ b/lib/Alchemy/Phrasea/ControllerProvider/Prod/WorkZone.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Alchemy\Phrasea\Controller\Prod; +namespace Alchemy\Phrasea\ControllerProvider\Prod; use Alchemy\Phrasea\Model\Entities\Basket; use Alchemy\Phrasea\Model\Entities\StoryWZ; diff --git a/lib/Alchemy/Phrasea/Controller/Report/Activity.php b/lib/Alchemy/Phrasea/ControllerProvider/Report/Activity.php similarity index 99% rename from lib/Alchemy/Phrasea/Controller/Report/Activity.php rename to lib/Alchemy/Phrasea/ControllerProvider/Report/Activity.php index 4f4866b071..c43c386812 100644 --- a/lib/Alchemy/Phrasea/Controller/Report/Activity.php +++ b/lib/Alchemy/Phrasea/ControllerProvider/Report/Activity.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Alchemy\Phrasea\Controller\Report; +namespace Alchemy\Phrasea\ControllerProvider\Report; use Alchemy\Phrasea\Core\Response\CSVFileResponse; use Goodby\CSV\Export\Standard\Collection\CallbackCollection; diff --git a/lib/Alchemy/Phrasea/Controller/Report/Informations.php b/lib/Alchemy/Phrasea/ControllerProvider/Report/Informations.php similarity index 99% rename from lib/Alchemy/Phrasea/Controller/Report/Informations.php rename to lib/Alchemy/Phrasea/ControllerProvider/Report/Informations.php index 3028f4b632..7b6a847aec 100644 --- a/lib/Alchemy/Phrasea/Controller/Report/Informations.php +++ b/lib/Alchemy/Phrasea/ControllerProvider/Report/Informations.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Alchemy\Phrasea\Controller\Report; +namespace Alchemy\Phrasea\ControllerProvider\Report; use Alchemy\Phrasea\Core\Response\CSVFileResponse; use Goodby\CSV\Export\Standard\Collection\CallbackCollection; diff --git a/lib/Alchemy/Phrasea/Controller/Report/Root.php b/lib/Alchemy/Phrasea/ControllerProvider/Report/Root.php similarity index 99% rename from lib/Alchemy/Phrasea/Controller/Report/Root.php rename to lib/Alchemy/Phrasea/ControllerProvider/Report/Root.php index c78740f400..5f8097c6b1 100644 --- a/lib/Alchemy/Phrasea/Controller/Report/Root.php +++ b/lib/Alchemy/Phrasea/ControllerProvider/Report/Root.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Alchemy\Phrasea\Controller\Report; +namespace Alchemy\Phrasea\ControllerProvider\Report; use Alchemy\Phrasea\Core\Response\CSVFileResponse; use Goodby\CSV\Export\Standard\Collection\CallbackCollection; diff --git a/lib/Alchemy/Phrasea/Controller/Root/Account.php b/lib/Alchemy/Phrasea/ControllerProvider/Root/Account.php similarity index 99% rename from lib/Alchemy/Phrasea/Controller/Root/Account.php rename to lib/Alchemy/Phrasea/ControllerProvider/Root/Account.php index 07b622916a..c5a9109991 100644 --- a/lib/Alchemy/Phrasea/Controller/Root/Account.php +++ b/lib/Alchemy/Phrasea/ControllerProvider/Root/Account.php @@ -9,10 +9,11 @@ * file that was distributed with this source code. */ -namespace Alchemy\Phrasea\Controller\Root; +namespace Alchemy\Phrasea\ControllerProvider\Root; use Alchemy\Geonames\Exception\ExceptionInterface as GeonamesExceptionInterface; use Alchemy\Phrasea\Application as PhraseaApplication; +use Alchemy\Phrasea\ControllerProvider\Root\Login; use Alchemy\Phrasea\Exception\InvalidArgumentException; use Alchemy\Phrasea\Model\Entities\FtpCredential; use Alchemy\Phrasea\Model\Entities\ApiApplication; diff --git a/lib/Alchemy/Phrasea/Controller/Root/Developers.php b/lib/Alchemy/Phrasea/ControllerProvider/Root/Developers.php similarity index 99% rename from lib/Alchemy/Phrasea/Controller/Root/Developers.php rename to lib/Alchemy/Phrasea/ControllerProvider/Root/Developers.php index 802161cc9d..1e2fecb91b 100644 --- a/lib/Alchemy/Phrasea/Controller/Root/Developers.php +++ b/lib/Alchemy/Phrasea/ControllerProvider/Root/Developers.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Alchemy\Phrasea\Controller\Root; +namespace Alchemy\Phrasea\ControllerProvider\Root; use Alchemy\Phrasea\Exception\InvalidArgumentException; use Alchemy\Phrasea\Model\Entities\ApiApplication; diff --git a/lib/Alchemy/Phrasea/Controller/Root/Login.php b/lib/Alchemy/Phrasea/ControllerProvider/Root/Login.php similarity index 99% rename from lib/Alchemy/Phrasea/Controller/Root/Login.php rename to lib/Alchemy/Phrasea/ControllerProvider/Root/Login.php index 74066f1c0a..9920d5b6c9 100644 --- a/lib/Alchemy/Phrasea/Controller/Root/Login.php +++ b/lib/Alchemy/Phrasea/ControllerProvider/Root/Login.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Alchemy\Phrasea\Controller\Root; +namespace Alchemy\Phrasea\ControllerProvider\Root; use Alchemy\Phrasea\Application as PhraseaApplication; use Alchemy\Phrasea\Authentication\Exception\NotAuthenticatedException; diff --git a/lib/Alchemy/Phrasea/Controller/Root/RSSFeeds.php b/lib/Alchemy/Phrasea/ControllerProvider/Root/RSSFeeds.php similarity index 97% rename from lib/Alchemy/Phrasea/Controller/Root/RSSFeeds.php rename to lib/Alchemy/Phrasea/ControllerProvider/Root/RSSFeeds.php index 92fbcf5043..8555d1772a 100644 --- a/lib/Alchemy/Phrasea/Controller/Root/RSSFeeds.php +++ b/lib/Alchemy/Phrasea/ControllerProvider/Root/RSSFeeds.php @@ -9,9 +9,8 @@ * file that was distributed with this source code. */ -namespace Alchemy\Phrasea\Controller\Root; +namespace Alchemy\Phrasea\ControllerProvider\Root; -use Alchemy\Phrasea\Model\Entities\Feed; use Alchemy\Phrasea\Feed\Aggregate; use Silex\Application; use Silex\ControllerProviderInterface; diff --git a/lib/Alchemy/Phrasea/Controller/Root/Root.php b/lib/Alchemy/Phrasea/ControllerProvider/Root/Root.php similarity index 97% rename from lib/Alchemy/Phrasea/Controller/Root/Root.php rename to lib/Alchemy/Phrasea/ControllerProvider/Root/Root.php index 15966e7b11..09e2125238 100644 --- a/lib/Alchemy/Phrasea/Controller/Root/Root.php +++ b/lib/Alchemy/Phrasea/ControllerProvider/Root/Root.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Alchemy\Phrasea\Controller\Root; +namespace Alchemy\Phrasea\ControllerProvider\Root; use Silex\Application; use Silex\ControllerProviderInterface; diff --git a/lib/Alchemy/Phrasea/Controller/Root/Session.php b/lib/Alchemy/Phrasea/ControllerProvider/Root/Session.php similarity index 98% rename from lib/Alchemy/Phrasea/Controller/Root/Session.php rename to lib/Alchemy/Phrasea/ControllerProvider/Root/Session.php index 34d049261d..868900393e 100644 --- a/lib/Alchemy/Phrasea/Controller/Root/Session.php +++ b/lib/Alchemy/Phrasea/ControllerProvider/Root/Session.php @@ -9,8 +9,9 @@ * file that was distributed with this source code. */ -namespace Alchemy\Phrasea\Controller\Root; +namespace Alchemy\Phrasea\ControllerProvider\Root; +use Alchemy\Phrasea\Controller\Root\RedirectResponse; use Alchemy\Phrasea\Model\Entities\SessionModule; use Silex\Application; use Silex\ControllerProviderInterface; diff --git a/lib/Alchemy/Phrasea/Controller/Setup.php b/lib/Alchemy/Phrasea/ControllerProvider/Setup.php similarity index 99% rename from lib/Alchemy/Phrasea/Controller/Setup.php rename to lib/Alchemy/Phrasea/ControllerProvider/Setup.php index 7dc349f001..0d102b78a1 100644 --- a/lib/Alchemy/Phrasea/Controller/Setup.php +++ b/lib/Alchemy/Phrasea/ControllerProvider/Setup.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Alchemy\Phrasea\Controller; +namespace Alchemy\Phrasea\ControllerProvider; use Alchemy\Phrasea\Application; use Alchemy\Phrasea\Helper\DatabaseHelper; diff --git a/lib/Alchemy/Phrasea/Controller/Thesaurus/Thesaurus.php b/lib/Alchemy/Phrasea/ControllerProvider/Thesaurus/Thesaurus.php similarity index 99% rename from lib/Alchemy/Phrasea/Controller/Thesaurus/Thesaurus.php rename to lib/Alchemy/Phrasea/ControllerProvider/Thesaurus/Thesaurus.php index c3a6753f71..e45ac4dafa 100644 --- a/lib/Alchemy/Phrasea/Controller/Thesaurus/Thesaurus.php +++ b/lib/Alchemy/Phrasea/ControllerProvider/Thesaurus/Thesaurus.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Alchemy\Phrasea\Controller\Thesaurus; +namespace Alchemy\Phrasea\ControllerProvider\Thesaurus; use Doctrine\DBAL\Driver\Connection; use Silex\Application; diff --git a/lib/Alchemy/Phrasea/Controller/Thesaurus/Xmlhttp.php b/lib/Alchemy/Phrasea/ControllerProvider/Thesaurus/Xmlhttp.php similarity index 99% rename from lib/Alchemy/Phrasea/Controller/Thesaurus/Xmlhttp.php rename to lib/Alchemy/Phrasea/ControllerProvider/Thesaurus/Xmlhttp.php index 37937954be..942ad18a58 100644 --- a/lib/Alchemy/Phrasea/Controller/Thesaurus/Xmlhttp.php +++ b/lib/Alchemy/Phrasea/ControllerProvider/Thesaurus/Xmlhttp.php @@ -9,8 +9,11 @@ * file that was distributed with this source code. */ -namespace Alchemy\Phrasea\Controller\Thesaurus; +namespace Alchemy\Phrasea\ControllerProvider\Thesaurus; +use Alchemy\Phrasea\Controller\Thesaurus\caption_field; +use Alchemy\Phrasea\Controller\Thesaurus\caption_Field_Value; +use Alchemy\Phrasea\Controller\Thesaurus\databox; use Alchemy\Phrasea\Model\Entities\User; use Silex\Application; use Silex\ControllerProviderInterface; diff --git a/lib/Alchemy/Phrasea/Controller/User/Notifications.php b/lib/Alchemy/Phrasea/ControllerProvider/User/Notifications.php similarity index 97% rename from lib/Alchemy/Phrasea/Controller/User/Notifications.php rename to lib/Alchemy/Phrasea/ControllerProvider/User/Notifications.php index d13c0b52da..4f82147c1a 100644 --- a/lib/Alchemy/Phrasea/Controller/User/Notifications.php +++ b/lib/Alchemy/Phrasea/ControllerProvider/User/Notifications.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Alchemy\Phrasea\Controller\User; +namespace Alchemy\Phrasea\ControllerProvider\User; use Silex\Application; use Silex\ControllerProviderInterface; diff --git a/lib/Alchemy/Phrasea/Controller/User/Preferences.php b/lib/Alchemy/Phrasea/ControllerProvider/User/Preferences.php similarity index 98% rename from lib/Alchemy/Phrasea/Controller/User/Preferences.php rename to lib/Alchemy/Phrasea/ControllerProvider/User/Preferences.php index a642cc8376..73bb361e52 100644 --- a/lib/Alchemy/Phrasea/Controller/User/Preferences.php +++ b/lib/Alchemy/Phrasea/ControllerProvider/User/Preferences.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Alchemy\Phrasea\Controller\User; +namespace Alchemy\Phrasea\ControllerProvider\User; use Silex\Application; use Silex\ControllerProviderInterface; diff --git a/lib/Alchemy/Phrasea/Model/Manipulator/ApiAccountManipulator.php b/lib/Alchemy/Phrasea/Model/Manipulator/ApiAccountManipulator.php index d00d8855f6..5598f290ee 100644 --- a/lib/Alchemy/Phrasea/Model/Manipulator/ApiAccountManipulator.php +++ b/lib/Alchemy/Phrasea/Model/Manipulator/ApiAccountManipulator.php @@ -11,8 +11,7 @@ namespace Alchemy\Phrasea\Model\Manipulator; -use Alchemy\Phrasea\Application; -use Alchemy\Phrasea\Controller\Api\V1; +use Alchemy\Phrasea\ControllerProvider\Api\V1; use Alchemy\Phrasea\Model\Entities\ApiAccount; use Alchemy\Phrasea\Model\Entities\ApiApplication; use Alchemy\Phrasea\Model\Entities\User; diff --git a/tests/Alchemy/Tests/Phrasea/Controller/Admin/ConnectedUserTest.php b/tests/Alchemy/Tests/Phrasea/Controller/Admin/ConnectedUserTest.php index 5bee91e76c..7007879dab 100644 --- a/tests/Alchemy/Tests/Phrasea/Controller/Admin/ConnectedUserTest.php +++ b/tests/Alchemy/Tests/Phrasea/Controller/Admin/ConnectedUserTest.php @@ -2,7 +2,7 @@ namespace Alchemy\Tests\Phrasea\Controller\Admin; -use Alchemy\Phrasea\Controller\Admin\ConnectedUsers; +use Alchemy\Phrasea\ControllerProvider\Admin\ConnectedUsers; class ConnectedUserTest extends \PhraseanetAuthenticatedWebTestCase { diff --git a/tests/Alchemy/Tests/Phrasea/Controller/Api/ApiTestCase.php b/tests/Alchemy/Tests/Phrasea/Controller/Api/ApiTestCase.php index f473a7e34e..8ca5b4d93c 100644 --- a/tests/Alchemy/Tests/Phrasea/Controller/Api/ApiTestCase.php +++ b/tests/Alchemy/Tests/Phrasea/Controller/Api/ApiTestCase.php @@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Controller\Api; use Alchemy\Phrasea\Application; use Alchemy\Phrasea\Border\File; -use Alchemy\Phrasea\Controller\Api\V1; +use Alchemy\Phrasea\ControllerProvider\Api\V1; use Alchemy\Phrasea\Core\PhraseaEvents; use Alchemy\Phrasea\Authentication\Context; use Alchemy\Phrasea\Model\Entities\LazaretSession; diff --git a/tests/Alchemy/Tests/Phrasea/Controller/Api/ResultTest.php b/tests/Alchemy/Tests/Phrasea/Controller/Api/ResultTest.php index 4911d99418..a8a2c1a3a8 100644 --- a/tests/Alchemy/Tests/Phrasea/Controller/Api/ResultTest.php +++ b/tests/Alchemy/Tests/Phrasea/Controller/Api/ResultTest.php @@ -3,7 +3,7 @@ namespace Alchemy\Tests\Phrasea\Controller\Api; use Alchemy\Phrasea\Controller\Api\Result; -use Alchemy\Phrasea\Controller\Api\V1; +use Alchemy\Phrasea\ControllerProvider\Api\V1; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Yaml\Parser; diff --git a/tests/Alchemy/Tests/Phrasea/Controller/Prod/ShareTest.php b/tests/Alchemy/Tests/Phrasea/Controller/Prod/ShareTest.php index 72c3ef3f0a..e789ea40f7 100644 --- a/tests/Alchemy/Tests/Phrasea/Controller/Prod/ShareTest.php +++ b/tests/Alchemy/Tests/Phrasea/Controller/Prod/ShareTest.php @@ -2,7 +2,7 @@ namespace Alchemy\Tests\Phrasea\Controller\Prod; -use Alchemy\Phrasea\Controller\Prod\Share; +use Alchemy\Phrasea\ControllerProvider\Prod\Share; class ShareTest extends \PhraseanetAuthenticatedWebTestCase { diff --git a/tests/Alchemy/Tests/Phrasea/Model/Manipulator/ApiAccountManipulatorTest.php b/tests/Alchemy/Tests/Phrasea/Model/Manipulator/ApiAccountManipulatorTest.php index 5a0cd3203b..aaf276495d 100644 --- a/tests/Alchemy/Tests/Phrasea/Model/Manipulator/ApiAccountManipulatorTest.php +++ b/tests/Alchemy/Tests/Phrasea/Model/Manipulator/ApiAccountManipulatorTest.php @@ -2,7 +2,7 @@ namespace Alchemy\Tests\Phrasea\Model\Manipulator; -use Alchemy\Phrasea\Controller\Api\V1; +use Alchemy\Phrasea\ControllerProvider\Api\V1; use Alchemy\Phrasea\Model\Manipulator\ApiAccountManipulator; class ApiAccountManipulatorTest extends \PhraseanetTestCase