diff --git a/lib/Alchemy/Phrasea/Application.php b/lib/Alchemy/Phrasea/Application.php index a89a879923..f688553c60 100644 --- a/lib/Alchemy/Phrasea/Application.php +++ b/lib/Alchemy/Phrasea/Application.php @@ -30,7 +30,7 @@ use Alchemy\Phrasea\Controller\Admin\Users; use Alchemy\Phrasea\Controller\Client\Baskets as ClientBasket; use Alchemy\Phrasea\Controller\Client\Root as ClientRoot; use Alchemy\Phrasea\Controller\Minifier; -use Alchemy\Phrasea\Controller\Prod\Basket; +use Alchemy\Phrasea\Controller\Prod\BasketController; use Alchemy\Phrasea\Controller\Prod\Bridge; use Alchemy\Phrasea\Controller\Prod\Download; use Alchemy\Phrasea\Controller\Prod\DoDownload; @@ -787,7 +787,7 @@ class Application extends SilexApplication $this->mount('/prod/query/', new Query()); $this->mount('/prod/order/', new Order()); - $this->mount('/prod/baskets', new Basket()); + $this->mount('/prod/baskets', new BasketController()); $this->mount('/prod/download', new Download()); $this->mount('/prod/story', new Story()); $this->mount('/prod/WorkZone', new WorkZone()); diff --git a/lib/Alchemy/Phrasea/Authentication/Authenticator.php b/lib/Alchemy/Phrasea/Authentication/Authenticator.php index 0874804dde..1026f6e35b 100644 --- a/lib/Alchemy/Phrasea/Authentication/Authenticator.php +++ b/lib/Alchemy/Phrasea/Authentication/Authenticator.php @@ -15,7 +15,7 @@ use Alchemy\Phrasea\Application; use Alchemy\Phrasea\Exception\RuntimeException; use Browser; use Doctrine\ORM\EntityManager; -use Entities\Session; +use Alchemy\Phrasea\Model\Entities\Session; use Symfony\Component\HttpFoundation\Session\SessionInterface; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; @@ -88,7 +88,7 @@ class Authenticator public function refreshAccount(Session $session) { - if (!$this->em->getRepository('Entities\Session')->findOneBy(array('id' => $session->getId()))) { + if (!$this->em->getRepository('Alchemy\Phrasea\Model\Entities\Session')->findOneBy(array('id' => $session->getId()))) { throw new RuntimeException('Unable to refresh the session, it does not exist anymore'); } diff --git a/lib/Alchemy/Phrasea/Authentication/Manager.php b/lib/Alchemy/Phrasea/Authentication/Manager.php index 3795c99cc0..ab5e7f0c0b 100644 --- a/lib/Alchemy/Phrasea/Authentication/Manager.php +++ b/lib/Alchemy/Phrasea/Authentication/Manager.php @@ -11,7 +11,7 @@ namespace Alchemy\Phrasea\Authentication; -use Entities\Session; +use Alchemy\Phrasea\Model\Entities\Session; class Manager { diff --git a/lib/Alchemy/Phrasea/Authentication/PersistentCookie/Manager.php b/lib/Alchemy/Phrasea/Authentication/PersistentCookie/Manager.php index dd2c1bf359..5b52ff66d4 100644 --- a/lib/Alchemy/Phrasea/Authentication/PersistentCookie/Manager.php +++ b/lib/Alchemy/Phrasea/Authentication/PersistentCookie/Manager.php @@ -13,7 +13,7 @@ namespace Alchemy\Phrasea\Authentication\PersistentCookie; use Alchemy\Phrasea\Authentication\Phrasea\PasswordEncoder; use Doctrine\ORM\EntityManager; -use Entities\Session; +use Alchemy\Phrasea\Model\Entities\Session; class Manager { @@ -38,7 +38,7 @@ class Manager public function getSession($cookieValue) { $session = $this->em - ->getRepository('Entities\Session') + ->getRepository('Alchemy\Phrasea\Model\Entities\Session') ->findOneBy(array('token' => $cookieValue)); if (!$session) { diff --git a/lib/Alchemy/Phrasea/Authentication/Phrasea/FailureManager.php b/lib/Alchemy/Phrasea/Authentication/Phrasea/FailureManager.php index ef557949d0..611a1816a9 100644 --- a/lib/Alchemy/Phrasea/Authentication/Phrasea/FailureManager.php +++ b/lib/Alchemy/Phrasea/Authentication/Phrasea/FailureManager.php @@ -14,7 +14,7 @@ namespace Alchemy\Phrasea\Authentication\Phrasea; use Alchemy\Phrasea\Exception\InvalidArgumentException; use Alchemy\Phrasea\Authentication\Exception\RequireCaptchaException; use Doctrine\ORM\EntityManager; -use Entities\AuthFailure; +use Alchemy\Phrasea\Model\Entities\AuthFailure; use Neutron\ReCaptcha\ReCaptcha; use Symfony\Component\HttpFoundation\Request; @@ -80,7 +80,7 @@ class FailureManager public function checkFailures($username, Request $request) { $failures = $this->em - ->getRepository('Entities\AuthFailure') + ->getRepository('Alchemy\Phrasea\Model\Entities\AuthFailure') ->findLockedFailuresMatching($username, $request->getClientIp()); if (0 === count($failures)) { @@ -109,7 +109,7 @@ class FailureManager private function removeOldFailures() { $failures = $this->em - ->getRepository('Entities\AuthFailure') + ->getRepository('Alchemy\Phrasea\Model\Entities\AuthFailure') ->findOldFailures('-2 months'); if (0 < count($failures)) { diff --git a/lib/Alchemy/Phrasea/Border/Manager.php b/lib/Alchemy/Phrasea/Border/Manager.php index f28161219b..c07ccf6e1f 100644 --- a/lib/Alchemy/Phrasea/Border/Manager.php +++ b/lib/Alchemy/Phrasea/Border/Manager.php @@ -28,9 +28,10 @@ use Alchemy\Phrasea\Metadata\Tag\TfRecordid; use Alchemy\Phrasea\Metadata\Tag\TfSize; use Alchemy\Phrasea\Metadata\Tag\TfWidth; use Alchemy\Phrasea\Border\Attribute\Metadata as MetadataAttr; -use Entities\LazaretAttribute; -use Entities\LazaretFile; -use Entities\LazaretSession; +use Alchemy\Phrasea\Model\Entities\LazaretAttribute; +use Alchemy\Phrasea\Model\Entities\LazaretCheck; +use Alchemy\Phrasea\Model\Entities\LazaretFile; +use Alchemy\Phrasea\Model\Entities\LazaretSession; use MediaAlchemyst\Exception\ExceptionInterface as MediaAlchemystException; use MediaAlchemyst\Specification\Image as ImageSpec; use PHPExiftool\Driver\Metadata\Metadata; @@ -428,7 +429,8 @@ class Manager * @param Visa $visa The visa related to the package file * @param LazaretSession $session The current LazaretSession * @param Boolean $forced True if the file has been forced to quarantine - * @return \Entities\LazaretFile + * + * @return LazaretFile */ protected function createLazaret(File $file, Visa $visa, LazaretSession $session, $forced) { @@ -486,7 +488,7 @@ class Manager foreach ($visa->getResponses() as $response) { if ( ! $response->isOk()) { - $check = new \Entities\LazaretCheck(); + $check = new LazaretCheck(); $check->setCheckClassname(get_class($response->getChecker())); $check->setLazaretFile($lazaretFile); diff --git a/lib/Alchemy/Phrasea/Command/RecordAdd.php b/lib/Alchemy/Phrasea/Command/RecordAdd.php index ba5184266b..a56af11811 100644 --- a/lib/Alchemy/Phrasea/Command/RecordAdd.php +++ b/lib/Alchemy/Phrasea/Command/RecordAdd.php @@ -14,8 +14,8 @@ namespace Alchemy\Phrasea\Command; use Alchemy\Phrasea\Command\Command; use Alchemy\Phrasea\Border\File; use Alchemy\Phrasea\Border\Manager; -use Entities\LazaretFile; -use Entities\LazaretSession; +use Alchemy\Phrasea\Model\Entities\LazaretFile; +use Alchemy\Phrasea\Model\Entities\LazaretSession; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Input\InputInterface; diff --git a/lib/Alchemy/Phrasea/Controller/Admin/ConnectedUsers.php b/lib/Alchemy/Phrasea/Controller/Admin/ConnectedUsers.php index 06faee873c..4b75e35ca7 100644 --- a/lib/Alchemy/Phrasea/Controller/Admin/ConnectedUsers.php +++ b/lib/Alchemy/Phrasea/Controller/Admin/ConnectedUsers.php @@ -35,7 +35,7 @@ class ConnectedUsers implements ControllerProviderInterface public function listConnectedUsers(Application $app, Request $request) { - $dql = 'SELECT s FROM Entities\Session s + $dql = 'SELECT s FROM Alchemy\Phrasea\Model\Entities\Session s WHERE s.updated > :date ORDER BY s.updated DESC'; diff --git a/lib/Alchemy/Phrasea/Controller/Admin/Publications.php b/lib/Alchemy/Phrasea/Controller/Admin/Publications.php index f67008ce19..dff13e1485 100644 --- a/lib/Alchemy/Phrasea/Controller/Admin/Publications.php +++ b/lib/Alchemy/Phrasea/Controller/Admin/Publications.php @@ -12,8 +12,8 @@ namespace Alchemy\Phrasea\Controller\Admin; use Alchemy\Phrasea\Application as PhraseaApplication; -use Entities\Feed; -use Entities\FeedPublisher; +use Alchemy\Phrasea\Model\Entities\Feed; +use Alchemy\Phrasea\Model\Entities\FeedPublisher; use Silex\Application; use Silex\ControllerProviderInterface; use Symfony\Component\HttpFoundation\Request; @@ -37,7 +37,7 @@ class Publications implements ControllerProviderInterface }); $controllers->get('/list/', function(PhraseaApplication $app) { - $feeds = $app['EM']->getRepository('Entities\Feed')->getAllForUser( + $feeds = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\Feed')->getAllForUser( $app['authentication']->getUser() ); @@ -79,7 +79,7 @@ class Publications implements ControllerProviderInterface })->bind('admin_feeds_create'); $controllers->get('/feed/{id}/', function(PhraseaApplication $app, Request $request, $id) { - $feed = $app["EM"]->find('Entities\Feed', $id); + $feed = $app["EM"]->find('Alchemy\Phrasea\Model\Entities\Feed', $id); return $app['twig'] ->render('admin/publications/fiche.html.twig', array('feed' => $feed, 'error' => $app['request']->query->get('error'))); @@ -93,7 +93,7 @@ class Publications implements ControllerProviderInterface $app->abort(400, "Bad request"); } - $feed = $app["EM"]->find('Entities\Feed', $id); + $feed = $app["EM"]->find('Alchemy\Phrasea\Model\Entities\Feed', $id); try { $collection = \collection::get_from_base_id($app, $request->request->get('base_id')); @@ -109,7 +109,7 @@ class Publications implements ControllerProviderInterface return $app->redirectPath('admin_feeds_list'); })->before(function(Request $request) use ($app) { - $feed = $app["EM"]->find('Entities\Feed', $request->attributes->get('id')); + $feed = $app["EM"]->find('Alchemy\Phrasea\Model\Entities\Feed', $request->attributes->get('id')); if (!$feed->isOwner($app['authentication']->getUser())) { return $app->redirectPath('admin_feeds_feed', array('id' => $request->attributes->get('id'), 'error' => _('You are not the owner of this feed, you can not edit it'))); @@ -123,7 +123,7 @@ class Publications implements ControllerProviderInterface 'success' => false, 'message' => '', ); - $feed = $app["EM"]->find('Entities\Feed', $id); + $feed = $app["EM"]->find('Alchemy\Phrasea\Model\Entities\Feed', $id); if (null === $feed) { $app->abort(404, "Feed not found"); @@ -197,7 +197,7 @@ class Publications implements ControllerProviderInterface try { $request = $app['request']; $user = \User_Adapter::getInstance($request->request->get('usr_id'), $app); - $feed = $app["EM"]->find('Entities\Feed', $id); + $feed = $app["EM"]->find('Alchemy\Phrasea\Model\Entities\Feed', $id); $publisher = new FeedPublisher(); $publisher->setUsrId($user->get_id()); @@ -222,9 +222,9 @@ class Publications implements ControllerProviderInterface try { $request = $app['request']; - $feed = $app["EM"]->find('Entities\Feed', $id); + $feed = $app["EM"]->find('Alchemy\Phrasea\Model\Entities\Feed', $id); - $publisher = $app["EM"]->find('Entities\FeedPublisher', $request->request->get('publisher_id')); + $publisher = $app["EM"]->find('Alchemy\Phrasea\Model\Entities\FeedPublisher', $request->request->get('publisher_id')); if (null === $publisher) { $app->abort(404, "Feed Publisher not found"); } @@ -246,7 +246,7 @@ class Publications implements ControllerProviderInterface ->assert('id', '\d+'); $controllers->post('/feed/{id}/delete/', function(PhraseaApplication $app, $id) { - $feed = $app["EM"]->find('Entities\Feed', $id); + $feed = $app["EM"]->find('Alchemy\Phrasea\Model\Entities\Feed', $id); if (null === $feed) { $app->abort(404); diff --git a/lib/Alchemy/Phrasea/Controller/Admin/Users.php b/lib/Alchemy/Phrasea/Controller/Admin/Users.php index d8bb16ce0f..9bcf8f05a3 100644 --- a/lib/Alchemy/Phrasea/Controller/Admin/Users.php +++ b/lib/Alchemy/Phrasea/Controller/Admin/Users.php @@ -12,7 +12,7 @@ namespace Alchemy\Phrasea\Controller\Admin; use Alchemy\Phrasea\Helper\User as UserHelper; -use Entities\FtpCredential; +use Alchemy\Phrasea\Model\Entities\FtpCredential; use Silex\Application; use Silex\ControllerProviderInterface; use Symfony\Component\HttpFoundation\Request; diff --git a/lib/Alchemy/Phrasea/Controller/Client/Baskets.php b/lib/Alchemy/Phrasea/Controller/Client/Baskets.php index 2916ef8695..f935176aac 100644 --- a/lib/Alchemy/Phrasea/Controller/Client/Baskets.php +++ b/lib/Alchemy/Phrasea/Controller/Client/Baskets.php @@ -11,8 +11,8 @@ namespace Alchemy\Phrasea\Controller\Client; -use Entities\Basket; -use Entities\BasketElement; +use Alchemy\Phrasea\Model\Entities\Basket; +use Alchemy\Phrasea\Model\Entities\BasketElement; use Doctrine\Common\Collections\ArrayCollection; use Silex\Application; use Silex\ControllerProviderInterface; @@ -139,7 +139,7 @@ class Baskets implements ControllerProviderInterface public function deleteBasketElement(Application $app, Request $request) { try { - $repository = $app['EM']->getRepository('\Entities\BasketElement'); + $repository = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\BasketElement'); $basketElement = $repository->findUserElement($request->request->get('p0'), $app['authentication']->getUser()); $app['EM']->remove($basketElement); $app['EM']->flush(); @@ -162,7 +162,7 @@ class Baskets implements ControllerProviderInterface public function deleteBasket(Application $app, Request $request) { try { - $repository = $app['EM']->getRepository('\Entities\Basket'); + $repository = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\Basket'); /* @var $repository \Repositories\BasketRepository */ $basket = $repository->findUserBasket($app, $request->request->get('courChuId'), $app['authentication']->getUser(), true); @@ -213,7 +213,7 @@ class Baskets implements ControllerProviderInterface */ public function addElementToBasket(Application $app, Request $request) { - $repository = $app['EM']->getRepository('\Entities\Basket'); + $repository = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\Basket'); /* @var $repository \Repositories\BasketRepository */ $basket = $repository->findUserBasket($app, $request->request->get('courChuId'), $app['authentication']->getUser(), true); @@ -249,7 +249,7 @@ class Baskets implements ControllerProviderInterface public function getBaskets(Application $app, Request $request) { $selectedBasketId = trim($request->get('courChuId', '')); - $baskets = new ArrayCollection($app['EM']->getRepository('\Entities\Basket')->findActiveByUser($app['authentication']->getUser())); + $baskets = new ArrayCollection($app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\Basket')->findActiveByUser($app['authentication']->getUser())); $selectedBasket = null; if ('' === $selectedBasketId && $baskets->count() > 0) { @@ -257,7 +257,7 @@ class Baskets implements ControllerProviderInterface } if ('' !== $selectedBasketId) { - $selectedBasket = $app['EM']->getRepository('\Entities\Basket')->findUserBasket($app, $selectedBasketId, $app['authentication']->getUser(), true); + $selectedBasket = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\Basket')->findUserBasket($app, $selectedBasketId, $app['authentication']->getUser(), true); } $basketCollections = $baskets->partition(function($key, $basket) { @@ -283,7 +283,7 @@ class Baskets implements ControllerProviderInterface public function checkBaskets(Application $app, Request $request) { $noview = 0; - $repository = $app['EM']->getRepository('\Entities\Basket'); + $repository = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\Basket'); /* @var $repository \Repositories\BasketRepository */ $baskets = $repository->findActiveByUser($app['authentication']->getUser()); diff --git a/lib/Alchemy/Phrasea/Controller/Client/Root.php b/lib/Alchemy/Phrasea/Controller/Client/Root.php index 0e40bf93a0..41503b7c9e 100644 --- a/lib/Alchemy/Phrasea/Controller/Client/Root.php +++ b/lib/Alchemy/Phrasea/Controller/Client/Root.php @@ -14,7 +14,7 @@ namespace Alchemy\Phrasea\Controller\Client; use Alchemy\Phrasea\Feed\Aggregate; use Alchemy\Phrasea\SearchEngine\SearchEngineOptions; use Alchemy\Phrasea\Exception\SessionNotFound; -use Entities\UserQuery; +use Alchemy\Phrasea\Model\Entities\UserQuery; use Silex\Application; use Silex\ControllerProviderInterface; use Symfony\Component\Finder\Finder; diff --git a/lib/Alchemy/Phrasea/Controller/Datafiles.php b/lib/Alchemy/Phrasea/Controller/Datafiles.php index 628b763580..9499c71152 100644 --- a/lib/Alchemy/Phrasea/Controller/Datafiles.php +++ b/lib/Alchemy/Phrasea/Controller/Datafiles.php @@ -85,7 +85,7 @@ class Datafiles extends AbstractDelivery if ($watermark && !$all_access) { - $repository = $app['EM']->getRepository('\Entities\BasketElement'); + $repository = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\BasketElement'); /* @var $repository \Repositories\BasketElementRepository */ diff --git a/lib/Alchemy/Phrasea/Controller/Lightbox.php b/lib/Alchemy/Phrasea/Controller/Lightbox.php index 440be22108..c866ee0f0b 100644 --- a/lib/Alchemy/Phrasea/Controller/Lightbox.php +++ b/lib/Alchemy/Phrasea/Controller/Lightbox.php @@ -11,6 +11,8 @@ namespace Alchemy\Phrasea\Controller; +use Alchemy\Phrasea\Model\Entities\Basket; +use Alchemy\Phrasea\Model\Entities\BasketElement; use Alchemy\Phrasea\Exception\SessionNotFound; use Alchemy\Phrasea\Controller\Exception as ControllerException; use Silex\ControllerProviderInterface; @@ -69,7 +71,7 @@ class Lightbox implements ControllerProviderInterface return $app->redirectPath('logout'); } - $repository = $app['EM']->getRepository('\Entities\Basket'); + $repository = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\Basket'); /* @var $repository \Repositories\BasketRepository */ @@ -99,7 +101,7 @@ class Lightbox implements ControllerProviderInterface } $basketElement = $app['EM'] - ->getRepository('\Entities\BasketElement') + ->getRepository('Alchemy\Phrasea\Model\Entities\BasketElement') ->findUserElement($sselcont_id, $app['authentication']->getUser()); $parameters = array( @@ -114,7 +116,7 @@ class Lightbox implements ControllerProviderInterface $controllers->get('/ajax/LOAD_BASKET_ELEMENT/{sselcont_id}/', function(SilexApplication $app, $sselcont_id) { /* @var $repository \Repositories\BasketElementRepository */ - $repository = $app['EM']->getRepository('\Entities\BasketElement'); + $repository = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\BasketElement'); $BasketElement = $repository->findUserElement($sselcont_id, $app['authentication']->getUser()); @@ -160,7 +162,7 @@ class Lightbox implements ControllerProviderInterface $controllers->get('/ajax/LOAD_FEED_ITEM/{entry_id}/{item_id}/', function(SilexApplication $app, $entry_id, $item_id) { - $entry = $app['EM']->getRepository('Entities\FeedEntry')->find($entry_id); + $entry = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\FeedEntry')->find($entry_id); $item = $entry->getItem($item_id); if ($app['browser']->isMobile()) { @@ -205,7 +207,7 @@ class Lightbox implements ControllerProviderInterface return $app->redirectPath('logout'); } - $repository = $app['EM']->getRepository('\Entities\Basket'); + $repository = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\Basket'); /* @var $repository \Repositories\BasketRepository */ $basket_collection = $repository->findActiveValidationAndBasketByUser( @@ -259,7 +261,7 @@ class Lightbox implements ControllerProviderInterface return $app->redirectPath('logout'); } - $repository = $app['EM']->getRepository('\Entities\Basket'); + $repository = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\Basket'); /* @var $repository \Repositories\BasketRepository */ $basket_collection = $repository->findActiveValidationAndBasketByUser( @@ -313,7 +315,7 @@ class Lightbox implements ControllerProviderInterface return $app->redirectPath('logout'); } - $feed_entry = $app['EM']->getRepository('Entities\FeedEntry')->find($entry_id); + $feed_entry = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\FeedEntry')->find($entry_id); $template = 'lightbox/feed.html.twig'; @@ -344,7 +346,7 @@ class Lightbox implements ControllerProviderInterface $template = 'lightbox/basket_content_report.html.twig'; - $repository = $app['EM']->getRepository('\Entities\Basket'); + $repository = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\Basket'); /* @var $repository \Repositories\BasketRepository */ $basket = $repository->findUserBasket( @@ -372,7 +374,7 @@ class Lightbox implements ControllerProviderInterface } /* @var $repository \Repositories\BasketElementRepository */ - $repository = $app['EM']->getRepository('\Entities\BasketElement'); + $repository = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\BasketElement'); $basket_element = $repository->findUserElement($sselcont_id, $app['authentication']->getUser()); @@ -419,14 +421,14 @@ class Lightbox implements ControllerProviderInterface 'datas' => _('Erreur lors de la mise a jour des donnes ') ); - $repository = $app['EM']->getRepository('\Entities\BasketElement'); + $repository = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\BasketElement'); /* @var $repository \Repositories\BasketElementRepository */ $basket_element = $repository->findUserElement( $sselcont_id , $app['authentication']->getUser() ); - /* @var $basket_element \Entities\BasketElement */ + /* @var $basket_element BasketElement */ $validationDatas = $basket_element->getUserValidationDatas($app['authentication']->getUser(), $app); if (!$basket_element->getBasket() @@ -466,7 +468,7 @@ class Lightbox implements ControllerProviderInterface $controllers->post('/ajax/SET_RELEASE/{ssel_id}/', function(SilexApplication $app, $ssel_id) { - $repository = $app['EM']->getRepository('\Entities\Basket'); + $repository = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\Basket'); $datas = array('error' => true, 'datas' => ''); @@ -487,7 +489,7 @@ class Lightbox implements ControllerProviderInterface } $agreed = false; - /* @var $basket \Entities\Basket */ + /* @var $basket Basket */ foreach ($basket->getElements() as $element) { if (null !== $element->getUserValidationDatas($app['authentication']->getUser(), $app)->getAgreement()) { $agreed = true; @@ -498,7 +500,7 @@ class Lightbox implements ControllerProviderInterface throw new ControllerException(_('You have to give your feedback at least on one document to send a report')); } - /* @var $basket \Entities\Basket */ + /* @var $basket Basket */ $participant = $basket->getValidation()->getParticipant($app['authentication']->getUser(), $app); $expires = new \DateTime('+10 days'); diff --git a/lib/Alchemy/Phrasea/Controller/Permalink.php b/lib/Alchemy/Phrasea/Controller/Permalink.php index 5464d7a154..4562f631dd 100644 --- a/lib/Alchemy/Phrasea/Controller/Permalink.php +++ b/lib/Alchemy/Phrasea/Controller/Permalink.php @@ -32,7 +32,7 @@ class Permalink extends AbstractDelivery $that = $this; $retrieveRecord = function ($app, $databox, $token, $record_id, $subdef) { - if (in_array($subdef, array(\databox_subdef::CLASS_PREVIEW, \databox_subdef::CLASS_THUMBNAIL)) && $app['EM']->getRepository('Entities\FeedItem')->isRecordInPublicFeed($app, $databox->get_sbas_id(), $record_id)) { + if (in_array($subdef, array(\databox_subdef::CLASS_PREVIEW, \databox_subdef::CLASS_THUMBNAIL)) && $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\FeedItem')->isRecordInPublicFeed($app, $databox->get_sbas_id(), $record_id)) { $record = $databox->get_record($record_id); } else { $record = \media_Permalink_Adapter::challenge_token($app, $databox, $token, $record_id, $subdef); @@ -75,7 +75,7 @@ class Permalink extends AbstractDelivery if ($watermark) { - $repository = $app['EM']->getRepository('\Entities\BasketElement'); + $repository = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\BasketElement'); if (count($repository->findReceivedValidationElementsByRecord($record, $user)) > 0) { $watermark = false; diff --git a/lib/Alchemy/Phrasea/Controller/Prod/Basket.php b/lib/Alchemy/Phrasea/Controller/Prod/BasketController.php similarity index 91% rename from lib/Alchemy/Phrasea/Controller/Prod/Basket.php rename to lib/Alchemy/Phrasea/Controller/Prod/BasketController.php index ad7b04ed57..a34b46f557 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/Basket.php +++ b/lib/Alchemy/Phrasea/Controller/Prod/BasketController.php @@ -12,9 +12,9 @@ namespace Alchemy\Phrasea\Controller\Prod; use Alchemy\Phrasea\Controller\RecordsRequest; -use Entities\Basket as BasketEntity; -use Entities\BasketElement; -use Entities\ValidationData; +use Alchemy\Phrasea\Model\Entities\Basket as BasketEntity; +use Alchemy\Phrasea\Model\Entities\BasketElement; +use Alchemy\Phrasea\Model\Entities\ValidationData; use Silex\Application; use Silex\ControllerProviderInterface; use Symfony\Component\HttpFoundation\Request; @@ -26,7 +26,7 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; * @license http://opensource.org/licenses/gpl-3.0 GPLv3 * @link www.phraseanet.com */ -class Basket implements ControllerProviderInterface +class BasketController implements ControllerProviderInterface { public function connect(Application $app) @@ -139,7 +139,7 @@ class Basket implements ControllerProviderInterface public function displayBasket(Application $app, Request $request, $basket_id) { - $basket = $app['EM']->getRepository('\Entities\Basket') + $basket = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\Basket') ->findUserBasket($app, $basket_id, $app['authentication']->getUser(), false); if ($basket->getIsRead() === false) { @@ -214,7 +214,7 @@ class Basket implements ControllerProviderInterface public function deleteBasket(Application $app, Request $request, $basket_id) { - $basket = $app['EM']->getRepository('\Entities\Basket') + $basket = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\Basket') ->findUserBasket($app, $basket_id, $app['authentication']->getUser(), true); $app['EM']->remove($basket); @@ -234,11 +234,11 @@ class Basket implements ControllerProviderInterface public function removeBasketElement(Application $app, Request $request, $basket_id, $basket_element_id) { - $basket = $app['EM']->getRepository('\Entities\Basket') + $basket = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\Basket') ->findUserBasket($app, $basket_id, $app['authentication']->getUser(), true); foreach ($basket->getElements() as $basket_element) { - /* @var $basket_element \Entities\BasketElement */ + /* @var $basket_element BasketElement */ if ($basket_element->getId() == $basket_element_id) { $app['EM']->remove($basket_element); } @@ -263,7 +263,7 @@ class Basket implements ControllerProviderInterface $success = false; try { - $basket = $app['EM']->getRepository('\Entities\Basket') + $basket = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\Basket') ->findUserBasket($app, $basket_id, $app['authentication']->getUser(), true); $basket->setName($request->request->get('name', '')); @@ -298,7 +298,7 @@ class Basket implements ControllerProviderInterface public function displayUpdateForm(Application $app, $basket_id) { $basket = $app['EM'] - ->getRepository('\Entities\Basket') + ->getRepository('Alchemy\Phrasea\Model\Entities\Basket') ->findUserBasket($app, $basket_id, $app['authentication']->getUser(), true); return $app['twig']->render('prod/Baskets/Update.html.twig', array('basket' => $basket)); @@ -307,7 +307,7 @@ class Basket implements ControllerProviderInterface public function displayReorderForm(Application $app, $basket_id) { $basket = $app['EM'] - ->getRepository('\Entities\Basket') + ->getRepository('Alchemy\Phrasea\Model\Entities\Basket') ->findUserBasket($app, $basket_id, $app['authentication']->getUser(), true); return $app['twig']->render('prod/Baskets/Reorder.html.twig', array('basket' => $basket)); @@ -317,12 +317,12 @@ class Basket implements ControllerProviderInterface { $ret = array('success' => false, 'message' => _('An error occured')); try { - $basket = $app['EM']->getRepository('\Entities\Basket') + $basket = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\Basket') ->findUserBasket($app, $basket_id, $app['authentication']->getUser(), true); $order = $app['request']->request->get('element'); - /* @var $basket \Entities\Basket */ + /* @var $basket BasketEntity */ foreach ($basket->getElements() as $basketElement) { if (isset($order[$basketElement->getId()])) { $basketElement->setOrd($order[$basketElement->getId()]); @@ -342,7 +342,7 @@ class Basket implements ControllerProviderInterface public function archiveBasket(Application $app, Request $request, $basket_id) { - $basket = $app['EM']->getRepository('\Entities\Basket') + $basket = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\Basket') ->findUserBasket($app, $basket_id, $app['authentication']->getUser(), true); $archive_status = (Boolean) $request->query->get('archive'); @@ -373,7 +373,7 @@ class Basket implements ControllerProviderInterface public function addElements(Application $app, Request $request, $basket_id) { - $basket = $app['EM']->getRepository('\Entities\Basket') + $basket = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\Basket') ->findUserBasket($app, $basket_id, $app['authentication']->getUser(), true); $n = 0; @@ -424,14 +424,14 @@ class Basket implements ControllerProviderInterface public function stealElements(Application $app, Request $request, $basket_id) { - $basket = $app['EM']->getRepository('\Entities\Basket') + $basket = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\Basket') ->findUserBasket($app, $basket_id, $app['authentication']->getUser(), true); $n = 0; foreach ($request->request->get('elements') as $bask_element_id) { try { - $basket_element = $app['EM']->getRepository('\Entities\BasketElement') + $basket_element = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\BasketElement') ->findUserElement($bask_element_id, $app['authentication']->getUser()); } catch (\Exception $e) { continue; diff --git a/lib/Alchemy/Phrasea/Controller/Prod/Feed.php b/lib/Alchemy/Phrasea/Controller/Prod/Feed.php index 84f68e14e9..6283003c6d 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/Feed.php +++ b/lib/Alchemy/Phrasea/Controller/Prod/Feed.php @@ -15,8 +15,8 @@ use Alchemy\Phrasea\Controller\RecordsRequest; use Alchemy\Phrasea\Feed\Aggregate; use Alchemy\Phrasea\Feed\Link\AggregateLinkGenerator; use Alchemy\Phrasea\Feed\Link\FeedLinkGenerator; -use Entities\FeedEntry; -use Entities\FeedItem; +use Alchemy\Phrasea\Model\Entities\FeedEntry; +use Alchemy\Phrasea\Model\Entities\FeedItem; use Silex\Application; use Silex\ControllerProviderInterface; use Symfony\Component\HttpFoundation\Request; @@ -43,7 +43,7 @@ class Feed implements ControllerProviderInterface * I got a selection of docs, which publications are available forthese docs ? */ $controllers->post('/requestavailable/', function(Application $app, Request $request) { - $feeds = $app['EM']->getRepository('Entities\Feed')->getAllForUser($app['authentication']->getUser()); + $feeds = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\Feed')->getAllForUser($app['authentication']->getUser()); $publishing = RecordsRequest::fromRequest($app, $request, true, array(), array('bas_chupub')); return $app['twig']->render('prod/actions/publish/publish.html.twig', array('publishing' => $publishing, 'feeds' => $feeds)); @@ -53,13 +53,13 @@ class Feed implements ControllerProviderInterface * I've selected a publication for my docs, let's publish them */ $controllers->post('/entry/create/', function(Application $app, Request $request) { - $feed = $app['EM']->getRepository('Entities\Feed')->find($request->request->get('feed_id')); + $feed = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\Feed')->find($request->request->get('feed_id')); if (null === $feed) { $app->abort(404, "Feed not found"); } - $publisher = $app['EM']->getRepository('Entities\FeedPublisher')->findOneBy(array('feed' => $feed, 'usrId' => $app['authentication']->getUser()->get_id())); + $publisher = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\FeedPublisher')->findOneBy(array('feed' => $feed, 'usrId' => $app['authentication']->getUser()->get_id())); if ('' === $title = trim($request->request->get('title', ''))) { $app->abort(400, "Bad request"); @@ -105,13 +105,13 @@ class Feed implements ControllerProviderInterface }); $controllers->get('/entry/{id}/edit/', function(Application $app, Request $request, $id) { - $entry = $app['EM']->getRepository('Entities\FeedEntry')->find($id); + $entry = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\FeedEntry')->find($id); if (!$entry->isPublisher($app['authentication']->getUser())) { throw new AccessDeniedHttpException(); } - $feeds = $app['EM']->getRepository('Entities\Feed')->getAllForUser($app['authentication']->getUser()); + $feeds = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\Feed')->getAllForUser($app['authentication']->getUser()); $datas = $app['twig']->render('prod/actions/publish/publish_edit.html.twig', array('entry' => $entry, 'feeds' => $feeds)); @@ -125,7 +125,7 @@ class Feed implements ControllerProviderInterface $controllers->post('/entry/{id}/update/', function(Application $app, Request $request, $id) { $datas = array('error' => true, 'message' => '', 'datas' => ''); - $entry = $app['EM']->getRepository('Entities\FeedEntry')->find($id); + $entry = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\FeedEntry')->find($id); if (null === $entry) { $app->abort(404, 'Entry not found'); @@ -146,7 +146,7 @@ class Feed implements ControllerProviderInterface $new_feed_id = $request->request->get('feed_id', $currentFeedId); if ($currentFeedId !== (int) $new_feed_id) { - $new_feed = $app['EM']->getRepository('Entities\Feed')->find($new_feed_id); + $new_feed = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\Feed')->find($new_feed_id); if ($new_feed === null) { $app->abort(404, 'Feed not found'); @@ -165,7 +165,7 @@ class Feed implements ControllerProviderInterface if (count($item_sort_datas) != 2) { continue; } - $item = $app['EM']->getRepository('Entities\FeedItem')->find($item_sort_datas[0]); + $item = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\FeedItem')->find($item_sort_datas[0]); $item->setOrd($item_sort_datas[1]); $app['EM']->persist($item); } @@ -189,7 +189,7 @@ class Feed implements ControllerProviderInterface $controllers->post('/entry/{id}/delete/', function(Application $app, Request $request, $id) { $datas = array('error' => true, 'message' => ''); - $entry = $app['EM']->getRepository('Entities\FeedEntry')->find($id); + $entry = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\FeedEntry')->find($id); if (null === $entry) { $app->abort(404, 'Entry not found'); @@ -213,7 +213,7 @@ class Feed implements ControllerProviderInterface $page = (int) $request->query->get('page'); $page = $page > 0 ? $page : 1; - $feeds = $app['EM']->getRepository('Entities\Feed')->getAllForUser($app['authentication']->getUser()); + $feeds = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\Feed')->getAllForUser($app['authentication']->getUser()); $datas = $app['twig']->render('prod/feeds/feeds.html.twig', array( 'feeds' => $feeds, @@ -228,11 +228,11 @@ class Feed implements ControllerProviderInterface $page = (int) $request->query->get('page'); $page = $page > 0 ? $page : 1; - $feed = $app['EM']->getRepository('Entities\Feed')->find($id); + $feed = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\Feed')->find($id); if (!$feed->isAccessible($app['authentication']->getUser(), $app)) { $app->abort(404, 'Feed not found'); } - $feeds = $app['EM']->getRepository('Entities\Feed')->getAllForUser($app['authentication']->getUser()); + $feeds = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\Feed')->getAllForUser($app['authentication']->getUser()); $datas = $app['twig']->render('prod/feeds/feeds.html.twig', array('feed' => $feed, 'feeds' => $feeds, 'page' => $page)); @@ -244,7 +244,7 @@ class Feed implements ControllerProviderInterface $controllers->get('/subscribe/aggregated/', function(Application $app, Request $request) { $renew = ($request->query->get('renew') === 'true'); - $feeds = $app['EM']->getRepository('Entities\Feed')->getAllForUser($app['authentication']->getUser()); + $feeds = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\Feed')->getAllForUser($app['authentication']->getUser()); $link = $app['feed.aggregate-link-generator']->generate(new Aggregate($app['EM'], $feeds), $app['authentication']->getUser(), @@ -265,7 +265,7 @@ class Feed implements ControllerProviderInterface $controllers->get('/subscribe/{id}/', function(Application $app, Request $request, $id) { $renew = ($request->query->get('renew') === 'true'); - $feed = $app['EM']->getRepository('Entities\Feed')->find($id); + $feed = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\Feed')->find($id); if (!$feed->isAccessible($app['authentication']->getUser(), $app)) { $app->abort(404, 'Feed not found'); } diff --git a/lib/Alchemy/Phrasea/Controller/Prod/Lazaret.php b/lib/Alchemy/Phrasea/Controller/Prod/Lazaret.php index 4497f3981b..bd4d1831a3 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/Lazaret.php +++ b/lib/Alchemy/Phrasea/Controller/Prod/Lazaret.php @@ -11,7 +11,7 @@ namespace Alchemy\Phrasea\Controller\Prod; -use Entities\LazaretFile; +use Alchemy\Phrasea\Model\Entities\LazaretFile; use Alchemy\Phrasea\Border; use Alchemy\Phrasea\Border\Attribute\AttributeInterface; use Alchemy\Phrasea\Http\DeliverDataInterface; @@ -180,7 +180,7 @@ class Lazaret implements ControllerProviderInterface $lazaretFiles = null; if (count($baseIds) > 0) { - $lazaretRepository = $app['EM']->getRepository('Entities\LazaretFile'); + $lazaretRepository = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\LazaretFile'); $lazaretFiles = $lazaretRepository->findPerPage( $baseIds, $request->query->get('offset', 0), $request->query->get('limit', 10) @@ -205,9 +205,9 @@ class Lazaret implements ControllerProviderInterface { $ret = array('success' => false, 'message' => '', 'result' => array()); - $lazaretFile = $app['EM']->find('Entities\LazaretFile', $file_id); + $lazaretFile = $app['EM']->find('Alchemy\Phrasea\Model\Entities\LazaretFile', $file_id); - /* @var $lazaretFile \Entities\LazaretFile */ + /* @var $lazaretFile LazaretFile */ if (null === $lazaretFile) { $ret['message'] = _('File is not present in quarantine anymore, please refresh'); @@ -254,9 +254,9 @@ class Lazaret implements ControllerProviderInterface return $app->json($ret); } - $lazaretFile = $app['EM']->find('Entities\LazaretFile', $file_id); + $lazaretFile = $app['EM']->find('Alchemy\Phrasea\Model\Entities\LazaretFile', $file_id); - /* @var $lazaretFile \Entities\LazaretFile */ + /* @var $lazaretFile LazaretFile */ if (null === $lazaretFile) { $ret['message'] = _('File is not present in quarantine anymore, please refresh'); @@ -363,8 +363,8 @@ class Lazaret implements ControllerProviderInterface { $ret = array('success' => false, 'message' => '', 'result' => array()); - $lazaretFile = $app['EM']->find('Entities\LazaretFile', $file_id); - /* @var $lazaretFile \Entities\LazaretFile */ + $lazaretFile = $app['EM']->find('Alchemy\Phrasea\Model\Entities\LazaretFile', $file_id); + /* @var $lazaretFile LazaretFile */ if (null === $lazaretFile) { $ret['message'] = _('File is not present in quarantine anymore, please refresh'); @@ -410,7 +410,7 @@ class Lazaret implements ControllerProviderInterface { $ret = array('success' => false, 'message' => '', 'result' => array()); - $lazaretFiles = $app['EM']->getRepository('Entities\LazaretFile')->findAll(); + $lazaretFiles = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\LazaretFile')->findAll(); $app['EM']->beginTransaction(); @@ -448,9 +448,9 @@ class Lazaret implements ControllerProviderInterface return $app->json($ret); } - $lazaretFile = $app['EM']->find('Entities\LazaretFile', $file_id); + $lazaretFile = $app['EM']->find('Alchemy\Phrasea\Model\Entities\LazaretFile', $file_id); - /* @var $lazaretFile \Entities\LazaretFile */ + /* @var $lazaretFile LazaretFile */ if (null === $lazaretFile) { $ret['message'] = _('File is not present in quarantine anymore, please refresh'); @@ -519,9 +519,9 @@ class Lazaret implements ControllerProviderInterface */ public function thumbnailElement(Application $app, Request $request, $file_id) { - $lazaretFile = $app['EM']->find('Entities\LazaretFile', $file_id); + $lazaretFile = $app['EM']->find('Alchemy\Phrasea\Model\Entities\LazaretFile', $file_id); - /* @var $lazaretFile \Entities\LazaretFile */ + /* @var $lazaretFile LazaretFile */ if (null === $lazaretFile) { return new Response(null, 404); } diff --git a/lib/Alchemy/Phrasea/Controller/Prod/Order.php b/lib/Alchemy/Phrasea/Controller/Prod/Order.php index 562c48b0b6..8c16a9d455 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/Order.php +++ b/lib/Alchemy/Phrasea/Controller/Prod/Order.php @@ -13,10 +13,10 @@ namespace Alchemy\Phrasea\Controller\Prod; use Alchemy\Phrasea\Controller\RecordsRequest; use Doctrine\Common\Collections\ArrayCollection; -use Entities\Basket; -use Entities\BasketElement; -use Entities\Order as OrderEntity; -use Entities\OrderElement; +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\OrderElement; use Silex\Application; use Silex\ControllerProviderInterface; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; @@ -261,8 +261,8 @@ class Order implements ControllerProviderInterface $baseIds = array_keys($app['authentication']->getUser()->ACL()->get_granted_base(array('order_master'))); - $ordersList = $app['EM']->getRepository('Entities\Order')->listOrders($baseIds, $offsetStart, $perPage, $sort); - $total = $app['EM']->getRepository('Entities\Order')->countTotalOrders($baseIds); + $ordersList = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\Order')->listOrders($baseIds, $offsetStart, $perPage, $sort); + $total = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\Order')->countTotalOrders($baseIds); return $app['twig']->render('prod/orders/order_box.html.twig', array( 'page' => $page, @@ -284,7 +284,7 @@ class Order implements ControllerProviderInterface */ public function displayOneOrder(Application $app, Request $request, $order_id) { - $order = $app['EM']->getRepository('Entities\Order')->find($order_id); + $order = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\Order')->find($order_id); if (null === $order) { throw new NotFoundHttpException('Order not found'); } @@ -305,7 +305,7 @@ class Order implements ControllerProviderInterface public function sendOrder(Application $app, Request $request, $order_id) { $success = false; - $order = $app['EM']->getRepository('Entities\Order')->find($order_id); + $order = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\Order')->find($order_id); if (null === $order) { throw new NotFoundHttpException('Order not found'); } @@ -392,7 +392,7 @@ class Order implements ControllerProviderInterface public function denyOrder(Application $app, Request $request, $order_id) { $success = false; - $order = $app['EM']->getRepository('Entities\Order')->find($order_id); + $order = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\Order')->find($order_id); if (null === $order) { throw new NotFoundHttpException('Order not found'); } diff --git a/lib/Alchemy/Phrasea/Controller/Prod/Push.php b/lib/Alchemy/Phrasea/Controller/Prod/Push.php index 1bd2d499be..6614274c69 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/Push.php +++ b/lib/Alchemy/Phrasea/Controller/Prod/Push.php @@ -11,6 +11,13 @@ namespace Alchemy\Phrasea\Controller\Prod; +use Alchemy\Phrasea\Model\Entities\Basket; +use Alchemy\Phrasea\Model\Entities\BasketElement; +use Alchemy\Phrasea\Model\Entities\UsrList; +use Alchemy\Phrasea\Model\Entities\UsrListEntry; +use Alchemy\Phrasea\Model\Entities\ValidationSession; +use Alchemy\Phrasea\Model\Entities\ValidationData; +use Alchemy\Phrasea\Model\Entities\ValidationParticipant; use Silex\Application; use Silex\ControllerProviderInterface; use Alchemy\Phrasea\Helper\Record as RecordHelper; @@ -48,11 +55,11 @@ class Push implements ControllerProviderInterface { $userFormatter = $this->getUserFormatter(); - return function(\Entities\UsrList $List) use ($userFormatter, $app) { + return function(UsrList $List) use ($userFormatter, $app) { $entries = array(); foreach ($List->getEntries() as $entry) { - /* @var $entry \Entities\UsrListEntry */ + /* @var $entry UsrListEntry */ $entries[] = array( 'Id' => $entry->getId(), 'User' => $userFormatter($entry->getUser($app)) @@ -113,7 +120,7 @@ class Push implements ControllerProviderInterface $controllers->post('/sendform/', function(Application $app) use ($userSelection) { $push = new RecordHelper\Push($app, $app['request']); - $repository = $app['EM']->getRepository('\Entities\UsrList'); + $repository = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\UsrList'); $RecommendedUsers = $userSelection($push->get_elements()); @@ -131,7 +138,7 @@ class Push implements ControllerProviderInterface $controllers->post('/validateform/', function(Application $app) use ($userSelection) { $push = new RecordHelper\Push($app, $app['request']); - $repository = $app['EM']->getRepository('\Entities\UsrList'); + $repository = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\UsrList'); $RecommendedUsers = $userSelection($push->get_elements()); @@ -177,7 +184,7 @@ class Push implements ControllerProviderInterface throw new ControllerException(sprintf(_('Unknown user %d'), $receiver['usr_id'])); } - $Basket = new \Entities\Basket(); + $Basket = new Basket(); $Basket->setName($push_name); $Basket->setDescription($push_description); $Basket->setOwner($user_receiver); @@ -187,7 +194,7 @@ class Push implements ControllerProviderInterface $app['EM']->persist($Basket); foreach ($pusher->get_elements() as $element) { - $BasketElement = new \Entities\BasketElement(); + $BasketElement = new BasketElement(); $BasketElement->setRecord($element); $BasketElement->setBasket($Basket); @@ -274,7 +281,7 @@ class Push implements ControllerProviderInterface try { $pusher = new RecordHelper\Push($app, $app['request']); - $repository = $app['EM']->getRepository('\Entities\Basket'); + $repository = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\Basket'); $validation_name = $request->request->get('name', sprintf(_('Validation from %s'), $app['authentication']->getUser()->get_display_name())); $validation_description = $request->request->get('validation_description'); @@ -292,7 +299,7 @@ class Push implements ControllerProviderInterface if ($pusher->is_basket()) { $Basket = $pusher->get_original_basket(); } else { - $Basket = new \Entities\Basket(); + $Basket = new Basket(); $Basket->setName($validation_name); $Basket->setDescription($validation_description); $Basket->setOwner($app['authentication']->getUser()); @@ -301,7 +308,7 @@ class Push implements ControllerProviderInterface $app['EM']->persist($Basket); foreach ($pusher->get_elements() as $element) { - $BasketElement = new \Entities\BasketElement(); + $BasketElement = new BasketElement(); $BasketElement->setRecord($element); $BasketElement->setBasket($Basket); @@ -315,7 +322,7 @@ class Push implements ControllerProviderInterface $app['EM']->refresh($Basket); if (!$Basket->getValidation()) { - $Validation = new \Entities\ValidationSession(); + $Validation = new ValidationSession(); $Validation->setInitiator($app['authentication']->getUser()); $Validation->setBasket($Basket); @@ -368,7 +375,7 @@ class Push implements ControllerProviderInterface } - $Participant = new \Entities\ValidationParticipant(); + $Participant = new ValidationParticipant(); $Participant->setUser($participant_user); $Participant->setSession($Validation); @@ -378,7 +385,7 @@ class Push implements ControllerProviderInterface $app['EM']->persist($Participant); foreach ($Basket->getElements() as $BasketElement) { - $ValidationData = new \Entities\ValidationData(); + $ValidationData = new ValidationData(); $ValidationData->setParticipant($Participant); $ValidationData->setBasketElement($BasketElement); $BasketElement->addValidationData($ValidationData); @@ -490,7 +497,7 @@ class Push implements ControllerProviderInterface $controllers->get('/list/{list_id}/', function(Application $app, $list_id) use ($listFormatter) { $datas = null; - $repository = $app['EM']->getRepository('\Entities\UsrList'); + $repository = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\UsrList'); $list = $repository->findUserListByUserAndId($app, $app['authentication']->getUser(), $list_id); @@ -590,7 +597,7 @@ class Push implements ControllerProviderInterface ->limit(0, 50) ->execute()->get_results(); - $repository = $app['EM']->getRepository('\Entities\UsrList'); + $repository = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\UsrList'); $lists = $repository->findUserListLike($app['authentication']->getUser(), $request->query->get('query')); @@ -613,7 +620,7 @@ class Push implements ControllerProviderInterface $controllers->match('/edit-list/{list_id}/', function(Application $app, Request $request, $list_id) { - $repository = $app['EM']->getRepository('\Entities\UsrList'); + $repository = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\UsrList'); $list = $repository->findUserListByUserAndId($app, $app['authentication']->getUser(), $list_id); diff --git a/lib/Alchemy/Phrasea/Controller/Prod/Query.php b/lib/Alchemy/Phrasea/Controller/Prod/Query.php index 1a62f66f78..a2f4f6a951 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/Query.php +++ b/lib/Alchemy/Phrasea/Controller/Prod/Query.php @@ -12,7 +12,7 @@ namespace Alchemy\Phrasea\Controller\Prod; use Alchemy\Phrasea\SearchEngine\SearchEngineOptions; -use Entities\UserQuery; +use Alchemy\Phrasea\Model\Entities\UserQuery; use Silex\Application; use Silex\ControllerProviderInterface; use Symfony\Component\HttpFoundation\JsonResponse; diff --git a/lib/Alchemy/Phrasea/Controller/Prod/Records.php b/lib/Alchemy/Phrasea/Controller/Prod/Records.php index 480e791fb4..f272df98a5 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/Records.php +++ b/lib/Alchemy/Phrasea/Controller/Prod/Records.php @@ -204,8 +204,8 @@ class Records implements ControllerProviderInterface 'candeleterecord' )); - $basketElementsRepository = $app['EM']->getRepository('\Entities\BasketElement'); - $StoryWZRepository = $app['EM']->getRepository('\Entities\StoryWZ'); + $basketElementsRepository = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\BasketElement'); + $StoryWZRepository = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\StoryWZ'); $deleted = array(); diff --git a/lib/Alchemy/Phrasea/Controller/Prod/Root.php b/lib/Alchemy/Phrasea/Controller/Prod/Root.php index f457634755..406db1bc2e 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/Root.php +++ b/lib/Alchemy/Phrasea/Controller/Prod/Root.php @@ -73,7 +73,7 @@ class Root implements ControllerProviderInterface $cssfile = '000000'; } - $feeds = $app['EM']->getRepository('Entities\Feed')->getAllForUser($app['authentication']->getUser()); + $feeds = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\Feed')->getAllForUser($app['authentication']->getUser()); $aggregate = Aggregate::createFromUser($app['EM'], $app['authentication']->getUser()); $thjslist = ""; diff --git a/lib/Alchemy/Phrasea/Controller/Prod/Story.php b/lib/Alchemy/Phrasea/Controller/Prod/Story.php index 7661a2d360..383c026031 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/Story.php +++ b/lib/Alchemy/Phrasea/Controller/Prod/Story.php @@ -13,6 +13,7 @@ namespace Alchemy\Phrasea\Controller\Prod; use Alchemy\Phrasea\Controller\Exception as ControllerException; use Alchemy\Phrasea\Controller\RecordsRequest; +use Alchemy\Phrasea\Model\Entities\StoryWZ; use Silex\Application; use Silex\ControllerProviderInterface; use Symfony\Component\HttpFoundation\Request; @@ -79,7 +80,7 @@ class Story implements ControllerProviderInterface $Story->set_metadatas($metadatas)->rebuild_subdefs(); - $StoryWZ = new \Entities\StoryWZ(); + $StoryWZ = new StoryWZ(); $StoryWZ->setUser($app['authentication']->getUser()); $StoryWZ->setRecord($Story); diff --git a/lib/Alchemy/Phrasea/Controller/Prod/Tooltip.php b/lib/Alchemy/Phrasea/Controller/Prod/Tooltip.php index 2109de6607..9dbc9e5cef 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/Tooltip.php +++ b/lib/Alchemy/Phrasea/Controller/Prod/Tooltip.php @@ -80,7 +80,7 @@ class Tooltip implements ControllerProviderInterface public function displayBasket(Application $app, $basket_id) { - $basket = $app['EM']->getRepository('\Entities\Basket') + $basket = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\Basket') ->findUserBasket($app, $basket_id, $app['authentication']->getUser(), false); return $app['twig']->render('prod/Tooltip/Basket.html.twig', array('basket' => $basket)); diff --git a/lib/Alchemy/Phrasea/Controller/Prod/Upload.php b/lib/Alchemy/Phrasea/Controller/Prod/Upload.php index b393431bf8..7567706cba 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/Upload.php +++ b/lib/Alchemy/Phrasea/Controller/Prod/Upload.php @@ -15,7 +15,7 @@ use Alchemy\Phrasea\Border\File; use Alchemy\Phrasea\Border\Attribute\Status; use DataURI\Parser; use DataURI\Exception\Exception as DataUriException; -use Entities\LazaretSession; +use Alchemy\Phrasea\Model\Entities\LazaretSession; use Silex\Application; use Silex\ControllerProviderInterface; use Symfony\Component\HttpFoundation\Request; diff --git a/lib/Alchemy/Phrasea/Controller/Prod/UsrLists.php b/lib/Alchemy/Phrasea/Controller/Prod/UsrLists.php index 7462ad9ef2..b65c331900 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/UsrLists.php +++ b/lib/Alchemy/Phrasea/Controller/Prod/UsrLists.php @@ -11,9 +11,9 @@ namespace Alchemy\Phrasea\Controller\Prod; -use Entities\UsrList; -use Entities\UsrListEntry; -use Entities\UsrListOwner; +use Alchemy\Phrasea\Model\Entities\UsrList; +use Alchemy\Phrasea\Model\Entities\UsrListEntry; +use Alchemy\Phrasea\Model\Entities\UsrListOwner; use Silex\Application; use Silex\ControllerProviderInterface; use Alchemy\Phrasea\Controller\Exception as ControllerException; @@ -110,7 +110,7 @@ class UsrLists implements ControllerProviderInterface $lists = new ArrayCollection(); try { - $repository = $app['EM']->getRepository('\Entities\UsrList'); + $repository = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\UsrList'); $lists = $repository->findUserLists($app['authentication']->getUser()); @@ -142,7 +142,7 @@ class UsrLists implements ControllerProviderInterface ); } - /* @var $list \Entities\UsrList */ + /* @var $list UsrList */ $result[] = array( 'name' => $list->getName(), 'created' => $list->getCreated()->format(DATE_ATOM), @@ -223,7 +223,7 @@ class UsrLists implements ControllerProviderInterface public function displayList(Application $app, Request $request, $list_id) { - $repository = $app['EM']->getRepository('\Entities\UsrList'); + $repository = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\UsrList'); $list = $repository->findUserListByUserAndId($app, $app['authentication']->getUser(), $list_id); @@ -281,7 +281,7 @@ class UsrLists implements ControllerProviderInterface throw new ControllerException(_('List name is required')); } - $repository = $app['EM']->getRepository('\Entities\UsrList'); + $repository = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\UsrList'); $list = $repository->findUserListByUserAndId($app, $app['authentication']->getUser(), $list_id); @@ -312,7 +312,7 @@ class UsrLists implements ControllerProviderInterface public function removeList(Application $app, $list_id) { try { - $repository = $app['EM']->getRepository('\Entities\UsrList'); + $repository = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\UsrList'); $list = $repository->findUserListByUserAndId($app, $app['authentication']->getUser(), $list_id); @@ -346,16 +346,16 @@ class UsrLists implements ControllerProviderInterface public function removeUser(Application $app, $list_id, $usr_id) { try { - $repository = $app['EM']->getRepository('\Entities\UsrList'); + $repository = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\UsrList'); $list = $repository->findUserListByUserAndId($app, $app['authentication']->getUser(), $list_id); - /* @var $list \Entities\UsrList */ + /* @var $list UsrList */ if ($list->getOwner($app['authentication']->getUser(), $app)->getRole() < UsrListOwner::ROLE_EDITOR) { throw new ControllerException(_('You are not authorized to do this')); } - $entry_repository = $app['EM']->getRepository('\Entities\UsrListEntry'); + $entry_repository = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\UsrListEntry'); $user_entry = $entry_repository->findEntryByListAndUsrId($list, $usr_id); @@ -389,10 +389,10 @@ class UsrLists implements ControllerProviderInterface throw new ControllerException('Invalid or missing parameter usr_ids'); } - $repository = $app['EM']->getRepository('\Entities\UsrList'); + $repository = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\UsrList'); $list = $repository->findUserListByUserAndId($app, $app['authentication']->getUser(), $list_id); - /* @var $list \Entities\UsrList */ + /* @var $list UsrList */ if ($list->getOwner($app['authentication']->getUser(), $app)->getRole() < UsrListOwner::ROLE_EDITOR) { throw new ControllerException(_('You are not authorized to do this')); @@ -453,10 +453,10 @@ class UsrLists implements ControllerProviderInterface $list = null; try { - $repository = $app['EM']->getRepository('\Entities\UsrList'); + $repository = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\UsrList'); $list = $repository->findUserListByUserAndId($app, $app['authentication']->getUser(), $list_id); - /* @var $list \Entities\UsrList */ + /* @var $list UsrList */ if ($list->getOwner($app['authentication']->getUser(), $app)->getRole() < UsrListOwner::ROLE_ADMIN) { $list = null; @@ -483,10 +483,10 @@ class UsrLists implements ControllerProviderInterface throw new BadRequestHttpException('Role is invalid'); try { - $repository = $app['EM']->getRepository('\Entities\UsrList'); + $repository = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\UsrList'); $list = $repository->findUserListByUserAndId($app, $app['authentication']->getUser(), $list_id); - /* @var $list \Entities\UsrList */ + /* @var $list UsrList */ if ($list->getOwner($app['authentication']->getUser(), $app)->getRole() < UsrListOwner::ROLE_EDITOR) { throw new ControllerException(_('You are not authorized to do this')); @@ -539,16 +539,16 @@ class UsrLists implements ControllerProviderInterface public function unshareWithUser(Application $app, $list_id, $usr_id) { try { - $repository = $app['EM']->getRepository('\Entities\UsrList'); + $repository = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\UsrList'); $list = $repository->findUserListByUserAndId($app, $app['authentication']->getUser(), $list_id); - /* @var $list \Entities\UsrList */ + /* @var $list UsrList */ if ($list->getOwner($app['authentication']->getUser(), $app)->getRole() < UsrListOwner::ROLE_ADMIN) { throw new \Exception(_('You are not authorized to do this')); } - $owners_repository = $app['EM']->getRepository('\Entities\UsrListOwner'); + $owners_repository = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\UsrListOwner'); $owner = $owners_repository->findByListAndUsrId($list, $usr_id); diff --git a/lib/Alchemy/Phrasea/Controller/Prod/WorkZone.php b/lib/Alchemy/Phrasea/Controller/Prod/WorkZone.php index 89b5ce7c6f..7eaf1f4c9d 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/WorkZone.php +++ b/lib/Alchemy/Phrasea/Controller/Prod/WorkZone.php @@ -11,7 +11,7 @@ namespace Alchemy\Phrasea\Controller\Prod; -use Entities\StoryWZ; +use Alchemy\Phrasea\Model\Entities\StoryWZ; use Silex\Application; use Silex\ControllerProviderInterface; use Symfony\Component\HttpFoundation\Request; @@ -80,7 +80,7 @@ class WorkZone implements ControllerProviderInterface { $request = $app['request']; - $BasketRepo = $app['EM']->getRepository('\Entities\Basket'); + $BasketRepo = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\Basket'); $Page = (int) $request->query->get('Page', 0); @@ -115,7 +115,7 @@ class WorkZone implements ControllerProviderInterface public function browseBasket(Application $app, Request $request, $basket_id) { $basket = $app['EM'] - ->getRepository('\Entities\Basket') + ->getRepository('Alchemy\Phrasea\Model\Entities\Basket') ->findUserBasket($app, $basket_id, $app['authentication']->getUser(), false); return $app['twig']->render('prod/WorkZone/Browser/Basket.html.twig', array('Basket' => $basket)); @@ -127,7 +127,7 @@ class WorkZone implements ControllerProviderInterface throw new BadRequestHttpException('Missing parameters stories'); } - $StoryWZRepo = $app['EM']->getRepository('\Entities\StoryWZ'); + $StoryWZRepo = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\StoryWZ'); $alreadyFixed = $done = 0; @@ -202,7 +202,7 @@ class WorkZone implements ControllerProviderInterface { $Story = new \record_adapter($app, $sbas_id, $record_id); - $repository = $app['EM']->getRepository('\Entities\StoryWZ'); + $repository = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\StoryWZ'); /* @var $repository \Repositories\StoryWZRepository */ $StoryWZ = $repository->findUserStory($app, $app['authentication']->getUser(), $Story); diff --git a/lib/Alchemy/Phrasea/Controller/RecordsRequest.php b/lib/Alchemy/Phrasea/Controller/RecordsRequest.php index 0d74e3aa1f..1a78fef26a 100644 --- a/lib/Alchemy/Phrasea/Controller/RecordsRequest.php +++ b/lib/Alchemy/Phrasea/Controller/RecordsRequest.php @@ -11,7 +11,7 @@ namespace Alchemy\Phrasea\Controller; -use Entities\Basket; +use Alchemy\Phrasea\Model\Entities\Basket; use Doctrine\Common\Collections\ArrayCollection; use Alchemy\Phrasea\Application; use Symfony\Component\HttpFoundation\Request; @@ -206,7 +206,7 @@ class RecordsRequest extends ArrayCollection $basket = null; if ($request->get('ssel')) { - $repository = $app['EM']->getRepository('\Entities\Basket'); + $repository = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\Basket'); $basket = $repository->findUserBasket($app, $request->get('ssel'), $app['authentication']->getUser(), false); @@ -214,7 +214,7 @@ class RecordsRequest extends ArrayCollection $received[$basket_element->getRecord($app)->get_serialize_key()] = $basket_element->getRecord($app); } } elseif ($request->get('story')) { - $repository = $app['EM']->getRepository('\Entities\StoryWZ'); + $repository = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\StoryWZ'); $storyWZ = $repository->findByUserAndId( $app, $app['authentication']->getUser() diff --git a/lib/Alchemy/Phrasea/Controller/Root/Account.php b/lib/Alchemy/Phrasea/Controller/Root/Account.php index 9c027fe026..51cbfc1298 100644 --- a/lib/Alchemy/Phrasea/Controller/Root/Account.php +++ b/lib/Alchemy/Phrasea/Controller/Root/Account.php @@ -269,7 +269,7 @@ class Account implements ControllerProviderInterface */ public function accountSessionsAccess(Application $app, Request $request) { - $dql = 'SELECT s FROM Entities\Session s + $dql = 'SELECT s FROM Alchemy\Phrasea\Model\Entities\Session s WHERE s.usr_id = :usr_id ORDER BY s.created DESC'; diff --git a/lib/Alchemy/Phrasea/Controller/Root/Login.php b/lib/Alchemy/Phrasea/Controller/Root/Login.php index 2266c4ef76..a01d53195f 100644 --- a/lib/Alchemy/Phrasea/Controller/Root/Login.php +++ b/lib/Alchemy/Phrasea/Controller/Root/Login.php @@ -23,6 +23,8 @@ use Alchemy\Phrasea\Core\PhraseaEvents; use Alchemy\Phrasea\Exception\InvalidArgumentException; use Alchemy\Phrasea\Exception\FormProcessingException; use Alchemy\Phrasea\Exception\RuntimeException; +use Alchemy\Phrasea\Model\Entities\ValidationParticipant; +use Alchemy\Phrasea\Model\Entities\UsrAuthProvider; use Alchemy\Phrasea\Notification\Receiver; use Alchemy\Phrasea\Notification\Mail\MailRequestPasswordUpdate; use Alchemy\Phrasea\Notification\Mail\MailRequestEmailConfirmation; @@ -35,7 +37,6 @@ use Alchemy\Phrasea\Form\Login\PhraseaForgotPasswordForm; use Alchemy\Phrasea\Form\Login\PhraseaRecoverPasswordForm; use Alchemy\Phrasea\Form\Login\PhraseaRegisterForm; use Doctrine\ORM\EntityManager; -use Entities\UsrAuthProvider; use Silex\Application; use Silex\ControllerProviderInterface; use Symfony\Component\HttpFoundation\Cookie; @@ -51,7 +52,7 @@ class Login implements ControllerProviderInterface { $items = array(); - foreach($app['EM']->getRepository('Entities\FeedItem')->loadLatest($app, 20) as $item) { + foreach($app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\FeedItem')->loadLatest($app, 20) as $item) { $record = $item->getRecord($app); $preview = $record->get_subdef('preview'); $permalink = $preview->get_permalink(); @@ -281,7 +282,7 @@ class Login implements ControllerProviderInterface } $userAuthProvider = $app['EM'] - ->getRepository('Entities\UsrAuthProvider') + ->getRepository('Alchemy\Phrasea\Model\Entities\UsrAuthProvider') ->findWithProviderAndId($token->getProvider()->getId(), $token->getId()); if (null !== $userAuthProvider) { @@ -739,7 +740,7 @@ class Login implements ControllerProviderInterface $app->addFlash('error', _('login::erreur: No available connection - Please contact sys-admin')); } - $feeds = $app['EM']->getRepository('Entities\Feed')->findBy(array('public' => true), array('updatedOn' => 'DESC')); + $feeds = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\Feed')->findBy(array('public' => true), array('updatedOn' => 'DESC')); $form = $app->form(new PhraseaAuthenticationForm()); $form->setData(array( @@ -831,10 +832,10 @@ class Login implements ControllerProviderInterface $date = new \DateTime('+' . (int) $app['phraseanet.registry']->get('GV_validation_reminder') . ' days'); foreach ($app['EM'] - ->getRepository('Entities\ValidationParticipant') + ->getRepository('Alchemy\Phrasea\Model\Entities\ValidationParticipant') ->findNotConfirmedAndNotRemindedParticipantsByExpireDate($date) as $participant) { - /* @var $participant \Entities\ValidationParticipant */ + /* @var $participant ValidationParticipant */ $validationSession = $participant->getSession(); $participantId = $participant->getUsrId(); @@ -904,7 +905,7 @@ class Login implements ControllerProviderInterface } $userAuthProvider = $app['EM'] - ->getRepository('Entities\UsrAuthProvider') + ->getRepository('Alchemy\Phrasea\Model\Entities\UsrAuthProvider') ->findWithProviderAndId($token->getProvider()->getId(), $token->getId()); if (null !== $userAuthProvider) { @@ -1037,7 +1038,7 @@ class Login implements ControllerProviderInterface if (!$user->is_guest() && $request->cookies->has('invite-usr_id')) { if ($user->get_id() != $inviteUsrId = $request->cookies->get('invite-usr_id')) { - $repo = $app['EM']->getRepository('Entities\Basket'); + $repo = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\Basket'); $baskets = $repo->findBy(array('usr_id' => $inviteUsrId)); foreach ($baskets as $basket) { diff --git a/lib/Alchemy/Phrasea/Controller/Root/RSSFeeds.php b/lib/Alchemy/Phrasea/Controller/Root/RSSFeeds.php index 4edc13333e..eda1505d53 100644 --- a/lib/Alchemy/Phrasea/Controller/Root/RSSFeeds.php +++ b/lib/Alchemy/Phrasea/Controller/Root/RSSFeeds.php @@ -11,7 +11,7 @@ namespace Alchemy\Phrasea\Controller\Root; -use Entities\Feed; +use Alchemy\Phrasea\Model\Entities\Feed; use Alchemy\Phrasea\Feed\Aggregate; use Silex\Application; use Silex\ControllerProviderInterface; @@ -29,7 +29,7 @@ class RSSFeeds implements ControllerProviderInterface $controllers = $app['controllers_factory']; $controllers->get('/feed/{id}/{format}/', function(Application $app, $id, $format) { - $feed = $app['EM']->getRepository('Entities\Feed')->find($id); + $feed = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\Feed')->find($id); if (null === $feed) { $app->abort(404, 'Feed not found'); @@ -51,7 +51,7 @@ class RSSFeeds implements ControllerProviderInterface ->assert('format', '(rss|atom)'); $controllers->get('/userfeed/{token}/{id}/{format}/', function(Application $app, $token, $id, $format) { - $token = $app["EM"]->find('Entities\FeedToken', $id); + $token = $app["EM"]->find('Alchemy\Phrasea\Model\Entities\FeedToken', $id); $request = $app['request']; @@ -66,11 +66,11 @@ class RSSFeeds implements ControllerProviderInterface ->assert('format', '(rss|atom)'); $controllers->get('/userfeed/aggregated/{token}/{format}/', function(Application $app, $token, $format) { - $token = $app['EM']->getRepository('Entities\AggregateToken')->findOneBy(array("value" => $token)); + $token = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\AggregateToken')->findOneBy(array("value" => $token)); $user = \User_Adapter::getInstance($token->getUsrId(), $app); - $feeds = $app['EM']->getRepository('Entities\Feed')->getAllForUser($user); + $feeds = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\Feed')->getAllForUser($user); $aggregate = new Aggregate($app['EM'], $feeds, $token); diff --git a/lib/Alchemy/Phrasea/Controller/Root/Session.php b/lib/Alchemy/Phrasea/Controller/Root/Session.php index a9d9ae7641..25851daa62 100644 --- a/lib/Alchemy/Phrasea/Controller/Root/Session.php +++ b/lib/Alchemy/Phrasea/Controller/Root/Session.php @@ -11,6 +11,7 @@ namespace Alchemy\Phrasea\Controller\Root; +use Alchemy\Phrasea\Model\Entities\SessionModule; use Silex\Application; use Silex\ControllerProviderInterface; use Symfony\Component\HttpFoundation\Request; @@ -92,11 +93,11 @@ class Session implements ControllerProviderInterface return $app->json($ret); } - $session = $app['EM']->find('Entities\Session', $app['session']->get('session_id')); + $session = $app['EM']->find('Alchemy\Phrasea\Model\Entities\Session', $app['session']->get('session_id')); $session->setUpdated(new \DateTime()); if (!$session->hasModuleId($moduleId)) { - $module = new \Entities\SessionModule(); + $module = new SessionModule(); $module->setModuleId($moduleId); $module->setSession($session); $app['EM']->persist($module); @@ -113,7 +114,7 @@ class Session implements ControllerProviderInterface 'notifications' => $app['events-manager']->get_notifications() )); - $baskets = $app['EM']->getRepository('\Entities\Basket')->findUnreadActiveByUser($app['authentication']->getUser()); + $baskets = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\Basket')->findUnreadActiveByUser($app['authentication']->getUser()); foreach ($baskets as $basket) { $ret['changed'][] = $basket->getId(); @@ -143,7 +144,7 @@ class Session implements ControllerProviderInterface */ public function deleteSession(Application $app, Request $request, $id) { - $session = $app['EM']->find('Entities\Session', $id); + $session = $app['EM']->find('Alchemy\Phrasea\Model\Entities\Session', $id); if (null === $session) { $app->abort(404, 'Unknown session'); diff --git a/lib/Alchemy/Phrasea/Core/Provider/ORMServiceProvider.php b/lib/Alchemy/Phrasea/Core/Provider/ORMServiceProvider.php index 5d5106c866..5eb8e39b49 100644 --- a/lib/Alchemy/Phrasea/Core/Provider/ORMServiceProvider.php +++ b/lib/Alchemy/Phrasea/Core/Provider/ORMServiceProvider.php @@ -63,10 +63,10 @@ class ORMServiceProvider implements ServiceProviderInterface $annotationDriver = new AnnotationDriver( $annotationReader, - array($app['root.path'].'/lib/Doctrine/Entities') + array($app['root.path'].'/lib/Alchemy/Phrasea/Model/Entities') ); - $driverChain->addDriver($annotationDriver, 'Entities'); + $driverChain->addDriver($annotationDriver, 'Alchemy\Phrasea\Model\Entities'); return $driverChain; }); diff --git a/lib/Alchemy/Phrasea/Feed/Aggregate.php b/lib/Alchemy/Phrasea/Feed/Aggregate.php index 8352a7ca7a..aee3f80c4c 100644 --- a/lib/Alchemy/Phrasea/Feed/Aggregate.php +++ b/lib/Alchemy/Phrasea/Feed/Aggregate.php @@ -14,7 +14,7 @@ namespace Alchemy\Phrasea\Feed; use Alchemy\Phrasea\Application; use Alchemy\Phrasea\Exception\LogicException; use Doctrine\ORM\EntityManager; -use Entities\AggregateToken; +use Alchemy\Phrasea\Model\Entities\AggregateToken; class Aggregate implements FeedInterface { @@ -76,8 +76,8 @@ class Aggregate implements FeedInterface */ public static function createFromUser(EntityManager $em, \User_Adapter $user) { - $feeds = $em->getRepository('Entities\Feed')->getAllForUser($user); - $token = $em->getRepository('Entities\AggregateToken')->findOneBy(array('usrId' => $user->get_id())); + $feeds = $em->getRepository('Alchemy\Phrasea\Model\Entities\Feed')->getAllForUser($user); + $token = $em->getRepository('Alchemy\Phrasea\Model\Entities\AggregateToken')->findOneBy(array('usrId' => $user->get_id())); return new static($em, $feeds, $token); } @@ -92,7 +92,7 @@ class Aggregate implements FeedInterface */ public static function create(Application $app, array $feed_ids) { - $feeds = $this->em->getRepository('Entities\Feed')->findByIds($feed_ids); + $feeds = $this->em->getRepository('Alchemy\Phrasea\Model\Entities\Feed')->findByIds($feed_ids); return new static($app, $feeds); } @@ -119,7 +119,7 @@ class Aggregate implements FeedInterface $feedIds[] = $feed->getId(); } - return $this->em->getRepository('Entities\FeedEntry')->findByFeeds($feedIds, $offset_start, $how_many); + return $this->em->getRepository('Alchemy\Phrasea\Model\Entities\FeedEntry')->findByFeeds($feedIds, $offset_start, $how_many); } /** @@ -205,7 +205,7 @@ class Aggregate implements FeedInterface $feedIds[] = $feed->getId(); } - return count($this->em->getRepository('Entities\FeedEntry')->findByFeeds($feedIds)); + return count($this->em->getRepository('Alchemy\Phrasea\Model\Entities\FeedEntry')->findByFeeds($feedIds)); } return 0; @@ -237,6 +237,6 @@ class Aggregate implements FeedInterface */ public static function getPublic(Application $app) { - return new static($app['EM'], $app['EM']->getRepository('Entities\Feed')->findBy(array('public' => true), array('updatedOn' => 'DESC'))); + return new static($app['EM'], $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\Feed')->findBy(array('public' => true), array('updatedOn' => 'DESC'))); } } diff --git a/lib/Alchemy/Phrasea/Feed/AggregateToken.php b/lib/Alchemy/Phrasea/Feed/AggregateToken.php index ac4b1a0be7..91b7dece6d 100644 --- a/lib/Alchemy/Phrasea/Feed/AggregateToken.php +++ b/lib/Alchemy/Phrasea/Feed/AggregateToken.php @@ -12,6 +12,7 @@ namespace Alchemy\Phrasea\Feed; use Alchemy\Phrasea\Feed\Aggregate; +use Alchemy\Phrasea\Model\Entities\Feed; /** * AggregateToken @@ -63,10 +64,10 @@ class AggregateToken /** * Set feed * - * @param Aggregate $feed + * @param Feed $feed * @return AggregateToken */ - public function setFeed(\Entities\Feed $feed = null) + public function setFeed(Feed $feed = null) { $this->aggregatedFeed = $feed; diff --git a/lib/Alchemy/Phrasea/Feed/Link/AggregateLinkGenerator.php b/lib/Alchemy/Phrasea/Feed/Link/AggregateLinkGenerator.php index e25fe4102b..851121d921 100644 --- a/lib/Alchemy/Phrasea/Feed/Link/AggregateLinkGenerator.php +++ b/lib/Alchemy/Phrasea/Feed/Link/AggregateLinkGenerator.php @@ -6,7 +6,7 @@ use Alchemy\Phrasea\Exception\InvalidArgumentException; use Alchemy\Phrasea\Feed\Aggregate; use Alchemy\Phrasea\Feed\FeedInterface; use Alchemy\Phrasea\Feed\Link\FeedLink; -use Entities\AggregateToken; +use Alchemy\Phrasea\Model\Entities\AggregateToken; use Doctrine\ORM\EntityManager; use Symfony\Component\Routing\Generator\UrlGenerator; @@ -122,7 +122,7 @@ class AggregateLinkGenerator implements LinkGeneratorInterface private function getAggregateToken(\User_Adapter $user, $renew = false) { $token = $this->em - ->getRepository('Entities\AggregateToken') + ->getRepository('Alchemy\Phrasea\Model\Entities\AggregateToken') ->findOneBy(array('usrId' => $user->get_id())); if (null === $token || true === $renew) { diff --git a/lib/Alchemy/Phrasea/Feed/Link/FeedLinkGenerator.php b/lib/Alchemy/Phrasea/Feed/Link/FeedLinkGenerator.php index a25f350cc1..001465813f 100644 --- a/lib/Alchemy/Phrasea/Feed/Link/FeedLinkGenerator.php +++ b/lib/Alchemy/Phrasea/Feed/Link/FeedLinkGenerator.php @@ -14,8 +14,8 @@ namespace Alchemy\Phrasea\Feed\Link; use Alchemy\Phrasea\Exception\InvalidArgumentException; use Alchemy\Phrasea\Feed\FeedInterface; use Doctrine\ORM\EntityManager; -use Entities\Feed; -use Entities\FeedToken; +use Alchemy\Phrasea\Model\Entities\Feed; +use Alchemy\Phrasea\Model\Entities\FeedToken; use Symfony\Component\Routing\Generator\UrlGenerator; class FeedLinkGenerator implements LinkGeneratorInterface @@ -138,7 +138,7 @@ class FeedLinkGenerator implements LinkGeneratorInterface private function getFeedToken(Feed $feed, \User_Adapter $user, $renew = false) { $token = $this->em - ->getRepository('Entities\FeedToken') + ->getRepository('Alchemy\Phrasea\Model\Entities\FeedToken') ->findOneBy(array('usrId' => $user->get_id(), 'feed' => $feed->getId())); if (null === $token || true === $renew) { diff --git a/lib/Alchemy/Phrasea/Helper/Record/Helper.php b/lib/Alchemy/Phrasea/Helper/Record/Helper.php index 4607f68700..d998003859 100644 --- a/lib/Alchemy/Phrasea/Helper/Record/Helper.php +++ b/lib/Alchemy/Phrasea/Helper/Record/Helper.php @@ -12,6 +12,7 @@ namespace Alchemy\Phrasea\Helper\Record; use Alchemy\Phrasea\Application; +use Alchemy\Phrasea\Model\Entities\Basket; use Symfony\Component\HttpFoundation\Request; /** @@ -94,8 +95,7 @@ class Helper extends \Alchemy\Phrasea\Helper\Helper protected $is_basket = false; /** - * - * @var \Entities\Basket + * @var Basket */ protected $original_basket; @@ -113,7 +113,7 @@ class Helper extends \Alchemy\Phrasea\Helper\Helper $this->selection = new \set_selection($app); if (trim($Request->get('ssel')) !== '') { - $repository = $app['EM']->getRepository('\Entities\Basket'); + $repository = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\Basket'); /* @var $$repository \Repositories\BasketRepository */ $Basket = $repository->findUserBasket($this->app, $Request->get('ssel'), $app['authentication']->getUser(), false); @@ -123,7 +123,7 @@ class Helper extends \Alchemy\Phrasea\Helper\Helper $this->is_basket = true; $this->original_basket = $Basket; } elseif (trim($Request->get('story')) !== '') { - $repository = $app['EM']->getRepository('\Entities\StoryWZ'); + $repository = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\StoryWZ'); $storyWZ = $repository->findByUserAndId($app, $app['authentication']->getUser(), $Request->get('story')); @@ -154,7 +154,7 @@ class Helper extends \Alchemy\Phrasea\Helper\Helper /** * If the original selection was a basket, returns the basket object * - * @return \Entities\Basket + * @return Basket */ public function get_original_basket() { diff --git a/lib/Alchemy/Phrasea/Helper/WorkZone.php b/lib/Alchemy/Phrasea/Helper/WorkZone.php index aaa444a2e7..4585f6b1d5 100644 --- a/lib/Alchemy/Phrasea/Helper/WorkZone.php +++ b/lib/Alchemy/Phrasea/Helper/WorkZone.php @@ -12,7 +12,7 @@ namespace Alchemy\Phrasea\Helper; use Doctrine\Common\Collections\ArrayCollection; -use Entities\Basket as BasketEntity; +use Alchemy\Phrasea\Model\Entities\Basket as BasketEntity; /** * @@ -42,7 +42,7 @@ class WorkZone extends Helper public function getContent($sort) { /* @var $repo_baskets \Doctrine\Repositories\BasketRepository */ - $repo_baskets = $this->app['EM']->getRepository('Entities\Basket'); + $repo_baskets = $this->app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\Basket'); $sort = in_array($sort, array('date', 'name')) ? $sort : 'name'; @@ -65,7 +65,7 @@ class WorkZone extends Helper $validations = $repo_baskets->findActiveValidationByUser($this->app['authentication']->getUser(), $sort); /* @var $repo_stories \Doctrine\Repositories\StoryWZRepository */ - $repo_stories = $this->app['EM']->getRepository('Entities\StoryWZ'); + $repo_stories = $this->app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\StoryWZ'); $stories = $repo_stories->findByUser($this->app, $this->app['authentication']->getUser(), $sort); diff --git a/lib/Doctrine/Entities/AggregateToken.php b/lib/Alchemy/Phrasea/Model/Entities/AggregateToken.php similarity index 97% rename from lib/Doctrine/Entities/AggregateToken.php rename to lib/Alchemy/Phrasea/Model/Entities/AggregateToken.php index 8df663d323..e806367169 100644 --- a/lib/Doctrine/Entities/AggregateToken.php +++ b/lib/Alchemy/Phrasea/Model/Entities/AggregateToken.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Entities; +namespace Alchemy\Phrasea\Model\Entities; use Doctrine\ORM\Mapping as ORM; use Gedmo\Mapping\Annotation as Gedmo; diff --git a/lib/Doctrine/Entities/AuthFailure.php b/lib/Alchemy/Phrasea/Model/Entities/AuthFailure.php similarity index 98% rename from lib/Doctrine/Entities/AuthFailure.php rename to lib/Alchemy/Phrasea/Model/Entities/AuthFailure.php index a4eb789034..8d4e1b7aba 100644 --- a/lib/Doctrine/Entities/AuthFailure.php +++ b/lib/Alchemy/Phrasea/Model/Entities/AuthFailure.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Entities; +namespace Alchemy\Phrasea\Model\Entities; use Doctrine\ORM\Mapping as ORM; use Gedmo\Mapping\Annotation as Gedmo; diff --git a/lib/Doctrine/Entities/Basket.php b/lib/Alchemy/Phrasea/Model/Entities/Basket.php similarity index 94% rename from lib/Doctrine/Entities/Basket.php rename to lib/Alchemy/Phrasea/Model/Entities/Basket.php index 421d5f54ac..afd7795d61 100644 --- a/lib/Doctrine/Entities/Basket.php +++ b/lib/Alchemy/Phrasea/Model/Entities/Basket.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Entities; +namespace Alchemy\Phrasea\Model\Entities; use Alchemy\Phrasea\Application; use Doctrine\ORM\Mapping as ORM; @@ -319,10 +319,10 @@ class Basket /** * Set validation * - * @param \Entities\ValidationSession $validation + * @param ValidationSession $validation * @return Basket */ - public function setValidation(\Entities\ValidationSession $validation = null) + public function setValidation(ValidationSession $validation = null) { $this->validation = $validation; @@ -332,7 +332,7 @@ class Basket /** * Get validation * - * @return \Entities\ValidationSession + * @return ValidationSession */ public function getValidation() { @@ -342,10 +342,10 @@ class Basket /** * Add elements * - * @param \Entities\BasketElement $elements + * @param BasketElement $elements * @return Basket */ - public function addElement(\Entities\BasketElement $elements) + public function addElement(BasketElement $elements) { $this->elements[] = $elements; @@ -355,9 +355,9 @@ class Basket /** * Remove elements * - * @param \Entities\BasketElement $elements + * @param BasketElement $elements */ - public function removeElement(\Entities\BasketElement $elements) + public function removeElement(BasketElement $elements) { $this->elements->removeElement($elements); } @@ -365,10 +365,10 @@ class Basket /** * Set order * - * @param \Entities\Order $order + * @param Order $order * @return Basket */ - public function setOrder(\Entities\Order $order = null) + public function setOrder(Order $order = null) { $this->order = $order; @@ -378,7 +378,7 @@ class Basket /** * Get order * - * @return \Entities\Order + * @return Order */ public function getOrder() { diff --git a/lib/Doctrine/Entities/BasketElement.php b/lib/Alchemy/Phrasea/Model/Entities/BasketElement.php similarity index 91% rename from lib/Doctrine/Entities/BasketElement.php rename to lib/Alchemy/Phrasea/Model/Entities/BasketElement.php index f47fe5d927..ad0616475f 100644 --- a/lib/Doctrine/Entities/BasketElement.php +++ b/lib/Alchemy/Phrasea/Model/Entities/BasketElement.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Entities; +namespace Alchemy\Phrasea\Model\Entities; use Alchemy\Phrasea\Application; use Doctrine\ORM\Mapping as ORM; @@ -214,10 +214,10 @@ class BasketElement /** * Add validation_datas * - * @param \Entities\ValidationData $validationDatas + * @param ValidationData $validationDatas * @return BasketElement */ - public function addValidationData(\Entities\ValidationData $validationDatas) + public function addValidationData(ValidationData $validationDatas) { $this->validation_datas[] = $validationDatas; @@ -227,9 +227,9 @@ class BasketElement /** * Remove validation_datas * - * @param \Entities\ValidationData $validationDatas + * @param ValidationData $validationDatas */ - public function removeValidationData(\Entities\ValidationData $validationDatas) + public function removeValidationData(ValidationData $validationDatas) { $this->validation_datas->removeElement($validationDatas); } @@ -247,10 +247,10 @@ class BasketElement /** * Set basket * - * @param \Entities\Basket $basket + * @param Basket $basket * @return BasketElement */ - public function setBasket(\Entities\Basket $basket = null) + public function setBasket(Basket $basket = null) { $this->basket = $basket; @@ -260,7 +260,7 @@ class BasketElement /** * Get basket * - * @return \Entities\Basket + * @return Basket */ public function getBasket() { @@ -278,7 +278,7 @@ class BasketElement /** * * @param \User_Adapter $user - * @return \Entities\ValidationData + * @return ValidationData */ public function getUserValidationDatas(\User_Adapter $user, Application $app) { diff --git a/lib/Doctrine/Entities/Feed.php b/lib/Alchemy/Phrasea/Model/Entities/Feed.php similarity index 92% rename from lib/Doctrine/Entities/Feed.php rename to lib/Alchemy/Phrasea/Model/Entities/Feed.php index 2da4754ddb..1da1475daa 100644 --- a/lib/Doctrine/Entities/Feed.php +++ b/lib/Alchemy/Phrasea/Model/Entities/Feed.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Entities; +namespace Alchemy\Phrasea\Model\Entities; use Alchemy\Phrasea\Application; use Alchemy\Phrasea\Feed\FeedInterface; @@ -196,10 +196,10 @@ class Feed implements FeedInterface /** * Add publishers * - * @param \Entities\FeedPublisher $publishers + * @param FeedPublisher $publishers * @return Feed */ - public function addPublisher(\Entities\FeedPublisher $publishers) + public function addPublisher(FeedPublisher $publishers) { $this->publishers[] = $publishers; @@ -209,9 +209,9 @@ class Feed implements FeedInterface /** * Remove publishers * - * @param \Entities\FeedPublisher $publishers + * @param FeedPublisher $publishers */ - public function removePublisher(\Entities\FeedPublisher $publishers) + public function removePublisher(FeedPublisher $publishers) { $this->publishers->removeElement($publishers); } @@ -229,10 +229,10 @@ class Feed implements FeedInterface /** * Add entries * - * @param \Entities\FeedEntry $entries + * @param FeedEntry $entries * @return Feed */ - public function addEntry(\Entities\FeedEntry $entries) + public function addEntry(FeedEntry $entries) { $this->entries[] = $entries; @@ -242,9 +242,9 @@ class Feed implements FeedInterface /** * Remove entries * - * @param \Entities\FeedEntry $entries + * @param FeedEntry $entries */ - public function removeEntry(\Entities\FeedEntry $entries) + public function removeEntry(FeedEntry $entries) { $this->entries->removeElement($entries); } @@ -470,10 +470,10 @@ class Feed implements FeedInterface /** * Add tokens * - * @param \Entities\FeedToken $tokens + * @param FeedToken $tokens * @return Feed */ - public function addToken(\Entities\FeedToken $tokens) + public function addToken(FeedToken $tokens) { $this->tokens[] = $tokens; @@ -483,9 +483,9 @@ class Feed implements FeedInterface /** * Remove tokens * - * @param \Entities\FeedToken $tokens + * @param FeedToken $tokens */ - public function removeToken(\Entities\FeedToken $tokens) + public function removeToken(FeedToken $tokens) { $this->tokens->removeElement($tokens); } @@ -503,10 +503,10 @@ class Feed implements FeedInterface /** * Add entries * - * @param \Entities\FeedEntry $entries + * @param FeedEntry $entries * @return Feed */ - public function addEntrie(\Entities\FeedEntry $entries) + public function addEntrie(FeedEntry $entries) { $this->entries[] = $entries; @@ -516,9 +516,9 @@ class Feed implements FeedInterface /** * Remove entries * - * @param \Entities\FeedEntry $entries + * @param FeedEntry $entries */ - public function removeEntrie(\Entities\FeedEntry $entries) + public function removeEntrie(FeedEntry $entries) { $this->entries->removeElement($entries); } diff --git a/lib/Doctrine/Entities/FeedEntry.php b/lib/Alchemy/Phrasea/Model/Entities/FeedEntry.php similarity index 92% rename from lib/Doctrine/Entities/FeedEntry.php rename to lib/Alchemy/Phrasea/Model/Entities/FeedEntry.php index b35c9d777c..818e5d66b9 100644 --- a/lib/Doctrine/Entities/FeedEntry.php +++ b/lib/Alchemy/Phrasea/Model/Entities/FeedEntry.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Entities; +namespace Alchemy\Phrasea\Model\Entities; use Doctrine\ORM\Mapping as ORM; use Gedmo\Mapping\Annotation as Gedmo; @@ -236,10 +236,10 @@ class FeedEntry /** * Add items * - * @param \Entities\FeedItem $items + * @param FeedItem $items * @return FeedEntry */ - public function addItem(\Entities\FeedItem $items) + public function addItem(FeedItem $items) { $this->items[] = $items; @@ -249,9 +249,9 @@ class FeedEntry /** * Remove items * - * @param \Entities\FeedItem $items + * @param FeedItem $items */ - public function removeItem(\Entities\FeedItem $items) + public function removeItem(FeedItem $items) { $this->items->removeElement($items); } @@ -269,10 +269,10 @@ class FeedEntry /** * Set publisher * - * @param \Entities\FeedPublisher $publisher + * @param FeedPublisher $publisher * @return FeedEntry */ - public function setPublisher(\Entities\FeedPublisher $publisher = null) + public function setPublisher(FeedPublisher $publisher = null) { $this->publisher = $publisher; @@ -282,7 +282,7 @@ class FeedEntry /** * Get publisher * - * @return \Entities\FeedPublisher + * @return FeedPublisher */ public function getPublisher() { @@ -292,10 +292,10 @@ class FeedEntry /** * Set feed * - * @param \Entities\Feed $feed + * @param Feed $feed * @return FeedEntry */ - public function setFeed(\Entities\Feed $feed = null) + public function setFeed(Feed $feed = null) { $this->feed = $feed; @@ -305,7 +305,7 @@ class FeedEntry /** * Get feed * - * @return \Entities\Feed + * @return Feed */ public function getFeed() { diff --git a/lib/Doctrine/Entities/FeedItem.php b/lib/Alchemy/Phrasea/Model/Entities/FeedItem.php similarity index 96% rename from lib/Doctrine/Entities/FeedItem.php rename to lib/Alchemy/Phrasea/Model/Entities/FeedItem.php index 8c8bc27a3b..d20974dd92 100644 --- a/lib/Doctrine/Entities/FeedItem.php +++ b/lib/Alchemy/Phrasea/Model/Entities/FeedItem.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Entities; +namespace Alchemy\Phrasea\Model\Entities; use Alchemy\Phrasea\Application; @@ -122,10 +122,10 @@ class FeedItem /** * Set entry * - * @param \Entities\FeedEntry $entry + * @param FeedEntry $entry * @return FeedItem */ - public function setEntry(\Entities\FeedEntry $entry = null) + public function setEntry(FeedEntry $entry = null) { $this->entry = $entry; @@ -135,7 +135,7 @@ class FeedItem /** * Get entry * - * @return \Entities\FeedEntry + * @return FeedEntry */ public function getEntry() { diff --git a/lib/Doctrine/Entities/FeedPublisher.php b/lib/Alchemy/Phrasea/Model/Entities/FeedPublisher.php similarity index 95% rename from lib/Doctrine/Entities/FeedPublisher.php rename to lib/Alchemy/Phrasea/Model/Entities/FeedPublisher.php index 7ae8294dea..92376eaf74 100644 --- a/lib/Doctrine/Entities/FeedPublisher.php +++ b/lib/Alchemy/Phrasea/Model/Entities/FeedPublisher.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Entities; +namespace Alchemy\Phrasea\Model\Entities; use Alchemy\Phrasea\Application; use Doctrine\ORM\Mapping as ORM; @@ -109,10 +109,10 @@ class FeedPublisher /** * Set feed * - * @param \Entities\Feed $feed + * @param Feed $feed * @return FeedPublisher */ - public function setFeed(\Entities\Feed $feed = null) + public function setFeed(Feed $feed = null) { $this->feed = $feed; @@ -122,7 +122,7 @@ class FeedPublisher /** * Get feed * - * @return \Entities\Feed + * @return Feed */ public function getFeed() { diff --git a/lib/Doctrine/Entities/FeedToken.php b/lib/Alchemy/Phrasea/Model/Entities/FeedToken.php similarity index 93% rename from lib/Doctrine/Entities/FeedToken.php rename to lib/Alchemy/Phrasea/Model/Entities/FeedToken.php index 6c3dad8352..f0a01cb4b8 100644 --- a/lib/Doctrine/Entities/FeedToken.php +++ b/lib/Alchemy/Phrasea/Model/Entities/FeedToken.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Entities; +namespace Alchemy\Phrasea\Model\Entities; use Doctrine\ORM\Mapping as ORM; use Gedmo\Mapping\Annotation as Gedmo; @@ -79,10 +79,10 @@ class FeedToken /** * Set feed * - * @param \Entities\Feed $feed + * @param Feed $feed * @return FeedToken */ - public function setFeed(\Entities\Feed $feed = null) + public function setFeed(Feed $feed = null) { $this->feed = $feed; @@ -92,7 +92,7 @@ class FeedToken /** * Get feed * - * @return \Entities\Feed + * @return Feed */ public function getFeed() { diff --git a/lib/Doctrine/Entities/FtpCredential.php b/lib/Alchemy/Phrasea/Model/Entities/FtpCredential.php similarity index 99% rename from lib/Doctrine/Entities/FtpCredential.php rename to lib/Alchemy/Phrasea/Model/Entities/FtpCredential.php index b430914704..ebc7ab4864 100644 --- a/lib/Doctrine/Entities/FtpCredential.php +++ b/lib/Alchemy/Phrasea/Model/Entities/FtpCredential.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Entities; +namespace Alchemy\Phrasea\Model\Entities; use Doctrine\ORM\Mapping as ORM; use Gedmo\Mapping\Annotation as Gedmo; diff --git a/lib/Doctrine/Entities/FtpExport.php b/lib/Alchemy/Phrasea/Model/Entities/FtpExport.php similarity index 98% rename from lib/Doctrine/Entities/FtpExport.php rename to lib/Alchemy/Phrasea/Model/Entities/FtpExport.php index 63cc9dbd53..2e19b21e87 100644 --- a/lib/Doctrine/Entities/FtpExport.php +++ b/lib/Alchemy/Phrasea/Model/Entities/FtpExport.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Entities; +namespace Alchemy\Phrasea\Model\Entities; use Alchemy\Phrasea\Application; use Doctrine\Common\Collections\ArrayCollection; @@ -145,7 +145,7 @@ class FtpExport * Set crash * * @param integer $crash - * + * * @return FtpExport */ public function setCrash($crash) @@ -181,7 +181,7 @@ class FtpExport * Set nbretry * * @param integer $nbretry - * + * * @return FtpExport */ public function setNbretry($nbretry) @@ -205,7 +205,7 @@ class FtpExport * Set mail * * @param string $mail - * + * * @return FtpExport */ public function setMail($mail) @@ -229,7 +229,7 @@ class FtpExport * Set addr * * @param string $addr - * + * * @return FtpExport */ public function setAddr($addr) @@ -253,7 +253,7 @@ class FtpExport * Set ssl * * @param boolean $ssl - * + * * @return FtpExport */ public function setSsl($ssl) @@ -277,7 +277,7 @@ class FtpExport * Set login * * @param string $login - * + * * @return FtpExport */ public function setLogin($login) @@ -301,7 +301,7 @@ class FtpExport * Set pwd * * @param string $pwd - * + * * @return FtpExport */ public function setPwd($pwd) @@ -325,7 +325,7 @@ class FtpExport * Set passif * * @param boolean $passif - * + * * @return FtpExport */ public function setPassif($passif) @@ -349,7 +349,7 @@ class FtpExport * Set destfolder * * @param string $destfolder - * + * * @return FtpExport */ public function setDestfolder($destfolder) @@ -373,7 +373,7 @@ class FtpExport * Set sendermail * * @param string $sendermail - * + * * @return FtpExport */ public function setSendermail($sendermail) @@ -397,7 +397,7 @@ class FtpExport * Set textMailSender * * @param string $textMailSender - * + * * @return FtpExport */ public function setTextMailSender($textMailSender) @@ -421,7 +421,7 @@ class FtpExport * Set textMailReceiver * * @param string $textMailReceiver - * + * * @return FtpExport */ public function setTextMailReceiver($textMailReceiver) @@ -445,7 +445,7 @@ class FtpExport * Set usrId * * @param integer $usrId - * + * * @return FtpExport */ public function setUsrId($usrId) @@ -479,7 +479,7 @@ class FtpExport * Set user * * @param \User_Adapter $user - * + * * @return FtpExport */ public function setUser(\User_Adapter $user) @@ -493,7 +493,7 @@ class FtpExport * Set foldertocreate * * @param string $foldertocreate - * + * * @return FtpExport */ public function setFoldertocreate($foldertocreate) @@ -517,7 +517,7 @@ class FtpExport * Set logfile * * @param boolean $logfile - * + * * @return FtpExport */ public function setLogfile($logfile) @@ -541,7 +541,7 @@ class FtpExport * Set created * * @param \DateTime $created - * + * * @return FtpExport */ public function setCreated(\DateTime $created) @@ -565,7 +565,7 @@ class FtpExport * Set updated * * @param \DateTime $updated - * + * * @return FtpExport */ public function setUpdated(\DateTime $updated) @@ -589,7 +589,7 @@ class FtpExport * Add elements * * @param FtpExportElement $elements - * + * * @return FtpExport */ public function addElement(FtpExportElement $elements) @@ -603,13 +603,13 @@ class FtpExport * Remove elements * * @param FtpExportElement $elements - * + * * @return FtpExport */ public function removeElement(FtpExportElement $elements) { $this->elements->removeElement($elements); - + return $this; } diff --git a/lib/Doctrine/Entities/FtpExportElement.php b/lib/Alchemy/Phrasea/Model/Entities/FtpExportElement.php similarity index 99% rename from lib/Doctrine/Entities/FtpExportElement.php rename to lib/Alchemy/Phrasea/Model/Entities/FtpExportElement.php index e4f0493950..d5a112b86d 100644 --- a/lib/Doctrine/Entities/FtpExportElement.php +++ b/lib/Alchemy/Phrasea/Model/Entities/FtpExportElement.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Entities; +namespace Alchemy\Phrasea\Model\Entities; use Doctrine\ORM\Mapping as ORM; use Gedmo\Mapping\Annotation as Gedmo; diff --git a/lib/Doctrine/Entities/LazaretAttribute.php b/lib/Alchemy/Phrasea/Model/Entities/LazaretAttribute.php similarity index 94% rename from lib/Doctrine/Entities/LazaretAttribute.php rename to lib/Alchemy/Phrasea/Model/Entities/LazaretAttribute.php index 5adc344c1e..7b2187abc3 100644 --- a/lib/Doctrine/Entities/LazaretAttribute.php +++ b/lib/Alchemy/Phrasea/Model/Entities/LazaretAttribute.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Entities; +namespace Alchemy\Phrasea\Model\Entities; use Doctrine\ORM\Mapping as ORM; use Gedmo\Mapping\Annotation as Gedmo; @@ -160,10 +160,10 @@ class LazaretAttribute /** * Set lazaretFile * - * @param \Entities\LazaretFile $lazaretFile + * @param LazaretFile $lazaretFile * @return LazaretAttribute */ - public function setLazaretFile(\Entities\LazaretFile $lazaretFile = null) + public function setLazaretFile(LazaretFile $lazaretFile = null) { $this->lazaretFile = $lazaretFile; @@ -173,7 +173,7 @@ class LazaretAttribute /** * Get lazaretFile * - * @return \Entities\LazaretFile + * @return LazaretFile */ public function getLazaretFile() { diff --git a/lib/Doctrine/Entities/LazaretCheck.php b/lib/Alchemy/Phrasea/Model/Entities/LazaretCheck.php similarity index 91% rename from lib/Doctrine/Entities/LazaretCheck.php rename to lib/Alchemy/Phrasea/Model/Entities/LazaretCheck.php index 8a8caa338c..668b7f5fb2 100644 --- a/lib/Doctrine/Entities/LazaretCheck.php +++ b/lib/Alchemy/Phrasea/Model/Entities/LazaretCheck.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Entities; +namespace Alchemy\Phrasea\Model\Entities; use Doctrine\ORM\Mapping as ORM; @@ -73,10 +73,10 @@ class LazaretCheck /** * Set lazaretFile * - * @param \Entities\LazaretFile $lazaretFile + * @param LazaretFile $lazaretFile * @return LazaretCheck */ - public function setLazaretFile(\Entities\LazaretFile $lazaretFile = null) + public function setLazaretFile(LazaretFile $lazaretFile = null) { $this->lazaretFile = $lazaretFile; @@ -86,7 +86,7 @@ class LazaretCheck /** * Get lazaretFile * - * @return \Entities\LazaretFile + * @return LazaretFile */ public function getLazaretFile() { diff --git a/lib/Doctrine/Entities/LazaretFile.php b/lib/Alchemy/Phrasea/Model/Entities/LazaretFile.php similarity index 92% rename from lib/Doctrine/Entities/LazaretFile.php rename to lib/Alchemy/Phrasea/Model/Entities/LazaretFile.php index 9e99a48f6f..2072034cda 100644 --- a/lib/Doctrine/Entities/LazaretFile.php +++ b/lib/Alchemy/Phrasea/Model/Entities/LazaretFile.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Entities; +namespace Alchemy\Phrasea\Model\Entities; use Alchemy\Phrasea\Application; use Doctrine\ORM\Mapping as ORM; @@ -332,10 +332,10 @@ class LazaretFile /** * Add attributes * - * @param \Entities\LazaretAttribute $attributes + * @param LazaretAttribute $attributes * @return LazaretFile */ - public function addAttribute(\Entities\LazaretAttribute $attributes) + public function addAttribute(LazaretAttribute $attributes) { $this->attributes[] = $attributes; @@ -345,9 +345,9 @@ class LazaretFile /** * Remove attributes * - * @param \Entities\LazaretAttribute $attributes + * @param LazaretAttribute $attributes */ - public function removeAttribute(\Entities\LazaretAttribute $attributes) + public function removeAttribute(LazaretAttribute $attributes) { $this->attributes->removeElement($attributes); } @@ -365,10 +365,10 @@ class LazaretFile /** * Add checks * - * @param \Entities\LazaretCheck $checks + * @param LazaretCheck $checks * @return LazaretFile */ - public function addCheck(\Entities\LazaretCheck $checks) + public function addCheck(LazaretCheck $checks) { $this->checks[] = $checks; @@ -378,9 +378,9 @@ class LazaretFile /** * Remove checks * - * @param \Entities\LazaretCheck $checks + * @param LazaretCheck $checks */ - public function removeCheck(\Entities\LazaretCheck $checks) + public function removeCheck(LazaretCheck $checks) { $this->checks->removeElement($checks); } @@ -398,10 +398,10 @@ class LazaretFile /** * Set session * - * @param \Entities\LazaretSession $session + * @param LazaretSession $session * @return LazaretFile */ - public function setSession(\Entities\LazaretSession $session = null) + public function setSession(LazaretSession $session = null) { $this->session = $session; @@ -411,7 +411,7 @@ class LazaretFile /** * Get session * - * @return \Entities\LazaretSession + * @return LazaretSession */ public function getSession() { diff --git a/lib/Doctrine/Entities/LazaretSession.php b/lib/Alchemy/Phrasea/Model/Entities/LazaretSession.php similarity index 93% rename from lib/Doctrine/Entities/LazaretSession.php rename to lib/Alchemy/Phrasea/Model/Entities/LazaretSession.php index 5196eab723..b5674ec0f3 100644 --- a/lib/Doctrine/Entities/LazaretSession.php +++ b/lib/Alchemy/Phrasea/Model/Entities/LazaretSession.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Entities; +namespace Alchemy\Phrasea\Model\Entities; use Alchemy\Phrasea\Application; use Doctrine\ORM\Mapping as ORM; @@ -159,10 +159,10 @@ class LazaretSession /** * Add files * - * @param \Entities\LazaretFile $files + * @param LazaretFile $files * @return LazaretSession */ - public function addFile(\Entities\LazaretFile $files) + public function addFile(LazaretFile $files) { $this->files[] = $files; @@ -172,9 +172,9 @@ class LazaretSession /** * Remove files * - * @param \Entities\LazaretFile $files + * @param LazaretFile $files */ - public function removeFile(\Entities\LazaretFile $files) + public function removeFile(LazaretFile $files) { $this->files->removeElement($files); } diff --git a/lib/Doctrine/Entities/Order.php b/lib/Alchemy/Phrasea/Model/Entities/Order.php similarity index 91% rename from lib/Doctrine/Entities/Order.php rename to lib/Alchemy/Phrasea/Model/Entities/Order.php index e4a6c06522..52b592468e 100644 --- a/lib/Doctrine/Entities/Order.php +++ b/lib/Alchemy/Phrasea/Model/Entities/Order.php @@ -1,6 +1,6 @@ elements[] = $elements; @@ -158,9 +158,9 @@ class Order /** * Remove elements * - * @param \Entities\OrderElement $elements + * @param OrderElement $elements */ - public function removeElement(\Entities\OrderElement $elements) + public function removeElement(OrderElement $elements) { $this->elements->removeElement($elements); } @@ -248,10 +248,10 @@ class Order /** * Set basket * - * @param \Entities\Basket $basket + * @param Basket $basket * @return Order */ - public function setBasket(\Entities\Basket $basket = null) + public function setBasket(Basket $basket = null) { $this->basket = $basket; @@ -261,7 +261,7 @@ class Order /** * Get basket * - * @return \Entities\Basket + * @return Basket */ public function getBasket() { diff --git a/lib/Doctrine/Entities/OrderElement.php b/lib/Alchemy/Phrasea/Model/Entities/OrderElement.php similarity index 97% rename from lib/Doctrine/Entities/OrderElement.php rename to lib/Alchemy/Phrasea/Model/Entities/OrderElement.php index 9cd2d2d3a8..4eeb40587f 100644 --- a/lib/Doctrine/Entities/OrderElement.php +++ b/lib/Alchemy/Phrasea/Model/Entities/OrderElement.php @@ -1,10 +1,10 @@ modules[] = $modules; @@ -418,9 +418,9 @@ class Session /** * Remove modules * - * @param \Entities\SessionModule $modules + * @param SessionModule $modules */ - public function removeModule(\Entities\SessionModule $modules) + public function removeModule(SessionModule $modules) { $this->modules->removeElement($modules); } @@ -439,7 +439,7 @@ class Session * Get a module by its identifier * * @param integer $moduleId - * @return Entities\SessionModule|null + * @return Alchemy\Phrasea\Model\Entities\SessionModule|null */ public function getModuleById($moduleId) { diff --git a/lib/Doctrine/Entities/SessionModule.php b/lib/Alchemy/Phrasea/Model/Entities/SessionModule.php similarity index 94% rename from lib/Doctrine/Entities/SessionModule.php rename to lib/Alchemy/Phrasea/Model/Entities/SessionModule.php index b82ecbbd1c..7d62e25411 100644 --- a/lib/Doctrine/Entities/SessionModule.php +++ b/lib/Alchemy/Phrasea/Model/Entities/SessionModule.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Entities; +namespace Alchemy\Phrasea\Model\Entities; use Doctrine\ORM\Mapping as ORM; use Gedmo\Mapping\Annotation as Gedmo; @@ -132,10 +132,10 @@ class SessionModule /** * Set session * - * @param \Entities\Session $session + * @param Session $session * @return SessionModule */ - public function setSession(\Entities\Session $session = null) + public function setSession(Session $session = null) { $this->session = $session; @@ -145,7 +145,7 @@ class SessionModule /** * Get session * - * @return \Entities\Session + * @return Session */ public function getSession() { diff --git a/lib/Doctrine/Entities/StoryWZ.php b/lib/Alchemy/Phrasea/Model/Entities/StoryWZ.php similarity index 98% rename from lib/Doctrine/Entities/StoryWZ.php rename to lib/Alchemy/Phrasea/Model/Entities/StoryWZ.php index 012915d656..b19be1b7e5 100644 --- a/lib/Doctrine/Entities/StoryWZ.php +++ b/lib/Alchemy/Phrasea/Model/Entities/StoryWZ.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Entities; +namespace Alchemy\Phrasea\Model\Entities; use Alchemy\Phrasea\Application; diff --git a/lib/Doctrine/Entities/User.php b/lib/Alchemy/Phrasea/Model/Entities/User.php similarity index 99% rename from lib/Doctrine/Entities/User.php rename to lib/Alchemy/Phrasea/Model/Entities/User.php index 4771b62833..235d82652e 100644 --- a/lib/Doctrine/Entities/User.php +++ b/lib/Alchemy/Phrasea/Model/Entities/User.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Entities; +namespace Alchemy\Phrasea\Model\Entities; use Alchemy\Phrasea\Application; use Alchemy\Phrasea\Exception\InvalidArgumentException; diff --git a/lib/Doctrine/Entities/UserNotificationSetting.php b/lib/Alchemy/Phrasea/Model/Entities/UserNotificationSetting.php similarity index 98% rename from lib/Doctrine/Entities/UserNotificationSetting.php rename to lib/Alchemy/Phrasea/Model/Entities/UserNotificationSetting.php index 6951cd5b6d..30775822f2 100644 --- a/lib/Doctrine/Entities/UserNotificationSetting.php +++ b/lib/Alchemy/Phrasea/Model/Entities/UserNotificationSetting.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Entities; +namespace Alchemy\Phrasea\Model\Entities; use Alchemy\Phrasea\Application; use Doctrine\ORM\Mapping as ORM; diff --git a/lib/Doctrine/Entities/UserQuery.php b/lib/Alchemy/Phrasea/Model/Entities/UserQuery.php similarity index 98% rename from lib/Doctrine/Entities/UserQuery.php rename to lib/Alchemy/Phrasea/Model/Entities/UserQuery.php index fe28626b82..23b792e1e3 100644 --- a/lib/Doctrine/Entities/UserQuery.php +++ b/lib/Alchemy/Phrasea/Model/Entities/UserQuery.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Entities; +namespace Alchemy\Phrasea\Model\Entities; use Alchemy\Phrasea\Application; use Doctrine\ORM\Mapping as ORM; diff --git a/lib/Doctrine/Entities/UserSetting.php b/lib/Alchemy/Phrasea/Model/Entities/UserSetting.php similarity index 98% rename from lib/Doctrine/Entities/UserSetting.php rename to lib/Alchemy/Phrasea/Model/Entities/UserSetting.php index bca4b37f0b..f6a9a8f417 100644 --- a/lib/Doctrine/Entities/UserSetting.php +++ b/lib/Alchemy/Phrasea/Model/Entities/UserSetting.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Entities; +namespace Alchemy\Phrasea\Model\Entities; use Alchemy\Phrasea\Application; use Doctrine\ORM\Mapping as ORM; diff --git a/lib/Doctrine/Entities/UsrAuthProvider.php b/lib/Alchemy/Phrasea/Model/Entities/UsrAuthProvider.php similarity index 98% rename from lib/Doctrine/Entities/UsrAuthProvider.php rename to lib/Alchemy/Phrasea/Model/Entities/UsrAuthProvider.php index 6ba7bd75ee..062bbd8852 100644 --- a/lib/Doctrine/Entities/UsrAuthProvider.php +++ b/lib/Alchemy/Phrasea/Model/Entities/UsrAuthProvider.php @@ -1,6 +1,6 @@ owners[] = $owners; @@ -159,9 +159,9 @@ class UsrList /** * Remove owners * - * @param \Entities\UsrListOwner $owners + * @param UsrListOwner $owners */ - public function removeOwner(\Entities\UsrListOwner $owners) + public function removeOwner(UsrListOwner $owners) { $this->owners->removeElement($owners); } @@ -179,10 +179,10 @@ class UsrList /** * Add entries * - * @param \Entities\UsrListEntry $entries + * @param UsrListEntry $entries * @return UsrList */ - public function addEntrie(\Entities\UsrListEntry $entries) + public function addEntrie(UsrListEntry $entries) { $this->entries[] = $entries; @@ -192,9 +192,9 @@ class UsrList /** * Remove entries * - * @param \Entities\UsrListEntry $entries + * @param UsrListEntry $entries */ - public function removeEntrie(\Entities\UsrListEntry $entries) + public function removeEntrie(UsrListEntry $entries) { $this->entries->removeElement($entries); } @@ -223,7 +223,7 @@ class UsrList /** * * @param \User_Adapter $user - * @return \Entities\UsrListOwner + * @return UsrListOwner */ public function getOwner(\User_Adapter $user, Application $app) { diff --git a/lib/Doctrine/Entities/UsrListEntry.php b/lib/Alchemy/Phrasea/Model/Entities/UsrListEntry.php similarity index 94% rename from lib/Doctrine/Entities/UsrListEntry.php rename to lib/Alchemy/Phrasea/Model/Entities/UsrListEntry.php index b487dbb0fa..6fae14bb2a 100644 --- a/lib/Doctrine/Entities/UsrListEntry.php +++ b/lib/Alchemy/Phrasea/Model/Entities/UsrListEntry.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Entities; +namespace Alchemy\Phrasea\Model\Entities; use Alchemy\Phrasea\Application; use Doctrine\ORM\Mapping as ORM; @@ -143,10 +143,10 @@ class UsrListEntry /** * Set list * - * @param \Entities\UsrList $list + * @param UsrList $list * @return UsrListEntry */ - public function setList(\Entities\UsrList $list = null) + public function setList(UsrList $list = null) { $this->list = $list; @@ -156,7 +156,7 @@ class UsrListEntry /** * Get list * - * @return \Entities\UsrList + * @return UsrList */ public function getList() { diff --git a/lib/Doctrine/Entities/UsrListOwner.php b/lib/Alchemy/Phrasea/Model/Entities/UsrListOwner.php similarity index 95% rename from lib/Doctrine/Entities/UsrListOwner.php rename to lib/Alchemy/Phrasea/Model/Entities/UsrListOwner.php index b9a0479386..dacf5f6950 100644 --- a/lib/Doctrine/Entities/UsrListOwner.php +++ b/lib/Alchemy/Phrasea/Model/Entities/UsrListOwner.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Entities; +namespace Alchemy\Phrasea\Model\Entities; use Alchemy\Phrasea\Application; use Doctrine\ORM\Mapping as ORM; @@ -178,10 +178,10 @@ class UsrListOwner /** * Set list * - * @param \Entities\UsrList $list + * @param UsrList $list * @return UsrListOwner */ - public function setList(\Entities\UsrList $list = null) + public function setList(UsrList $list = null) { $this->list = $list; @@ -191,7 +191,7 @@ class UsrListOwner /** * Get list * - * @return \Entities\UsrList + * @return UsrList */ public function getList() { diff --git a/lib/Doctrine/Entities/ValidationData.php b/lib/Alchemy/Phrasea/Model/Entities/ValidationData.php similarity index 88% rename from lib/Doctrine/Entities/ValidationData.php rename to lib/Alchemy/Phrasea/Model/Entities/ValidationData.php index 51465d2b96..20a39f969d 100644 --- a/lib/Doctrine/Entities/ValidationData.php +++ b/lib/Alchemy/Phrasea/Model/Entities/ValidationData.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Entities; +namespace Alchemy\Phrasea\Model\Entities; use Doctrine\ORM\Mapping as ORM; use Gedmo\Mapping\Annotation as Gedmo; @@ -137,10 +137,10 @@ class ValidationData /** * Set participant * - * @param \Entities\ValidationParticipant $participant + * @param ValidationParticipant $participant * @return ValidationData */ - public function setParticipant(\Entities\ValidationParticipant $participant = null) + public function setParticipant(ValidationParticipant $participant = null) { $this->participant = $participant; @@ -150,7 +150,7 @@ class ValidationData /** * Get participant * - * @return \Entities\ValidationParticipant + * @return ValidationParticipant */ public function getParticipant() { @@ -160,10 +160,10 @@ class ValidationData /** * Set basket_element * - * @param \Entities\BasketElement $basketElement + * @param BasketElement $basketElement * @return ValidationData */ - public function setBasketElement(\Entities\BasketElement $basketElement = null) + public function setBasketElement(BasketElement $basketElement = null) { $this->basket_element = $basketElement; @@ -173,7 +173,7 @@ class ValidationData /** * Get basket_element * - * @return \Entities\BasketElement + * @return BasketElement */ public function getBasketElement() { diff --git a/lib/Doctrine/Entities/ValidationParticipant.php b/lib/Alchemy/Phrasea/Model/Entities/ValidationParticipant.php similarity index 91% rename from lib/Doctrine/Entities/ValidationParticipant.php rename to lib/Alchemy/Phrasea/Model/Entities/ValidationParticipant.php index be257e0b20..0482b989b0 100644 --- a/lib/Doctrine/Entities/ValidationParticipant.php +++ b/lib/Alchemy/Phrasea/Model/Entities/ValidationParticipant.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Entities; +namespace Alchemy\Phrasea\Model\Entities; use Alchemy\Phrasea\Application; use Doctrine\ORM\Mapping as ORM; @@ -244,10 +244,10 @@ class ValidationParticipant /** * Add datas * - * @param \Entities\ValidationData $datas + * @param ValidationData $datas * @return ValidationParticipant */ - public function addData(\Entities\ValidationData $datas) + public function addData(ValidationData $datas) { $this->datas[] = $datas; @@ -257,9 +257,9 @@ class ValidationParticipant /** * Remove datas * - * @param \Entities\ValidationData $datas + * @param ValidationData $datas */ - public function removeData(\Entities\ValidationData $datas) + public function removeData(ValidationData $datas) { $this->datas->removeElement($datas); } @@ -277,10 +277,10 @@ class ValidationParticipant /** * Set session * - * @param \Entities\ValidationSession $session + * @param ValidationSession $session * @return ValidationParticipant */ - public function setSession(\Entities\ValidationSession $session = null) + public function setSession(ValidationSession $session = null) { $this->session = $session; @@ -290,7 +290,7 @@ class ValidationParticipant /** * Get session * - * @return \Entities\ValidationSession + * @return ValidationSession */ public function getSession() { @@ -305,7 +305,7 @@ class ValidationParticipant } foreach ($this->getDatas() as $validation_data) { - /* @var $validation_data \Entities\ValidationData */ + /* @var $validation_data ValidationData */ if ($validation_data->getAgreement() === null) { return false; } diff --git a/lib/Doctrine/Entities/ValidationSession.php b/lib/Alchemy/Phrasea/Model/Entities/ValidationSession.php similarity index 92% rename from lib/Doctrine/Entities/ValidationSession.php rename to lib/Alchemy/Phrasea/Model/Entities/ValidationSession.php index f6f083b03b..55f0067d00 100644 --- a/lib/Doctrine/Entities/ValidationSession.php +++ b/lib/Alchemy/Phrasea/Model/Entities/ValidationSession.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Entities; +namespace Alchemy\Phrasea\Model\Entities; use Alchemy\Phrasea\Application; use Doctrine\ORM\Mapping as ORM; @@ -194,10 +194,10 @@ class ValidationSession /** * Set basket * - * @param \Entities\Basket $basket + * @param Basket $basket * @return ValidationSession */ - public function setBasket(\Entities\Basket $basket = null) + public function setBasket(Basket $basket = null) { $this->basket = $basket; @@ -207,7 +207,7 @@ class ValidationSession /** * Get basket * - * @return \Entities\Basket + * @return Basket */ public function getBasket() { @@ -217,10 +217,10 @@ class ValidationSession /** * Add participants * - * @param \Entities\ValidationParticipant $participants + * @param ValidationParticipant $participants * @return ValidationSession */ - public function addParticipant(\Entities\ValidationParticipant $participants) + public function addParticipant(ValidationParticipant $participants) { $this->participants[] = $participants; @@ -230,9 +230,9 @@ class ValidationSession /** * Remove participants * - * @param \Entities\ValidationParticipant $participants + * @param ValidationParticipant $participants */ - public function removeParticipant(\Entities\ValidationParticipant $participants) + public function removeParticipant(ValidationParticipant $participants) { $this->participants->removeElement($participants); } @@ -291,7 +291,7 @@ class ValidationSession /** * Get a participant * - * @return Entities\ValidationParticipant + * @return Alchemy\Phrasea\Model\Entities\ValidationParticipant */ public function getParticipant(\User_Adapter $user, Application $app) { diff --git a/lib/Alchemy/Phrasea/Model/Manager/UserManager.php b/lib/Alchemy/Phrasea/Model/Manager/UserManager.php index e8241bddae..d749b578a9 100644 --- a/lib/Alchemy/Phrasea/Model/Manager/UserManager.php +++ b/lib/Alchemy/Phrasea/Model/Manager/UserManager.php @@ -13,8 +13,8 @@ namespace Alchemy\Phrasea\Model\Manager; use Alchemy\Phrasea\Exception\InvalidArgumentException; use Doctrine\Common\Persistence\ObjectManager; -use Entities\User; -use Entities\UserSetting; +use Alchemy\Phrasea\Model\Entities\User; +use Alchemy\Phrasea\Model\Entities\UserSetting; class UserManager { @@ -137,7 +137,7 @@ class UserManager */ private function cleanFtpExports(User $user) { - $elements = $this->objectManager->getRepository('Entities\FtpExport') + $elements = $this->objectManager->getRepository('Alchemy\Phrasea\Model\Entities\FtpExport') ->findBy(array('usrId' => $user->getId())); foreach($elements as $element) { @@ -152,7 +152,7 @@ class UserManager */ private function cleanOrders(User $user) { - $orders = $this->objectManager->getRepository('Entities\Order') + $orders = $this->objectManager->getRepository('Alchemy\Phrasea\Model\Entities\Order') ->findBy(array('usrId' => $user->getId())); foreach($orders as $order) { diff --git a/lib/Alchemy/Phrasea/Model/Manipulator/UserManipulator.php b/lib/Alchemy/Phrasea/Model/Manipulator/UserManipulator.php index 89782e8687..24419ac589 100644 --- a/lib/Alchemy/Phrasea/Model/Manipulator/UserManipulator.php +++ b/lib/Alchemy/Phrasea/Model/Manipulator/UserManipulator.php @@ -17,7 +17,7 @@ use Alchemy\Phrasea\Model\Manager\UserManager; use Alchemy\Phrasea\Exception\RuntimeException; use Alchemy\Phrasea\Exception\InvalidArgumentException; use Doctrine\Common\Persistence\ObjectManager; -use Entities\User; +use Alchemy\Phrasea\Model\Entities\User; use Repositories\UserRepository; use Symfony\Component\Security\Core\Encoder\PasswordEncoderInterface; @@ -45,7 +45,7 @@ class UserManipulator implements ManipulatorInterface */ public function getRepository() { - return $this->manager->getObjectManager()->getRepository('Entities\User'); + return $this->manager->getObjectManager()->getRepository('Alchemy\Phrasea\Model\Entities\User'); } /** diff --git a/lib/Alchemy/Phrasea/Notification/Mail/MailInfoOrderDelivered.php b/lib/Alchemy/Phrasea/Notification/Mail/MailInfoOrderDelivered.php index c490083f8c..c08d758d65 100644 --- a/lib/Alchemy/Phrasea/Notification/Mail/MailInfoOrderDelivered.php +++ b/lib/Alchemy/Phrasea/Notification/Mail/MailInfoOrderDelivered.php @@ -11,7 +11,7 @@ namespace Alchemy\Phrasea\Notification\Mail; -use Entities\Basket; +use Alchemy\Phrasea\Model\Entities\Basket; use Alchemy\Phrasea\Exception\LogicException; class MailInfoOrderDelivered extends AbstractMail diff --git a/lib/Alchemy/Phrasea/Notification/Mail/MailInfoPushReceived.php b/lib/Alchemy/Phrasea/Notification/Mail/MailInfoPushReceived.php index 4f8dd190a7..d7e7954062 100644 --- a/lib/Alchemy/Phrasea/Notification/Mail/MailInfoPushReceived.php +++ b/lib/Alchemy/Phrasea/Notification/Mail/MailInfoPushReceived.php @@ -11,7 +11,7 @@ namespace Alchemy\Phrasea\Notification\Mail; -use Entities\Basket; +use Alchemy\Phrasea\Model\Entities\Basket; use Alchemy\Phrasea\Exception\LogicException; class MailInfoPushReceived extends AbstractMailWithLink @@ -24,7 +24,7 @@ class MailInfoPushReceived extends AbstractMailWithLink /** * Sets the basket * - * @param \Entities\Basket $basket + * @param Basket $basket */ public function setBasket(Basket $basket) { diff --git a/lib/Alchemy/Phrasea/SearchEngine/Phrasea/PhraseaEngine.php b/lib/Alchemy/Phrasea/SearchEngine/Phrasea/PhraseaEngine.php index 85a58c9500..044ee3231b 100644 --- a/lib/Alchemy/Phrasea/SearchEngine/Phrasea/PhraseaEngine.php +++ b/lib/Alchemy/Phrasea/SearchEngine/Phrasea/PhraseaEngine.php @@ -18,7 +18,7 @@ use Alchemy\Phrasea\SearchEngine\SearchEngineResult; use Alchemy\Phrasea\SearchEngine\SearchEngineSuggestion; use Alchemy\Phrasea\Exception\RuntimeException; use Doctrine\Common\Collections\ArrayCollection; -use Entities\FeedEntry; +use Alchemy\Phrasea\Model\Entities\FeedEntry; class PhraseaEngine implements SearchEngineInterface { diff --git a/lib/Alchemy/Phrasea/SearchEngine/SearchEngineInterface.php b/lib/Alchemy/Phrasea/SearchEngine/SearchEngineInterface.php index abcece3260..ba669fee48 100644 --- a/lib/Alchemy/Phrasea/SearchEngine/SearchEngineInterface.php +++ b/lib/Alchemy/Phrasea/SearchEngine/SearchEngineInterface.php @@ -16,7 +16,7 @@ use Alchemy\Phrasea\SearchEngine\SearchEngineOptions; use Alchemy\Phrasea\SearchEngine\SearchEngineResult; use Alchemy\Phrasea\Exception\RuntimeException; use Doctrine\Common\Collections\ArrayCollection; -use Entities\FeedEntry; +use Alchemy\Phrasea\Model\Entities\FeedEntry; interface SearchEngineInterface { diff --git a/lib/Alchemy/Phrasea/SearchEngine/SphinxSearch/SphinxSearchEngine.php b/lib/Alchemy/Phrasea/SearchEngine/SphinxSearch/SphinxSearchEngine.php index 3e643c96de..e2c5016b72 100644 --- a/lib/Alchemy/Phrasea/SearchEngine/SphinxSearch/SphinxSearchEngine.php +++ b/lib/Alchemy/Phrasea/SearchEngine/SphinxSearch/SphinxSearchEngine.php @@ -18,7 +18,7 @@ use Alchemy\Phrasea\SearchEngine\SearchEngineResult; use Alchemy\Phrasea\SearchEngine\SearchEngineSuggestion; use Alchemy\Phrasea\Exception\RuntimeException; use Doctrine\Common\Collections\ArrayCollection; -use Entities\FeedEntry; +use Alchemy\Phrasea\Model\Entities\FeedEntry; use Symfony\Component\Process\ExecutableFinder; use Symfony\Component\Process\Process; diff --git a/lib/Doctrine/Proxies/__CG__EntitiesAggregateToken.php b/lib/Doctrine/Proxies/__CG__AlchemyPhraseaModelEntitiesAggregateToken.php similarity index 93% rename from lib/Doctrine/Proxies/__CG__EntitiesAggregateToken.php rename to lib/Doctrine/Proxies/__CG__AlchemyPhraseaModelEntitiesAggregateToken.php index 4699a03f02..68f9e9fb7b 100644 --- a/lib/Doctrine/Proxies/__CG__EntitiesAggregateToken.php +++ b/lib/Doctrine/Proxies/__CG__AlchemyPhraseaModelEntitiesAggregateToken.php @@ -1,11 +1,11 @@ __load(); return parent::setValidation($validation); @@ -183,19 +183,19 @@ class Basket extends \Entities\Basket implements \Doctrine\ORM\Proxy\Proxy return parent::getValidation(); } - public function addElement(\Entities\BasketElement $elements) + public function addElement(\Alchemy\Phrasea\Model\Entities\BasketElement $elements) { $this->__load(); return parent::addElement($elements); } - public function removeElement(\Entities\BasketElement $elements) + public function removeElement(\Alchemy\Phrasea\Model\Entities\BasketElement $elements) { $this->__load(); return parent::removeElement($elements); } - public function setOrder(\Entities\Order $order = NULL) + public function setOrder(\Alchemy\Phrasea\Model\Entities\Order $order = NULL) { $this->__load(); return parent::setOrder($order); diff --git a/lib/Doctrine/Proxies/__CG__EntitiesBasketElement.php b/lib/Doctrine/Proxies/__CG__AlchemyPhraseaModelEntitiesBasketElement.php similarity index 90% rename from lib/Doctrine/Proxies/__CG__EntitiesBasketElement.php rename to lib/Doctrine/Proxies/__CG__AlchemyPhraseaModelEntitiesBasketElement.php index 4c88a4e1ec..c4d6343fe3 100644 --- a/lib/Doctrine/Proxies/__CG__EntitiesBasketElement.php +++ b/lib/Doctrine/Proxies/__CG__AlchemyPhraseaModelEntitiesBasketElement.php @@ -1,11 +1,11 @@ __load(); return parent::addValidationData($validationDatas); } - public function removeValidationData(\Entities\ValidationData $validationDatas) + public function removeValidationData(\Alchemy\Phrasea\Model\Entities\ValidationData $validationDatas) { $this->__load(); return parent::removeValidationData($validationDatas); @@ -141,7 +141,7 @@ class BasketElement extends \Entities\BasketElement implements \Doctrine\ORM\Pro return parent::getValidationDatas(); } - public function setBasket(\Entities\Basket $basket = NULL) + public function setBasket(\Alchemy\Phrasea\Model\Entities\Basket $basket = NULL) { $this->__load(); return parent::setBasket($basket); diff --git a/lib/Doctrine/Proxies/__CG__EntitiesFeed.php b/lib/Doctrine/Proxies/__CG__AlchemyPhraseaModelEntitiesFeed.php similarity index 88% rename from lib/Doctrine/Proxies/__CG__EntitiesFeed.php rename to lib/Doctrine/Proxies/__CG__AlchemyPhraseaModelEntitiesFeed.php index 0710572d45..f3fd4abf2e 100644 --- a/lib/Doctrine/Proxies/__CG__EntitiesFeed.php +++ b/lib/Doctrine/Proxies/__CG__AlchemyPhraseaModelEntitiesFeed.php @@ -1,11 +1,11 @@ __load(); return parent::addPublisher($publishers); } - public function removePublisher(\Entities\FeedPublisher $publishers) + public function removePublisher(\Alchemy\Phrasea\Model\Entities\FeedPublisher $publishers) { $this->__load(); return parent::removePublisher($publishers); @@ -117,13 +117,13 @@ class Feed extends \Entities\Feed implements \Doctrine\ORM\Proxy\Proxy return parent::getPublishers(); } - public function addEntry(\Entities\FeedEntry $entries) + public function addEntry(\Alchemy\Phrasea\Model\Entities\FeedEntry $entries) { $this->__load(); return parent::addEntry($entries); } - public function removeEntry(\Entities\FeedEntry $entries) + public function removeEntry(\Alchemy\Phrasea\Model\Entities\FeedEntry $entries) { $this->__load(); return parent::removeEntry($entries); @@ -225,13 +225,13 @@ class Feed extends \Entities\Feed implements \Doctrine\ORM\Proxy\Proxy return parent::hasAccess($user, $app); } - public function addToken(\Entities\FeedToken $tokens) + public function addToken(\Alchemy\Phrasea\Model\Entities\FeedToken $tokens) { $this->__load(); return parent::addToken($tokens); } - public function removeToken(\Entities\FeedToken $tokens) + public function removeToken(\Alchemy\Phrasea\Model\Entities\FeedToken $tokens) { $this->__load(); return parent::removeToken($tokens); @@ -243,13 +243,13 @@ class Feed extends \Entities\Feed implements \Doctrine\ORM\Proxy\Proxy return parent::getTokens(); } - public function addEntrie(\Entities\FeedEntry $entries) + public function addEntrie(\Alchemy\Phrasea\Model\Entities\FeedEntry $entries) { $this->__load(); return parent::addEntrie($entries); } - public function removeEntrie(\Entities\FeedEntry $entries) + public function removeEntrie(\Alchemy\Phrasea\Model\Entities\FeedEntry $entries) { $this->__load(); return parent::removeEntrie($entries); diff --git a/lib/Doctrine/Proxies/__CG__EntitiesFeedEntry.php b/lib/Doctrine/Proxies/__CG__AlchemyPhraseaModelEntitiesFeedEntry.php similarity index 90% rename from lib/Doctrine/Proxies/__CG__EntitiesFeedEntry.php rename to lib/Doctrine/Proxies/__CG__AlchemyPhraseaModelEntitiesFeedEntry.php index 19fd2caae8..25d4e5945e 100644 --- a/lib/Doctrine/Proxies/__CG__EntitiesFeedEntry.php +++ b/lib/Doctrine/Proxies/__CG__AlchemyPhraseaModelEntitiesFeedEntry.php @@ -1,11 +1,11 @@ __load(); return parent::addItem($items); } - public function removeItem(\Entities\FeedItem $items) + public function removeItem(\Alchemy\Phrasea\Model\Entities\FeedItem $items) { $this->__load(); return parent::removeItem($items); @@ -141,7 +141,7 @@ class FeedEntry extends \Entities\FeedEntry implements \Doctrine\ORM\Proxy\Proxy return parent::getItems(); } - public function setPublisher(\Entities\FeedPublisher $publisher = NULL) + public function setPublisher(\Alchemy\Phrasea\Model\Entities\FeedPublisher $publisher = NULL) { $this->__load(); return parent::setPublisher($publisher); @@ -153,7 +153,7 @@ class FeedEntry extends \Entities\FeedEntry implements \Doctrine\ORM\Proxy\Proxy return parent::getPublisher(); } - public function setFeed(\Entities\Feed $feed = NULL) + public function setFeed(\Alchemy\Phrasea\Model\Entities\Feed $feed = NULL) { $this->__load(); return parent::setFeed($feed); diff --git a/lib/Doctrine/Proxies/__CG__EntitiesFeedItem.php b/lib/Doctrine/Proxies/__CG__AlchemyPhraseaModelEntitiesFeedItem.php similarity index 94% rename from lib/Doctrine/Proxies/__CG__EntitiesFeedItem.php rename to lib/Doctrine/Proxies/__CG__AlchemyPhraseaModelEntitiesFeedItem.php index c47ea49d11..72f89d8a9f 100644 --- a/lib/Doctrine/Proxies/__CG__EntitiesFeedItem.php +++ b/lib/Doctrine/Proxies/__CG__AlchemyPhraseaModelEntitiesFeedItem.php @@ -1,11 +1,11 @@ __load(); return parent::setEntry($entry); diff --git a/lib/Doctrine/Proxies/__CG__EntitiesFeedPublisher.php b/lib/Doctrine/Proxies/__CG__AlchemyPhraseaModelEntitiesFeedPublisher.php similarity index 92% rename from lib/Doctrine/Proxies/__CG__EntitiesFeedPublisher.php rename to lib/Doctrine/Proxies/__CG__AlchemyPhraseaModelEntitiesFeedPublisher.php index b222551898..40c72402d0 100644 --- a/lib/Doctrine/Proxies/__CG__EntitiesFeedPublisher.php +++ b/lib/Doctrine/Proxies/__CG__AlchemyPhraseaModelEntitiesFeedPublisher.php @@ -1,11 +1,11 @@ __load(); return parent::setFeed($feed); diff --git a/lib/Doctrine/Proxies/__CG__EntitiesFeedToken.php b/lib/Doctrine/Proxies/__CG__AlchemyPhraseaModelEntitiesFeedToken.php similarity index 92% rename from lib/Doctrine/Proxies/__CG__EntitiesFeedToken.php rename to lib/Doctrine/Proxies/__CG__AlchemyPhraseaModelEntitiesFeedToken.php index 57efe8b9fe..e3554494b9 100644 --- a/lib/Doctrine/Proxies/__CG__EntitiesFeedToken.php +++ b/lib/Doctrine/Proxies/__CG__AlchemyPhraseaModelEntitiesFeedToken.php @@ -1,11 +1,11 @@ __load(); return parent::setFeed($feed); diff --git a/lib/Doctrine/Proxies/__CG__EntitiesFtpCredential.php b/lib/Doctrine/Proxies/__CG__AlchemyPhraseaModelEntitiesFtpCredential.php similarity index 91% rename from lib/Doctrine/Proxies/__CG__EntitiesFtpCredential.php rename to lib/Doctrine/Proxies/__CG__AlchemyPhraseaModelEntitiesFtpCredential.php index 9c36a48055..051c454d3f 100644 --- a/lib/Doctrine/Proxies/__CG__EntitiesFtpCredential.php +++ b/lib/Doctrine/Proxies/__CG__AlchemyPhraseaModelEntitiesFtpCredential.php @@ -1,11 +1,11 @@ __load(); - return parent::getUser($app); - } - public function getUsrId() { $this->__load(); @@ -69,6 +63,18 @@ class FtpCredential extends \Entities\FtpCredential implements \Doctrine\ORM\Pro return parent::setUsrId($usrId); } + public function getUser() + { + $this->__load(); + return parent::getUser(); + } + + public function setUser(\Alchemy\Phrasea\Model\Entities\User $user) + { + $this->__load(); + return parent::setUser($user); + } + public function isActive() { $this->__load(); @@ -192,7 +198,7 @@ class FtpCredential extends \Entities\FtpCredential implements \Doctrine\ORM\Pro public function __sleep() { - return array('__isInitialized__', 'id', 'usrId', 'active', 'address', 'login', 'password', 'receptionFolder', 'repositoryPrefixName', 'passive', 'ssl', 'maxRetry', 'updated'); + return array('__isInitialized__', 'id', 'usrId', 'active', 'address', 'login', 'password', 'receptionFolder', 'repositoryPrefixName', 'passive', 'ssl', 'maxRetry', 'updated', 'user'); } public function __clone() diff --git a/lib/Doctrine/Proxies/__CG__EntitiesFtpExport.php b/lib/Doctrine/Proxies/__CG__AlchemyPhraseaModelEntitiesFtpExport.php similarity index 93% rename from lib/Doctrine/Proxies/__CG__EntitiesFtpExport.php rename to lib/Doctrine/Proxies/__CG__AlchemyPhraseaModelEntitiesFtpExport.php index 4bbb57bfac..c0161c66d7 100644 --- a/lib/Doctrine/Proxies/__CG__EntitiesFtpExport.php +++ b/lib/Doctrine/Proxies/__CG__AlchemyPhraseaModelEntitiesFtpExport.php @@ -1,11 +1,11 @@ __load(); return parent::setCreated($created); @@ -261,7 +261,7 @@ class FtpExport extends \Entities\FtpExport implements \Doctrine\ORM\Proxy\Proxy return parent::getCreated(); } - public function setUpdated($updated) + public function setUpdated(\DateTime $updated) { $this->__load(); return parent::setUpdated($updated); @@ -273,13 +273,13 @@ class FtpExport extends \Entities\FtpExport implements \Doctrine\ORM\Proxy\Proxy return parent::getUpdated(); } - public function addElement(\Entities\FtpExportElement $elements) + public function addElement(\Alchemy\Phrasea\Model\Entities\FtpExportElement $elements) { $this->__load(); return parent::addElement($elements); } - public function removeElement(\Entities\FtpExportElement $elements) + public function removeElement(\Alchemy\Phrasea\Model\Entities\FtpExportElement $elements) { $this->__load(); return parent::removeElement($elements); diff --git a/lib/Doctrine/Proxies/__CG__EntitiesFtpExportElement.php b/lib/Doctrine/Proxies/__CG__AlchemyPhraseaModelEntitiesFtpExportElement.php similarity index 92% rename from lib/Doctrine/Proxies/__CG__EntitiesFtpExportElement.php rename to lib/Doctrine/Proxies/__CG__AlchemyPhraseaModelEntitiesFtpExportElement.php index 0eb21ba367..fba4a80131 100644 --- a/lib/Doctrine/Proxies/__CG__EntitiesFtpExportElement.php +++ b/lib/Doctrine/Proxies/__CG__AlchemyPhraseaModelEntitiesFtpExportElement.php @@ -1,11 +1,11 @@ __load(); return parent::setCreated($created); @@ -159,7 +159,7 @@ class FtpExportElement extends \Entities\FtpExportElement implements \Doctrine\O return parent::getCreated(); } - public function setUpdated($updated) + public function setUpdated(\DateTime $updated) { $this->__load(); return parent::setUpdated($updated); @@ -171,7 +171,7 @@ class FtpExportElement extends \Entities\FtpExportElement implements \Doctrine\O return parent::getUpdated(); } - public function setExport(\Entities\FtpExport $export = NULL) + public function setExport(\Alchemy\Phrasea\Model\Entities\FtpExport $export = NULL) { $this->__load(); return parent::setExport($export); diff --git a/lib/Doctrine/Proxies/__CG__EntitiesLazaretAttribute.php b/lib/Doctrine/Proxies/__CG__AlchemyPhraseaModelEntitiesLazaretAttribute.php similarity index 92% rename from lib/Doctrine/Proxies/__CG__EntitiesLazaretAttribute.php rename to lib/Doctrine/Proxies/__CG__AlchemyPhraseaModelEntitiesLazaretAttribute.php index db8ce47b73..d3e2488348 100644 --- a/lib/Doctrine/Proxies/__CG__EntitiesLazaretAttribute.php +++ b/lib/Doctrine/Proxies/__CG__AlchemyPhraseaModelEntitiesLazaretAttribute.php @@ -1,11 +1,11 @@ __load(); return parent::setLazaretFile($lazaretFile); diff --git a/lib/Doctrine/Proxies/__CG__EntitiesLazaretCheck.php b/lib/Doctrine/Proxies/__CG__AlchemyPhraseaModelEntitiesLazaretCheck.php similarity index 91% rename from lib/Doctrine/Proxies/__CG__EntitiesLazaretCheck.php rename to lib/Doctrine/Proxies/__CG__AlchemyPhraseaModelEntitiesLazaretCheck.php index 0f5f7fb556..1878f7936a 100644 --- a/lib/Doctrine/Proxies/__CG__EntitiesLazaretCheck.php +++ b/lib/Doctrine/Proxies/__CG__AlchemyPhraseaModelEntitiesLazaretCheck.php @@ -1,11 +1,11 @@ __load(); return parent::setLazaretFile($lazaretFile); diff --git a/lib/Doctrine/Proxies/__CG__EntitiesLazaretFile.php b/lib/Doctrine/Proxies/__CG__AlchemyPhraseaModelEntitiesLazaretFile.php similarity index 89% rename from lib/Doctrine/Proxies/__CG__EntitiesLazaretFile.php rename to lib/Doctrine/Proxies/__CG__AlchemyPhraseaModelEntitiesLazaretFile.php index 764d391ab2..83b88d51be 100644 --- a/lib/Doctrine/Proxies/__CG__EntitiesLazaretFile.php +++ b/lib/Doctrine/Proxies/__CG__AlchemyPhraseaModelEntitiesLazaretFile.php @@ -1,11 +1,11 @@ __load(); return parent::addAttribute($attributes); } - public function removeAttribute(\Entities\LazaretAttribute $attributes) + public function removeAttribute(\Alchemy\Phrasea\Model\Entities\LazaretAttribute $attributes) { $this->__load(); return parent::removeAttribute($attributes); @@ -183,13 +183,13 @@ class LazaretFile extends \Entities\LazaretFile implements \Doctrine\ORM\Proxy\P return parent::getAttributes(); } - public function addCheck(\Entities\LazaretCheck $checks) + public function addCheck(\Alchemy\Phrasea\Model\Entities\LazaretCheck $checks) { $this->__load(); return parent::addCheck($checks); } - public function removeCheck(\Entities\LazaretCheck $checks) + public function removeCheck(\Alchemy\Phrasea\Model\Entities\LazaretCheck $checks) { $this->__load(); return parent::removeCheck($checks); @@ -201,7 +201,7 @@ class LazaretFile extends \Entities\LazaretFile implements \Doctrine\ORM\Proxy\P return parent::getChecks(); } - public function setSession(\Entities\LazaretSession $session = NULL) + public function setSession(\Alchemy\Phrasea\Model\Entities\LazaretSession $session = NULL) { $this->__load(); return parent::setSession($session); diff --git a/lib/Doctrine/Proxies/__CG__EntitiesLazaretSession.php b/lib/Doctrine/Proxies/__CG__AlchemyPhraseaModelEntitiesLazaretSession.php similarity index 90% rename from lib/Doctrine/Proxies/__CG__EntitiesLazaretSession.php rename to lib/Doctrine/Proxies/__CG__AlchemyPhraseaModelEntitiesLazaretSession.php index 906543e104..d70efdccef 100644 --- a/lib/Doctrine/Proxies/__CG__EntitiesLazaretSession.php +++ b/lib/Doctrine/Proxies/__CG__AlchemyPhraseaModelEntitiesLazaretSession.php @@ -1,11 +1,11 @@ __load(); return parent::addFile($files); } - public function removeFile(\Entities\LazaretFile $files) + public function removeFile(\Alchemy\Phrasea\Model\Entities\LazaretFile $files) { $this->__load(); return parent::removeFile($files); diff --git a/lib/Doctrine/Proxies/__CG__EntitiesOrder.php b/lib/Doctrine/Proxies/__CG__AlchemyPhraseaModelEntitiesOrder.php similarity index 90% rename from lib/Doctrine/Proxies/__CG__EntitiesOrder.php rename to lib/Doctrine/Proxies/__CG__AlchemyPhraseaModelEntitiesOrder.php index ff701734e8..181e9d0fec 100644 --- a/lib/Doctrine/Proxies/__CG__EntitiesOrder.php +++ b/lib/Doctrine/Proxies/__CG__AlchemyPhraseaModelEntitiesOrder.php @@ -1,11 +1,11 @@ __load(); return parent::addElement($elements); } - public function removeElement(\Entities\OrderElement $elements) + public function removeElement(\Alchemy\Phrasea\Model\Entities\OrderElement $elements) { $this->__load(); return parent::removeElement($elements); @@ -141,7 +141,7 @@ class Order extends \Entities\Order implements \Doctrine\ORM\Proxy\Proxy return parent::getOrderUsage(); } - public function setBasket(\Entities\Basket $basket = NULL) + public function setBasket(\Alchemy\Phrasea\Model\Entities\Basket $basket = NULL) { $this->__load(); return parent::setBasket($basket); diff --git a/lib/Doctrine/Proxies/__CG__EntitiesOrderElement.php b/lib/Doctrine/Proxies/__CG__AlchemyPhraseaModelEntitiesOrderElement.php similarity index 93% rename from lib/Doctrine/Proxies/__CG__EntitiesOrderElement.php rename to lib/Doctrine/Proxies/__CG__AlchemyPhraseaModelEntitiesOrderElement.php index 4d3335c727..0d49976385 100644 --- a/lib/Doctrine/Proxies/__CG__EntitiesOrderElement.php +++ b/lib/Doctrine/Proxies/__CG__AlchemyPhraseaModelEntitiesOrderElement.php @@ -1,11 +1,11 @@ __load(); return parent::setOrder($order); diff --git a/lib/Doctrine/Proxies/__CG__EntitiesSession.php b/lib/Doctrine/Proxies/__CG__AlchemyPhraseaModelEntitiesSession.php similarity index 94% rename from lib/Doctrine/Proxies/__CG__EntitiesSession.php rename to lib/Doctrine/Proxies/__CG__AlchemyPhraseaModelEntitiesSession.php index df034690ad..48a8d97e17 100644 --- a/lib/Doctrine/Proxies/__CG__EntitiesSession.php +++ b/lib/Doctrine/Proxies/__CG__AlchemyPhraseaModelEntitiesSession.php @@ -1,11 +1,11 @@ __load(); return parent::addModule($modules); } - public function removeModule(\Entities\SessionModule $modules) + public function removeModule(\Alchemy\Phrasea\Model\Entities\SessionModule $modules) { $this->__load(); return parent::removeModule($modules); diff --git a/lib/Doctrine/Proxies/__CG__EntitiesSessionModule.php b/lib/Doctrine/Proxies/__CG__AlchemyPhraseaModelEntitiesSessionModule.php similarity index 92% rename from lib/Doctrine/Proxies/__CG__EntitiesSessionModule.php rename to lib/Doctrine/Proxies/__CG__AlchemyPhraseaModelEntitiesSessionModule.php index 8404eb0dc8..5806a2229f 100644 --- a/lib/Doctrine/Proxies/__CG__EntitiesSessionModule.php +++ b/lib/Doctrine/Proxies/__CG__AlchemyPhraseaModelEntitiesSessionModule.php @@ -1,11 +1,11 @@ __load(); return parent::setSession($session); diff --git a/lib/Doctrine/Proxies/__CG__EntitiesStoryWZ.php b/lib/Doctrine/Proxies/__CG__AlchemyPhraseaModelEntitiesStoryWZ.php similarity index 95% rename from lib/Doctrine/Proxies/__CG__EntitiesStoryWZ.php rename to lib/Doctrine/Proxies/__CG__AlchemyPhraseaModelEntitiesStoryWZ.php index 82216102a5..1569682cbe 100644 --- a/lib/Doctrine/Proxies/__CG__EntitiesStoryWZ.php +++ b/lib/Doctrine/Proxies/__CG__AlchemyPhraseaModelEntitiesStoryWZ.php @@ -1,11 +1,11 @@ __load(); - return parent::setModelOf($modelOf); + return parent::setModelOf($owner); } public function getLastModel() @@ -471,6 +471,60 @@ class User extends \Entities\User implements \Doctrine\ORM\Proxy\Proxy return parent::setUpdated($updated); } + public function getFtpCredential() + { + $this->__load(); + return parent::getFtpCredential(); + } + + public function setFtpCredential(\Alchemy\Phrasea\Model\Entities\FtpCredential $ftpCredential = NULL) + { + $this->__load(); + return parent::setFtpCredential($ftpCredential); + } + + public function getQueries() + { + $this->__load(); + return parent::getQueries(); + } + + public function AddQuery(\Alchemy\Phrasea\Model\Entities\UserQuery $query) + { + $this->__load(); + return parent::AddQuery($query); + } + + public function getSettings() + { + $this->__load(); + return parent::getSettings(); + } + + public function getSettingValue($name, $default = NULL) + { + $this->__load(); + return parent::getSettingValue($name, $default); + } + + public function addSetting(\Alchemy\Phrasea\Model\Entities\UserSetting $setting) + { + $this->__load(); + return parent::addSetting($setting); + } + + public function getNotificationSettings() + { + $this->__load(); + return parent::getNotificationSettings(); + } + + public function addNotificationSettings(\Alchemy\Phrasea\Model\Entities\UserNotificationSetting $notificationSetting) + { + $this->__load(); + return parent::addNotificationSettings($notificationSetting); + } + public function ACL(\Alchemy\Phrasea\Application $app) { $this->__load(); @@ -498,7 +552,7 @@ class User extends \Entities\User implements \Doctrine\ORM\Proxy\Proxy public function __sleep() { - return array('__isInitialized__', 'id', 'login', 'email', 'password', 'nonce', 'saltedPassword', 'firstName', 'lastName', 'gender', 'address', 'city', 'country', 'zipCode', 'geonameId', 'locale', 'timezone', 'job', 'activity', 'company', 'phone', 'fax', 'admin', 'guest', 'mailNotificationsActivated', 'requestNotificationsActivated', 'ldapCreated', 'modelOf', 'lastModel', 'pushList', 'canChangeProfil', 'canChangeFtpProfil', 'lastConnection', 'mailLocked', 'deleted', 'created', 'updated'); + return array('__isInitialized__', 'id', 'login', 'email', 'password', 'nonce', 'saltedPassword', 'firstName', 'lastName', 'gender', 'address', 'city', 'country', 'zipCode', 'geonameId', 'locale', 'timezone', 'job', 'activity', 'company', 'phone', 'fax', 'admin', 'guest', 'mailNotificationsActivated', 'requestNotificationsActivated', 'ldapCreated', 'lastModel', 'pushList', 'canChangeProfil', 'canChangeFtpProfil', 'lastConnection', 'mailLocked', 'deleted', 'created', 'updated', 'modelOf', 'ftpCredential', 'queries', 'settings', 'notificationSettings'); } public function __clone() diff --git a/lib/Doctrine/Proxies/__CG__EntitiesUserNotificationSetting.php b/lib/Doctrine/Proxies/__CG__AlchemyPhraseaModelEntitiesUserNotificationSetting.php similarity index 90% rename from lib/Doctrine/Proxies/__CG__EntitiesUserNotificationSetting.php rename to lib/Doctrine/Proxies/__CG__AlchemyPhraseaModelEntitiesUserNotificationSetting.php index a18b468d4a..5f28762645 100644 --- a/lib/Doctrine/Proxies/__CG__EntitiesUserNotificationSetting.php +++ b/lib/Doctrine/Proxies/__CG__AlchemyPhraseaModelEntitiesUserNotificationSetting.php @@ -1,11 +1,11 @@ __load(); + return parent::getUser(); + } + + public function setUser(\Alchemy\Phrasea\Model\Entities\User $user = NULL) + { + $this->__load(); + return parent::setUser($user); + } + public function getUsrId() { $this->__load(); @@ -63,18 +75,6 @@ class UserNotificationSetting extends \Entities\UserNotificationSetting implemen return parent::setUsrId($usrId); } - public function getUser(\Alchemy\Phrasea\Application $app) - { - $this->__load(); - return parent::getUser($app); - } - - public function setUser(\User_Adapter $user) - { - $this->__load(); - return parent::setUser($user); - } - public function getName() { $this->__load(); @@ -126,7 +126,7 @@ class UserNotificationSetting extends \Entities\UserNotificationSetting implemen public function __sleep() { - return array('__isInitialized__', 'id', 'usrId', 'name', 'value', 'created', 'updated'); + return array('__isInitialized__', 'id', 'usrId', 'name', 'value', 'created', 'updated', 'user'); } public function __clone() diff --git a/lib/Doctrine/Proxies/__CG__EntitiesUserQuery.php b/lib/Doctrine/Proxies/__CG__AlchemyPhraseaModelEntitiesUserQuery.php similarity index 90% rename from lib/Doctrine/Proxies/__CG__EntitiesUserQuery.php rename to lib/Doctrine/Proxies/__CG__AlchemyPhraseaModelEntitiesUserQuery.php index cd0c37a5b0..348b6676eb 100644 --- a/lib/Doctrine/Proxies/__CG__EntitiesUserQuery.php +++ b/lib/Doctrine/Proxies/__CG__AlchemyPhraseaModelEntitiesUserQuery.php @@ -1,11 +1,11 @@ __load(); - return parent::getUser($app); + return parent::getUser(); } - public function setUser(\User_Adapter $user) + public function setUser(\Alchemy\Phrasea\Model\Entities\User $user = NULL) { $this->__load(); return parent::setUser($user); @@ -102,7 +102,7 @@ class UserQuery extends \Entities\UserQuery implements \Doctrine\ORM\Proxy\Proxy public function __sleep() { - return array('__isInitialized__', 'id', 'usrId', 'query', 'created'); + return array('__isInitialized__', 'id', 'usrId', 'query', 'created', 'user'); } public function __clone() diff --git a/lib/Doctrine/Proxies/__CG__EntitiesUserSetting.php b/lib/Doctrine/Proxies/__CG__AlchemyPhraseaModelEntitiesUserSetting.php similarity index 90% rename from lib/Doctrine/Proxies/__CG__EntitiesUserSetting.php rename to lib/Doctrine/Proxies/__CG__AlchemyPhraseaModelEntitiesUserSetting.php index 99d971d0a9..fbff461177 100644 --- a/lib/Doctrine/Proxies/__CG__EntitiesUserSetting.php +++ b/lib/Doctrine/Proxies/__CG__AlchemyPhraseaModelEntitiesUserSetting.php @@ -1,11 +1,11 @@ __load(); + return parent::getUser(); + } + + public function setUser(\Alchemy\Phrasea\Model\Entities\User $user = NULL) + { + $this->__load(); + return parent::setUser($user); + } + public function getUsrId() { $this->__load(); @@ -63,18 +75,6 @@ class UserSetting extends \Entities\UserSetting implements \Doctrine\ORM\Proxy\P return parent::setUsrId($usrId); } - public function getUser(\Alchemy\Phrasea\Application $app) - { - $this->__load(); - return parent::getUser($app); - } - - public function setUser(\User_Adapter $user) - { - $this->__load(); - return parent::setUser($user); - } - public function getName() { $this->__load(); @@ -126,7 +126,7 @@ class UserSetting extends \Entities\UserSetting implements \Doctrine\ORM\Proxy\P public function __sleep() { - return array('__isInitialized__', 'id', 'usrId', 'name', 'value', 'created', 'updated'); + return array('__isInitialized__', 'id', 'usrId', 'name', 'value', 'created', 'updated', 'user'); } public function __clone() diff --git a/lib/Doctrine/Proxies/__CG__EntitiesUsrAuthProvider.php b/lib/Doctrine/Proxies/__CG__AlchemyPhraseaModelEntitiesUsrAuthProvider.php similarity index 95% rename from lib/Doctrine/Proxies/__CG__EntitiesUsrAuthProvider.php rename to lib/Doctrine/Proxies/__CG__AlchemyPhraseaModelEntitiesUsrAuthProvider.php index 0c89356408..0593408bba 100644 --- a/lib/Doctrine/Proxies/__CG__EntitiesUsrAuthProvider.php +++ b/lib/Doctrine/Proxies/__CG__AlchemyPhraseaModelEntitiesUsrAuthProvider.php @@ -1,11 +1,11 @@ __load(); return parent::addOwner($owners); } - public function removeOwner(\Entities\UsrListOwner $owners) + public function removeOwner(\Alchemy\Phrasea\Model\Entities\UsrListOwner $owners) { $this->__load(); return parent::removeOwner($owners); @@ -105,13 +105,13 @@ class UsrList extends \Entities\UsrList implements \Doctrine\ORM\Proxy\Proxy return parent::getOwners(); } - public function addEntrie(\Entities\UsrListEntry $entries) + public function addEntrie(\Alchemy\Phrasea\Model\Entities\UsrListEntry $entries) { $this->__load(); return parent::addEntrie($entries); } - public function removeEntrie(\Entities\UsrListEntry $entries) + public function removeEntrie(\Alchemy\Phrasea\Model\Entities\UsrListEntry $entries) { $this->__load(); return parent::removeEntrie($entries); diff --git a/lib/Doctrine/Proxies/__CG__EntitiesUsrListEntry.php b/lib/Doctrine/Proxies/__CG__AlchemyPhraseaModelEntitiesUsrListEntry.php similarity index 93% rename from lib/Doctrine/Proxies/__CG__EntitiesUsrListEntry.php rename to lib/Doctrine/Proxies/__CG__AlchemyPhraseaModelEntitiesUsrListEntry.php index 33d4725896..876b2b587a 100644 --- a/lib/Doctrine/Proxies/__CG__EntitiesUsrListEntry.php +++ b/lib/Doctrine/Proxies/__CG__AlchemyPhraseaModelEntitiesUsrListEntry.php @@ -1,11 +1,11 @@ __load(); return parent::setList($list); diff --git a/lib/Doctrine/Proxies/__CG__EntitiesUsrListOwner.php b/lib/Doctrine/Proxies/__CG__AlchemyPhraseaModelEntitiesUsrListOwner.php similarity index 93% rename from lib/Doctrine/Proxies/__CG__EntitiesUsrListOwner.php rename to lib/Doctrine/Proxies/__CG__AlchemyPhraseaModelEntitiesUsrListOwner.php index 182b4a24c0..95617a6957 100644 --- a/lib/Doctrine/Proxies/__CG__EntitiesUsrListOwner.php +++ b/lib/Doctrine/Proxies/__CG__AlchemyPhraseaModelEntitiesUsrListOwner.php @@ -1,11 +1,11 @@ __load(); return parent::setList($list); diff --git a/lib/Doctrine/Proxies/__CG__EntitiesValidationData.php b/lib/Doctrine/Proxies/__CG__AlchemyPhraseaModelEntitiesValidationData.php similarity index 89% rename from lib/Doctrine/Proxies/__CG__EntitiesValidationData.php rename to lib/Doctrine/Proxies/__CG__AlchemyPhraseaModelEntitiesValidationData.php index 97a007b22d..601c32a85b 100644 --- a/lib/Doctrine/Proxies/__CG__EntitiesValidationData.php +++ b/lib/Doctrine/Proxies/__CG__AlchemyPhraseaModelEntitiesValidationData.php @@ -1,11 +1,11 @@ __load(); return parent::setParticipant($participant); @@ -99,7 +99,7 @@ class ValidationData extends \Entities\ValidationData implements \Doctrine\ORM\P return parent::getParticipant(); } - public function setBasketElement(\Entities\BasketElement $basketElement = NULL) + public function setBasketElement(\Alchemy\Phrasea\Model\Entities\BasketElement $basketElement = NULL) { $this->__load(); return parent::setBasketElement($basketElement); diff --git a/lib/Doctrine/Proxies/__CG__EntitiesValidationParticipant.php b/lib/Doctrine/Proxies/__CG__AlchemyPhraseaModelEntitiesValidationParticipant.php similarity index 90% rename from lib/Doctrine/Proxies/__CG__EntitiesValidationParticipant.php rename to lib/Doctrine/Proxies/__CG__AlchemyPhraseaModelEntitiesValidationParticipant.php index cef3296458..d8d21c51ea 100644 --- a/lib/Doctrine/Proxies/__CG__EntitiesValidationParticipant.php +++ b/lib/Doctrine/Proxies/__CG__AlchemyPhraseaModelEntitiesValidationParticipant.php @@ -1,11 +1,11 @@ __load(); return parent::addData($datas); } - public function removeData(\Entities\ValidationData $datas) + public function removeData(\Alchemy\Phrasea\Model\Entities\ValidationData $datas) { $this->__load(); return parent::removeData($datas); @@ -153,7 +153,7 @@ class ValidationParticipant extends \Entities\ValidationParticipant implements \ return parent::getDatas(); } - public function setSession(\Entities\ValidationSession $session = NULL) + public function setSession(\Alchemy\Phrasea\Model\Entities\ValidationSession $session = NULL) { $this->__load(); return parent::setSession($session); diff --git a/lib/Doctrine/Proxies/__CG__EntitiesValidationSession.php b/lib/Doctrine/Proxies/__CG__AlchemyPhraseaModelEntitiesValidationSession.php similarity index 90% rename from lib/Doctrine/Proxies/__CG__EntitiesValidationSession.php rename to lib/Doctrine/Proxies/__CG__AlchemyPhraseaModelEntitiesValidationSession.php index 792c430319..ae60b4c3ea 100644 --- a/lib/Doctrine/Proxies/__CG__EntitiesValidationSession.php +++ b/lib/Doctrine/Proxies/__CG__AlchemyPhraseaModelEntitiesValidationSession.php @@ -1,11 +1,11 @@ __load(); return parent::setBasket($basket); @@ -129,13 +129,13 @@ class ValidationSession extends \Entities\ValidationSession implements \Doctrine return parent::getBasket(); } - public function addParticipant(\Entities\ValidationParticipant $participants) + public function addParticipant(\Alchemy\Phrasea\Model\Entities\ValidationParticipant $participants) { $this->__load(); return parent::addParticipant($participants); } - public function removeParticipant(\Entities\ValidationParticipant $participants) + public function removeParticipant(\Alchemy\Phrasea\Model\Entities\ValidationParticipant $participants) { $this->__load(); return parent::removeParticipant($participants); diff --git a/lib/Doctrine/Proxies/__CG__EntitiesCategory.php b/lib/Doctrine/Proxies/__CG__EntitiesCategory.php deleted file mode 100644 index 317d86f9cc..0000000000 --- a/lib/Doctrine/Proxies/__CG__EntitiesCategory.php +++ /dev/null @@ -1,202 +0,0 @@ -_entityPersister = $entityPersister; - $this->_identifier = $identifier; - } - /** @private */ - public function __load() - { - if (!$this->__isInitialized__ && $this->_entityPersister) { - $this->__isInitialized__ = true; - - if (method_exists($this, "__wakeup")) { - // call this after __isInitialized__to avoid infinite recursion - // but before loading to emulate what ClassMetadata::newInstance() - // provides. - $this->__wakeup(); - } - - if ($this->_entityPersister->load($this->_identifier, $this) === null) { - throw new \Doctrine\ORM\EntityNotFoundException(); - } - unset($this->_entityPersister, $this->_identifier); - } - } - - /** @private */ - public function __isInitialized() - { - return $this->__isInitialized__; - } - - - public function getTranslations() - { - $this->__load(); - return parent::getTranslations(); - } - - public function getTranslation($locale) - { - $this->__load(); - return parent::getTranslation($locale); - } - - public function addTranslation(\Entities\CategoryTranslation $t) - { - $this->__load(); - return parent::addTranslation($t); - } - - public function getId() - { - if ($this->__isInitialized__ === false) { - return (int) $this->_identifier["id"]; - } - $this->__load(); - return parent::getId(); - } - - public function setTitle($title) - { - $this->__load(); - return parent::setTitle($title); - } - - public function getTitle() - { - $this->__load(); - return parent::getTitle(); - } - - public function setSubtitle($subtitle) - { - $this->__load(); - return parent::setSubtitle($subtitle); - } - - public function getSubtitle() - { - $this->__load(); - return parent::getSubtitle(); - } - - public function setParent($parent) - { - $this->__load(); - return parent::setParent($parent); - } - - public function getParent() - { - $this->__load(); - return parent::getParent(); - } - - public function getRoot() - { - $this->__load(); - return parent::getRoot(); - } - - public function getLevel() - { - $this->__load(); - return parent::getLevel(); - } - - public function getChildren() - { - $this->__load(); - return parent::getChildren(); - } - - public function getLeft() - { - $this->__load(); - return parent::getLeft(); - } - - public function getRight() - { - $this->__load(); - return parent::getRight(); - } - - public function getCreated() - { - $this->__load(); - return parent::getCreated(); - } - - public function getUpdated() - { - $this->__load(); - return parent::getUpdated(); - } - - public function getCreatedBy() - { - $this->__load(); - return parent::getCreatedBy(); - } - - public function getUpdatedBy() - { - $this->__load(); - return parent::getUpdatedBy(); - } - - public function __toString() - { - $this->__load(); - return parent::__toString(); - } - - public function addElement(\Entities\CategoryElement $elements) - { - $this->__load(); - return parent::addElement($elements); - } - - public function removeElement(\Entities\CategoryElement $elements) - { - $this->__load(); - return parent::removeElement($elements); - } - - - public function __sleep() - { - return array('__isInitialized__', 'id', 'title', 'subtitle', 'lft', 'rgt', 'root', 'level', 'parent', 'children', 'translations', 'elements'); - } - - public function __clone() - { - if (!$this->__isInitialized__ && $this->_entityPersister) { - $this->__isInitialized__ = true; - $class = $this->_entityPersister->getClassMetadata(); - $original = $this->_entityPersister->load($this->_identifier); - if ($original === null) { - throw new \Doctrine\ORM\EntityNotFoundException(); - } - foreach ($class->reflFields as $field => $reflProperty) { - $reflProperty->setValue($this, $reflProperty->getValue($original)); - } - unset($this->_entityPersister, $this->_identifier); - } - - } -} \ No newline at end of file diff --git a/lib/Doctrine/Repositories/AuthFailureRepository.php b/lib/Doctrine/Repositories/AuthFailureRepository.php index 87a1efc127..737178f4a8 100644 --- a/lib/Doctrine/Repositories/AuthFailureRepository.php +++ b/lib/Doctrine/Repositories/AuthFailureRepository.php @@ -17,7 +17,7 @@ class AuthFailureRepository extends EntityRepository $date = new \DateTime($limit); $dql = 'SELECT f - FROM Entities\AuthFailure f + FROM Alchemy\Phrasea\Model\Entities\AuthFailure f WHERE f.created < :date'; $params = array('date' => $date->format('Y-m-d h:i:s')); @@ -31,7 +31,7 @@ class AuthFailureRepository extends EntityRepository public function findLockedFailuresMatching($username, $ip) { $dql = 'SELECT f - FROM Entities\AuthFailure f + FROM Alchemy\Phrasea\Model\Entities\AuthFailure f WHERE (f.username = :username OR f.ip = :ip) AND f.locked = true'; diff --git a/lib/Doctrine/Repositories/BasketElementRepository.php b/lib/Doctrine/Repositories/BasketElementRepository.php index a9ed6dd337..0330a651c5 100644 --- a/lib/Doctrine/Repositories/BasketElementRepository.php +++ b/lib/Doctrine/Repositories/BasketElementRepository.php @@ -2,6 +2,7 @@ namespace Repositories; +use Alchemy\Phrasea\Model\Entities\BasketElement; use Doctrine\ORM\EntityRepository; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; @@ -17,7 +18,7 @@ class BasketElementRepository extends EntityRepository public function findUserElement($element_id, \User_Adapter $user) { $dql = 'SELECT e - FROM Entities\BasketElement e + FROM Alchemy\Phrasea\Model\Entities\BasketElement e JOIN e.basket b LEFT JOIN e.validation_datas vd LEFT JOIN b.validation s @@ -36,7 +37,7 @@ class BasketElementRepository extends EntityRepository $element = $query->getOneOrNullResult(); - /* @var $element \Entities\BasketElement */ + /* @var $element BasketElement */ if (null === $element) { throw new NotFoundHttpException(_('Element is not found')); } @@ -47,7 +48,7 @@ class BasketElementRepository extends EntityRepository public function findElementsByRecord(\record_adapter $record) { $dql = 'SELECT e - FROM Entities\BasketElement e + FROM Alchemy\Phrasea\Model\Entities\BasketElement e JOIN e.basket b LEFT JOIN b.validation s LEFT JOIN s.participants p @@ -68,7 +69,7 @@ class BasketElementRepository extends EntityRepository public function findElementsByDatabox(\databox $databox) { $dql = 'SELECT e - FROM Entities\BasketElement e + FROM Alchemy\Phrasea\Model\Entities\BasketElement e JOIN e.basket b LEFT JOIN b.validation s LEFT JOIN s.participants p @@ -93,7 +94,7 @@ class BasketElementRepository extends EntityRepository public function findReceivedElementsByRecord(\record_adapter $record, \User_Adapter $user) { $dql = 'SELECT e - FROM Entities\BasketElement e + FROM Alchemy\Phrasea\Model\Entities\BasketElement e JOIN e.basket b LEFT JOIN b.validation s LEFT JOIN s.participants p @@ -117,7 +118,7 @@ class BasketElementRepository extends EntityRepository public function findReceivedValidationElementsByRecord(\record_adapter $record, \User_Adapter $user) { $dql = 'SELECT e - FROM Entities\BasketElement e + FROM Alchemy\Phrasea\Model\Entities\BasketElement e JOIN e.basket b JOIN b.validation v JOIN v.participants p diff --git a/lib/Doctrine/Repositories/BasketRepository.php b/lib/Doctrine/Repositories/BasketRepository.php index aaaded5ff1..3ebdd8b4e7 100644 --- a/lib/Doctrine/Repositories/BasketRepository.php +++ b/lib/Doctrine/Repositories/BasketRepository.php @@ -12,6 +12,7 @@ namespace Repositories; use Alchemy\Phrasea\Application; +use Alchemy\Phrasea\Model\Entities\Basket; use Doctrine\ORM\EntityRepository; use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; @@ -37,7 +38,7 @@ class BasketRepository extends EntityRepository public function findActiveByUser(\User_Adapter $user, $sort = null) { $dql = 'SELECT b - FROM Entities\Basket b + FROM Alchemy\Phrasea\Model\Entities\Basket b LEFT JOIN b.elements e WHERE b.usr_id = :usr_id AND b.archived = false'; @@ -63,7 +64,7 @@ class BasketRepository extends EntityRepository public function findUnreadActiveByUser(\User_Adapter $user) { $dql = 'SELECT b - FROM Entities\Basket b + FROM Alchemy\Phrasea\Model\Entities\Basket b JOIN b.elements e LEFT JOIN b.validation s LEFT JOIN s.participants p @@ -98,7 +99,7 @@ class BasketRepository extends EntityRepository public function findActiveValidationByUser(\User_Adapter $user, $sort = null) { $dql = 'SELECT b - FROM Entities\Basket b + FROM Alchemy\Phrasea\Model\Entities\Basket b JOIN b.elements e JOIN e.validation_datas v JOIN b.validation s @@ -125,12 +126,12 @@ class BasketRepository extends EntityRepository * @throws AccessDeniedHttpException * @param type $basket_id * @param \User_Adapter $user - * @return \Entities\Basket + * @return Basket */ public function findUserBasket(Application $app, $basket_id, \User_Adapter $user, $requireOwner) { $dql = 'SELECT b - FROM Entities\Basket b + FROM Alchemy\Phrasea\Model\Entities\Basket b LEFT JOIN b.elements e WHERE b.id = :basket_id'; @@ -139,7 +140,7 @@ class BasketRepository extends EntityRepository $basket = $query->getOneOrNullResult(); - /* @var $basket \Entities\Basket */ + /* @var $basket Basket */ if (null === $basket) { throw new NotFoundHttpException(_('Basket is not found')); } @@ -167,7 +168,7 @@ class BasketRepository extends EntityRepository { $dql = 'SELECT b - FROM Entities\Basket b + FROM Alchemy\Phrasea\Model\Entities\Basket b JOIN b.elements e WHERE e.record_id = :record_id AND e.sbas_id = e.sbas_id AND b.usr_id = :usr_id'; @@ -190,7 +191,7 @@ class BasketRepository extends EntityRepository switch ($type) { case self::RECEIVED: $dql = 'SELECT b - FROM Entities\Basket b + FROM Alchemy\Phrasea\Model\Entities\Basket b JOIN b.elements e WHERE b.usr_id = :usr_id AND b.pusher_id IS NOT NULL'; $params = array( @@ -199,7 +200,7 @@ class BasketRepository extends EntityRepository break; case self::VALIDATION_DONE: $dql = 'SELECT b - FROM Entities\Basket b + FROM Alchemy\Phrasea\Model\Entities\Basket b JOIN b.elements e JOIN b.validation s JOIN s.participants p @@ -211,7 +212,7 @@ class BasketRepository extends EntityRepository break; case self::VALIDATION_SENT: $dql = 'SELECT b - FROM Entities\Basket b + FROM Alchemy\Phrasea\Model\Entities\Basket b JOIN b.elements e JOIN b.validation v WHERE b.usr_id = :usr_id'; @@ -221,7 +222,7 @@ class BasketRepository extends EntityRepository break; default: $dql = 'SELECT b - FROM Entities\Basket b + FROM Alchemy\Phrasea\Model\Entities\Basket b LEFT JOIN b.elements e LEFT JOIN b.validation s LEFT JOIN s.participants p @@ -233,7 +234,7 @@ class BasketRepository extends EntityRepository break; case self::MYBASKETS: $dql = 'SELECT b - FROM Entities\Basket b + FROM Alchemy\Phrasea\Model\Entities\Basket b LEFT JOIN b.elements e LEFT JOIN b.validation s LEFT JOIN s.participants p @@ -280,7 +281,7 @@ class BasketRepository extends EntityRepository public function findActiveValidationAndBasketByUser(\User_Adapter $user, $sort = null) { $dql = 'SELECT b - FROM Entities\Basket b + FROM Alchemy\Phrasea\Model\Entities\Basket b LEFT JOIN b.elements e LEFT JOIN b.validation s LEFT JOIN s.participants p diff --git a/lib/Doctrine/Repositories/FeedEntryRepository.php b/lib/Doctrine/Repositories/FeedEntryRepository.php index 3000630ce5..1eee440851 100644 --- a/lib/Doctrine/Repositories/FeedEntryRepository.php +++ b/lib/Doctrine/Repositories/FeedEntryRepository.php @@ -23,7 +23,7 @@ class FeedEntryRepository extends EntityRepository */ public function findByFeeds($feeds, $offset_start = null, $how_many = null) { - $dql = 'SELECT f FROM Entities\FeedEntry f + $dql = 'SELECT f FROM Alchemy\Phrasea\Model\Entities\FeedEntry f WHERE f.feed IN (:feeds) order by f.updatedOn DESC'; $query = $this->_em->createQuery($dql); diff --git a/lib/Doctrine/Repositories/FeedItemRepository.php b/lib/Doctrine/Repositories/FeedItemRepository.php index 5ab3935fc2..c66a26f6f5 100644 --- a/lib/Doctrine/Repositories/FeedItemRepository.php +++ b/lib/Doctrine/Repositories/FeedItemRepository.php @@ -26,7 +26,7 @@ class FeedItemRepository extends EntityRepository public function isRecordInPublicFeed(Application $app, $sbas_id, $record_id) { $dql = 'SELECT i - FROM Entities\FeedItem i + FROM Alchemy\Phrasea\Model\Entities\FeedItem i JOIN i.entry e JOIN e.feed f WHERE i.sbasId = :sbas_id @@ -54,7 +54,7 @@ class FeedItemRepository extends EntityRepository do { $dql = 'SELECT i - FROM Entities\FeedItem i + FROM Alchemy\Phrasea\Model\Entities\FeedItem i JOIN i.entry e JOIN e.feed f WHERE f.public = true ORDER BY i.createdOn DESC'; diff --git a/lib/Doctrine/Repositories/FeedPublisherRepository.php b/lib/Doctrine/Repositories/FeedPublisherRepository.php index 185fa596ac..273d74119a 100644 --- a/lib/Doctrine/Repositories/FeedPublisherRepository.php +++ b/lib/Doctrine/Repositories/FeedPublisherRepository.php @@ -3,8 +3,8 @@ namespace Repositories; use Doctrine\ORM\EntityRepository; -use Entities\Feed; -use Entities\FeedPublisher; +use Alchemy\Phrasea\Model\Entities\Feed; +use Alchemy\Phrasea\Model\Entities\FeedPublisher; /** * FeedPublisherRepository diff --git a/lib/Doctrine/Repositories/FeedRepository.php b/lib/Doctrine/Repositories/FeedRepository.php index 3a085dcfc3..6d65bfd92c 100644 --- a/lib/Doctrine/Repositories/FeedRepository.php +++ b/lib/Doctrine/Repositories/FeedRepository.php @@ -4,7 +4,7 @@ namespace Repositories; use Alchemy\Phrasea\Application; use Doctrine\ORM\EntityRepository; -use Entities\Feed; +use Alchemy\Phrasea\Model\Entities\Feed; /** * FeedRepository diff --git a/lib/Doctrine/Repositories/FtpExportRepository.php b/lib/Doctrine/Repositories/FtpExportRepository.php index 17838203f1..76dd2f56ed 100644 --- a/lib/Doctrine/Repositories/FtpExportRepository.php +++ b/lib/Doctrine/Repositories/FtpExportRepository.php @@ -13,11 +13,11 @@ use Doctrine\ORM\EntityRepository; class FtpExportRepository extends EntityRepository { /** - * Returns exports that crashed. If a date is provided, only exports created + * Returns exports that crashed. If a date is provided, only exports created * before this date are returned. - * + * * @param \DateTime $before An optional date to search - * + * * @return array */ public function findCrashedExports(\DateTime $before = null) @@ -29,19 +29,19 @@ class FtpExportRepository extends EntityRepository $qb->andWhere($qb->expr()->lte('e.created', ':created')); $qb->setParameter(':created', $before); } - + return $qb->getQuery()->getResult(); } /** * Returns a list of exports that can be achieved. - * + * * @return array */ public function findDoableExports() { $dql = 'SELECT f - FROM Entities\FtpExport f + FROM Alchemy\Phrasea\Model\Entities\FtpExport f INNER JOIN f.elements e WHERE e.done = false'; @@ -52,9 +52,9 @@ class FtpExportRepository extends EntityRepository /** * Returns the exports initiated by a given user. - * + * * @param \User_Adapter $user - * + * * @return array */ public function findByUser(\User_Adapter $user) diff --git a/lib/Doctrine/Repositories/LazaretFileRepository.php b/lib/Doctrine/Repositories/LazaretFileRepository.php index 237c4b98fa..d4465e1b43 100644 --- a/lib/Doctrine/Repositories/LazaretFileRepository.php +++ b/lib/Doctrine/Repositories/LazaretFileRepository.php @@ -21,7 +21,7 @@ class LazaretFileRepository extends EntityRepository $dql = ' SELECT f - FROM Entities\LazaretFile f' + FROM Alchemy\Phrasea\Model\Entities\LazaretFile f' . ('' === $base_ids ? '' : ' WHERE f.base_id IN (' . $base_ids . ')') . ' ORDER BY f.id DESC'; diff --git a/lib/Doctrine/Repositories/StoryWZRepository.php b/lib/Doctrine/Repositories/StoryWZRepository.php index 5e0827390f..ff50c85b9c 100644 --- a/lib/Doctrine/Repositories/StoryWZRepository.php +++ b/lib/Doctrine/Repositories/StoryWZRepository.php @@ -18,7 +18,7 @@ class StoryWZRepository extends EntityRepository public function findByUser(Application $app, \User_Adapter $user, $sort) { - $dql = 'SELECT s FROM Entities\StoryWZ s WHERE s.usr_id = :usr_id '; + $dql = 'SELECT s FROM Alchemy\Phrasea\Model\Entities\StoryWZ s WHERE s.usr_id = :usr_id '; if ($sort == 'date') { $dql .= ' ORDER BY s.created DESC'; @@ -109,7 +109,7 @@ class StoryWZRepository extends EntityRepository public function findByRecord(Application $app, \record_adapter $Story) { - $dql = 'SELECT s FROM Entities\StoryWZ s WHERE s.sbas_id = :sbas_id + $dql = 'SELECT s FROM Alchemy\Phrasea\Model\Entities\StoryWZ s WHERE s.sbas_id = :sbas_id AND s.record_id = :record_id'; $query = $this->_em->createQuery($dql); @@ -135,7 +135,7 @@ class StoryWZRepository extends EntityRepository public function findByDatabox(Application $app, \databox $databox) { - $dql = 'SELECT s FROM Entities\StoryWZ s WHERE s.sbas_id = :sbas_id'; + $dql = 'SELECT s FROM Alchemy\Phrasea\Model\Entities\StoryWZ s WHERE s.sbas_id = :sbas_id'; $query = $this->_em->createQuery($dql); $query->setParameters(array( diff --git a/lib/Doctrine/Repositories/UserRepository.php b/lib/Doctrine/Repositories/UserRepository.php index f7ff3b4fde..e4848f99a5 100644 --- a/lib/Doctrine/Repositories/UserRepository.php +++ b/lib/Doctrine/Repositories/UserRepository.php @@ -12,7 +12,7 @@ namespace Repositories; use Doctrine\ORM\EntityRepository; -use Entities\User; +use Alchemy\Phrasea\Model\Entities\User; /** * User diff --git a/lib/Doctrine/Repositories/UsrAuthProviderRepository.php b/lib/Doctrine/Repositories/UsrAuthProviderRepository.php index 61468e4f8c..3c7cf9745d 100644 --- a/lib/Doctrine/Repositories/UsrAuthProviderRepository.php +++ b/lib/Doctrine/Repositories/UsrAuthProviderRepository.php @@ -15,7 +15,7 @@ class UsrAuthProviderRepository extends EntityRepository public function findByUser(\User_Adapter $user) { $dql = 'SELECT u - FROM Entities\UsrAuthProvider u + FROM Alchemy\Phrasea\Model\Entities\UsrAuthProvider u WHERE u.usr_id = :usrId'; $params = array('usrId' => $user->get_id()); @@ -29,7 +29,7 @@ class UsrAuthProviderRepository extends EntityRepository public function findWithProviderAndId($providerId, $distantId) { $dql = 'SELECT u - FROM Entities\UsrAuthProvider u + FROM Alchemy\Phrasea\Model\Entities\UsrAuthProvider u WHERE u.provider = :providerId AND u.distant_id = :distantId'; $params = array('providerId' => $providerId, 'distantId' => $distantId); diff --git a/lib/Doctrine/Repositories/UsrListEntryRepository.php b/lib/Doctrine/Repositories/UsrListEntryRepository.php index da537ce723..1ae5a9ae7c 100644 --- a/lib/Doctrine/Repositories/UsrListEntryRepository.php +++ b/lib/Doctrine/Repositories/UsrListEntryRepository.php @@ -2,6 +2,8 @@ namespace Repositories; +use Alchemy\Phrasea\Model\Entities\UsrList; +use Alchemy\Phrasea\Model\Entities\UsrListEntry; use Doctrine\ORM\EntityRepository; use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; @@ -23,7 +25,7 @@ class UsrListEntryRepository extends EntityRepository */ public function findUserList(\User_Adapter $user) { - $dql = 'SELECT e FROM Entities\UsrListEntry e + $dql = 'SELECT e FROM Alchemy\Phrasea\Model\Entities\UsrListEntry e WHERE e.usr_id = :usr_id'; $params = array( @@ -36,7 +38,7 @@ class UsrListEntryRepository extends EntityRepository return $query->getResult(); } - public function findEntryByListAndEntryId(\Entities\UsrList $list, $entry_id) + public function findEntryByListAndEntryId(UsrList $list, $entry_id) { $entry = $this->find($entry_id); @@ -44,7 +46,7 @@ class UsrListEntryRepository extends EntityRepository throw new NotFoundHttpException('Entry not found'); } - /* @var $entry \Entities\UsrListEntry */ + /* @var $entry UsrListEntry */ if ($entry->getList()->getId() != $list->getId()) { throw new AccessDeniedHttpException('Entry mismatch list'); } @@ -52,9 +54,9 @@ class UsrListEntryRepository extends EntityRepository return $entry; } - public function findEntryByListAndUsrId(\Entities\UsrList $list, $usr_id) + public function findEntryByListAndUsrId(UsrList $list, $usr_id) { - $dql = 'SELECT e FROM Entities\UsrListEntry e + $dql = 'SELECT e FROM Alchemy\Phrasea\Model\Entities\UsrListEntry e JOIN e.list l WHERE e.usr_id = :usr_id AND l.id = :list_id'; diff --git a/lib/Doctrine/Repositories/UsrListOwnerRepository.php b/lib/Doctrine/Repositories/UsrListOwnerRepository.php index 940fdd3d93..bb660f52d5 100644 --- a/lib/Doctrine/Repositories/UsrListOwnerRepository.php +++ b/lib/Doctrine/Repositories/UsrListOwnerRepository.php @@ -2,6 +2,8 @@ namespace Repositories; +use Alchemy\Phrasea\Model\Entities\UsrListOwner; +use Alchemy\Phrasea\Model\Entities\UsrList; use Doctrine\ORM\EntityRepository; use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; @@ -18,15 +20,15 @@ class UsrListOwnerRepository extends EntityRepository /** * * - * @param \Entities\UsrList $list + * @param UsrList $list * @param type $owner_id - * @return \Entities\UsrList + * @return UsrList */ - public function findByListAndOwner(\Entities\UsrList $list, $owner_id) + public function findByListAndOwner(UsrList $list, $owner_id) { $owner = $this->find($owner_id); - /* @var $owner \Entities\UsrListOwner */ + /* @var $owner UsrListOwner */ if (null === $owner) { throw new NotFoundHttpException(_('Owner is not found')); } @@ -41,13 +43,13 @@ class UsrListOwnerRepository extends EntityRepository /** * * - * @param \Entities\UsrList $list + * @param UsrList $list * @param type $usr_id - * @return \Entities\UsrList + * @return UsrList */ - public function findByListAndUsrId(\Entities\UsrList $list, $usr_id) + public function findByListAndUsrId(UsrList $list, $usr_id) { - $dql = 'SELECT o FROM Entities\UsrListOwner o + $dql = 'SELECT o FROM Alchemy\Phrasea\Model\Entities\UsrListOwner o JOIN o.list l WHERE l.id = :list_id AND o.usr_id = :usr_id'; @@ -61,7 +63,7 @@ class UsrListOwnerRepository extends EntityRepository $owner = $query->getSingleResult(); - /* @var $owner \Entities\UsrListOwner */ + /* @var $owner UsrListOwner */ if (null === $owner) { throw new NotFoundHttpException(_('Owner is not found')); } diff --git a/lib/Doctrine/Repositories/UsrListRepository.php b/lib/Doctrine/Repositories/UsrListRepository.php index 193e04b99a..7e04469b9d 100644 --- a/lib/Doctrine/Repositories/UsrListRepository.php +++ b/lib/Doctrine/Repositories/UsrListRepository.php @@ -3,6 +3,7 @@ namespace Repositories; use Alchemy\Phrasea\Application; +use Alchemy\Phrasea\Model\Entities\UsrList; use Doctrine\ORM\EntityRepository; use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; @@ -24,7 +25,7 @@ class UsrListRepository extends EntityRepository */ public function findUserLists(\User_Adapter $user) { - $dql = 'SELECT l FROM Entities\UsrList l + $dql = 'SELECT l FROM Alchemy\Phrasea\Model\Entities\UsrList l JOIN l.owners o WHERE o.usr_id = :usr_id'; @@ -42,13 +43,13 @@ class UsrListRepository extends EntityRepository * * @param \User_Adapter $user * @param type $list_id - * @return \Entities\UsrList + * @return UsrList */ public function findUserListByUserAndId(Application $app, \User_Adapter $user, $list_id) { $list = $this->find($list_id); - /* @var $basket \Entities\UsrList */ + /* @var $list UsrList */ if (null === $list) { throw new NotFoundHttpException(_('List is not found')); } @@ -69,7 +70,7 @@ class UsrListRepository extends EntityRepository */ public function findUserListLike(\User_Adapter $user, $name) { - $dql = 'SELECT l FROM Entities\UsrList l + $dql = 'SELECT l FROM Alchemy\Phrasea\Model\Entities\UsrList l JOIN l.owners o WHERE o.usr_id = :usr_id AND l.name LIKE :name'; diff --git a/lib/Doctrine/Repositories/ValidationParticipantRepository.php b/lib/Doctrine/Repositories/ValidationParticipantRepository.php index 93cdfa8809..97ca9f9fd7 100644 --- a/lib/Doctrine/Repositories/ValidationParticipantRepository.php +++ b/lib/Doctrine/Repositories/ValidationParticipantRepository.php @@ -32,7 +32,7 @@ class ValidationParticipantRepository extends EntityRepository { $dql = ' SELECT p, s - FROM Entities\ValidationParticipant p + FROM Alchemy\Phrasea\Model\Entities\ValidationParticipant p JOIN p.session s JOIN s.basket b WHERE p.is_confirmed = 0 diff --git a/lib/classes/ACL.php b/lib/classes/ACL.php index ab3bffcae6..12dafbcb0d 100644 --- a/lib/classes/ACL.php +++ b/lib/classes/ACL.php @@ -258,7 +258,7 @@ class ACL implements cache_cacheableInterface $granted = true; } - if (false === $granted && $this->app['EM']->getRepository('Entities\FeedItem')->isRecordInPublicFeed($this->app, $record->get_sbas_id(), $record->get_record_id())) { + if (false === $granted && $this->app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\FeedItem')->isRecordInPublicFeed($this->app, $record->get_sbas_id(), $record->get_record_id())) { $granted = true; } diff --git a/lib/classes/API/V1/adapter.php b/lib/classes/API/V1/adapter.php index 911bd290d1..e0e3e3e484 100644 --- a/lib/classes/API/V1/adapter.php +++ b/lib/classes/API/V1/adapter.php @@ -17,10 +17,14 @@ use Alchemy\Phrasea\Application; use Alchemy\Phrasea\Border\File; use Alchemy\Phrasea\Border\Attribute\Status; use Alchemy\Phrasea\Border\Manager as BorderManager; -use Entities\Feed; -use Entities\FeedEntry; -use Entities\FeedItem; -use Entities\UserQuery; +use Alchemy\Phrasea\Model\Entities\Basket; +use Alchemy\Phrasea\Model\Entities\BasketElement; +use Alchemy\Phrasea\Model\Entities\Feed; +use Alchemy\Phrasea\Model\Entities\FeedEntry; +use Alchemy\Phrasea\Model\Entities\FeedItem; +use Alchemy\Phrasea\Model\Entities\LazaretFile; +use Alchemy\Phrasea\Model\Entities\UserQuery; +use Alchemy\Phrasea\Model\Entities\ValidationParticipant; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; @@ -684,7 +688,7 @@ class API_V1_adapter extends API_V1_Abstract $Package->addAttribute(new Status($app, $request->get('status'))); } - $session = new Entities\LazaretSession(); + $session = new Alchemy\Phrasea\Model\Entities\LazaretSession(); $session->setUsrId($app['authentication']->getUser()->get_id()); $app['EM']->persist($session); @@ -730,7 +734,7 @@ class API_V1_adapter extends API_V1_Abstract $ret['url'] = '/records/' . $output->get_sbas_id() . '/' . $output->get_record_id() . '/'; $app['phraseanet.SE']->addRecord($output); } - if ($output instanceof \Entities\LazaretFile) { + if ($output instanceof LazaretFile) { $ret['entity'] = '1'; $ret['url'] = '/quarantine/item/' . $output->getId() . '/'; } @@ -752,7 +756,7 @@ class API_V1_adapter extends API_V1_Abstract $lazaretFiles = array(); if (count($baseIds) > 0) { - $lazaretRepository = $app['EM']->getRepository('Entities\LazaretFile'); + $lazaretRepository = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\LazaretFile'); $lazaretFiles = $lazaretRepository->findPerPage( $baseIds, $offset_start, $per_page @@ -778,9 +782,9 @@ class API_V1_adapter extends API_V1_Abstract public function list_quarantine_item($lazaret_id, Application $app, Request $request) { - $lazaretFile = $app['EM']->find('Entities\LazaretFile', $lazaret_id); + $lazaretFile = $app['EM']->find('Alchemy\Phrasea\Model\Entities\LazaretFile', $lazaret_id); - /* @var $lazaretFile \Entities\LazaretFile */ + /* @var $lazaretFile LazaretFile */ if (null === $lazaretFile) { throw new \API_V1_exception_notfound(sprintf('Lazaret file id %d not found', $lazaret_id)); } @@ -798,7 +802,7 @@ class API_V1_adapter extends API_V1_Abstract return $result; } - protected function list_lazaret_file(\Entities\LazaretFile $file) + protected function list_lazaret_file(LazaretFile $file) { $checks = array(); @@ -1264,7 +1268,7 @@ class API_V1_adapter extends API_V1_Abstract */ protected function list_baskets($usr_id) { - $repo = $this->app['EM']->getRepository('\Entities\Basket'); + $repo = $this->app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\Basket'); /* @var $repo \Repositories\BasketRepository */ $baskets = $repo->findActiveByUser($this->app['authentication']->getUser()); @@ -1293,7 +1297,7 @@ class API_V1_adapter extends API_V1_Abstract throw new API_V1_exception_badrequest('Missing basket name parameter'); } - $Basket = new \Entities\Basket(); + $Basket = new Basket(); $Basket->setOwner($this->app['authentication']->getUser()); $Basket->setName($name); @@ -1314,7 +1318,7 @@ class API_V1_adapter extends API_V1_Abstract */ public function delete_basket(Request $request, $basket_id) { - $repository = $this->app['EM']->getRepository('\Entities\Basket'); + $repository = $this->app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\Basket'); /* @var $repository \Repositories\BasketRepository */ @@ -1336,7 +1340,7 @@ class API_V1_adapter extends API_V1_Abstract { $result = new API_V1_result($this->app, $request, $this); - $repository = $this->app['EM']->getRepository('\Entities\Basket'); + $repository = $this->app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\Basket'); /* @var $repository \Repositories\BasketRepository */ @@ -1355,10 +1359,10 @@ class API_V1_adapter extends API_V1_Abstract /** * Retrieve elements of one basket * - * @param \Entities\Basket $Basket + * @param Basket $Basket * @return type */ - protected function list_basket_content(\Entities\Basket $Basket) + protected function list_basket_content(Basket $Basket) { $ret = array(); @@ -1372,10 +1376,10 @@ class API_V1_adapter extends API_V1_Abstract /** * Retrieve detailled informations about a basket element * - * @param \Entities\BasketElement $basket_element + * @param BasketElement $basket_element * @return type */ - protected function list_basket_element(\Entities\BasketElement $basket_element) + protected function list_basket_element(BasketElement $basket_element) { $ret = array( 'basket_element_id' => $basket_element->getId(), @@ -1392,7 +1396,7 @@ class API_V1_adapter extends API_V1_Abstract foreach ($basket_element->getValidationDatas() as $validation_datas) { $participant = $validation_datas->getParticipant(); $user = $participant->getUser($this->app); - /* @var $validation_datas Entities\ValidationData */ + /* @var $validation_datas Alchemy\Phrasea\Model\Entities\ValidationData */ $choices[] = array( 'validation_user' => array( 'usr_id' => $user->get_id(), @@ -1435,7 +1439,7 @@ class API_V1_adapter extends API_V1_Abstract $name = $request->get('name'); - $repository = $this->app['EM']->getRepository('\Entities\Basket'); + $repository = $this->app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\Basket'); /* @var $repository \Repositories\BasketRepository */ @@ -1463,7 +1467,7 @@ class API_V1_adapter extends API_V1_Abstract $desc = $request->get('description'); - $repository = $this->app['EM']->getRepository('\Entities\Basket'); + $repository = $this->app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\Basket'); /* @var $repository \Repositories\BasketRepository */ @@ -1489,7 +1493,7 @@ class API_V1_adapter extends API_V1_Abstract { $result = new API_V1_result($this->app, $request, $this); - $coll = $this->app['EM']->getRepository('Entities\Feed')->getAllForUser($user); + $coll = $this->app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\Feed')->getAllForUser($user); $datas = array(); foreach ($coll as $feed) { @@ -1522,7 +1526,7 @@ class API_V1_adapter extends API_V1_Abstract { $result = new API_V1_result($this->app, $request, $this); - $feed = $this->app['EM']->getRepository('Entities\Feed')->find($publication_id); + $feed = $this->app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\Feed')->find($publication_id); if (!$feed->isAccessible($user, $this->app)) { return $result->set_datas(array()); } @@ -1570,7 +1574,7 @@ class API_V1_adapter extends API_V1_Abstract { $result = new API_V1_result($this->app, $request, $this); - $entry = $this->app['EM']->getRepository('Entities\FeedEntry')->find($entry_id); + $entry = $this->app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\FeedEntry')->find($entry_id); $collection = $entry->getFeed()->getCollection($this->app); @@ -1814,10 +1818,10 @@ class API_V1_adapter extends API_V1_Abstract /** * Retirve information about one basket * - * @param \Entities\Basket $basket + * @param Basket $basket * @return array */ - public function list_basket(\Entities\Basket $basket) + public function list_basket(Basket $basket) { $ret = array( 'basket_id' => $basket->getId(), @@ -1834,7 +1838,7 @@ class API_V1_adapter extends API_V1_Abstract $users = array(); foreach ($basket->getValidation()->getParticipants() as $participant) { - /* @var $participant \Entities\ValidationParticipant */ + /* @var $participant ValidationParticipant */ $user = $participant->getUser($this->app); $users[] = array( diff --git a/lib/classes/Session/Logger.php b/lib/classes/Session/Logger.php index dc1f06a1d2..b0c7a189dd 100644 --- a/lib/classes/Session/Logger.php +++ b/lib/classes/Session/Logger.php @@ -11,6 +11,7 @@ use Alchemy\Phrasea\Application; use Alchemy\Phrasea\Exception\SessionNotFound; +use Alchemy\Phrasea\Model\Entities\SessionModule; class Session_Logger { @@ -187,14 +188,14 @@ class Session_Logger return; } - $session = $app['EM']->find('Entities\Session', $app['session']->get('session_id')); + $session = $app['EM']->find('Alchemy\Phrasea\Model\Entities\Session', $app['session']->get('session_id')); if (!$session) { throw new SessionNotFound('No session found'); } if (!$session->hasModuleId($appId)) { - $module = new \Entities\SessionModule(); + $module = new SessionModule(); $module->setModuleId($appId); $module->setSession($session); diff --git a/lib/classes/User/Adapter.php b/lib/classes/User/Adapter.php index ad8c760978..8a161057ba 100644 --- a/lib/classes/User/Adapter.php +++ b/lib/classes/User/Adapter.php @@ -12,7 +12,7 @@ use Alchemy\Phrasea\Application; use Alchemy\Geonames\Exception\ExceptionInterface as GeonamesExceptionInterface; -use Entities\FtpCredential; +use Alchemy\Phrasea\Model\Entities\FtpCredential; /** * @@ -708,7 +708,7 @@ class User_Adapter implements User_Interface, cache_cacheableInterface public function getFtpCredential() { if (null === $this->ftpCredential) { - $this->ftpCredential = $this->app['EM']->getRepository('Entities\FtpCredential')->findOneBy(array( + $this->ftpCredential = $this->app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\FtpCredential')->findOneBy(array( 'usrId' => $this->get_id() )); @@ -763,17 +763,17 @@ class User_Adapter implements User_Interface, cache_cacheableInterface */ public function delete() { - $repo = $this->app['EM']->getRepository('Entities\UsrAuthProvider'); + $repo = $this->app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\UsrAuthProvider'); foreach ($repo->findByUser($this) as $provider) { $this->app['EM']->remove($provider); } - $repo = $this->app['EM']->getRepository('Entities\FtpExport'); + $repo = $this->app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\FtpExport'); foreach ($repo->findByUser($this) as $export) { $this->app['EM']->remove($export); } - $repo = $this->app['EM']->getRepository('Entities\Order'); + $repo = $this->app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\Order'); foreach ($repo->findByUser($this) as $order) { $this->app['EM']->remove($order); } diff --git a/lib/classes/databox.php b/lib/classes/databox.php index 12d3c3a246..f1956dcaf3 100644 --- a/lib/classes/databox.php +++ b/lib/classes/databox.php @@ -452,11 +452,11 @@ class databox extends base $n+=50; } - foreach ($this->app['EM']->getRepository('\Entities\StoryWZ')->findByDatabox($this->app, $this) as $story) { + foreach ($this->app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\StoryWZ')->findByDatabox($this->app, $this) as $story) { $this->app['EM']->remove($story); } - foreach ($this->app['EM']->getRepository('\Entities\BasketElement')->findElementsByDatabox($this) as $element) { + foreach ($this->app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\BasketElement')->findElementsByDatabox($this) as $element) { $this->app['EM']->remove($element); } diff --git a/lib/classes/eventsmanager/notify/feed.php b/lib/classes/eventsmanager/notify/feed.php index 50140861bf..5d1205e4fb 100644 --- a/lib/classes/eventsmanager/notify/feed.php +++ b/lib/classes/eventsmanager/notify/feed.php @@ -139,7 +139,7 @@ class eventsmanager_notify_feed extends eventsmanager_notifyAbstract { $sx = simplexml_load_string($datas); - $entry = $this->app['EM']->getRepository('Entities\FeedEntry')->find((int) $sx->entry_id); + $entry = $this->app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\FeedEntry')->find((int) $sx->entry_id); if (null === $entry) { return array(); diff --git a/lib/classes/eventsmanager/notify/order.php b/lib/classes/eventsmanager/notify/order.php index 6912c421a3..f4e5f88aa8 100644 --- a/lib/classes/eventsmanager/notify/order.php +++ b/lib/classes/eventsmanager/notify/order.php @@ -55,7 +55,7 @@ class eventsmanager_notify_order extends eventsmanager_notifyAbstract $users = array(); try { - $repository = $this->app['EM']->getRepository('Entities\OrderElement'); + $repository = $this->app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\OrderElement'); $results = $repository->findBy(array('orderId' => $order_id)); diff --git a/lib/classes/eventsmanager/notify/orderdeliver.php b/lib/classes/eventsmanager/notify/orderdeliver.php index b5a64f198b..5ac5833779 100644 --- a/lib/classes/eventsmanager/notify/orderdeliver.php +++ b/lib/classes/eventsmanager/notify/orderdeliver.php @@ -104,7 +104,7 @@ class eventsmanager_notify_orderdeliver extends eventsmanager_notifyAbstract $receiver = Receiver::fromUser($user_to); $emitter = Emitter::fromUser($user_from); - $repository = $this->app['EM']->getRepository('\Entities\Basket'); + $repository = $this->app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\Basket'); $basket = $repository->find($params['ssel_id']); $readyToSend = true; @@ -159,7 +159,7 @@ class eventsmanager_notify_orderdeliver extends eventsmanager_notifyAbstract $sender = User_Adapter::getInstance($from, $this->app)->get_display_name(); try { - $repository = $this->app['EM']->getRepository('\Entities\Basket'); + $repository = $this->app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\Basket'); $basket = $repository->findUserBasket($this->app, $ssel_id, $this->app['authentication']->getUser(), false); } catch (Exception $e) { diff --git a/lib/classes/eventsmanager/notify/push.php b/lib/classes/eventsmanager/notify/push.php index 742e43bccb..cfad060a02 100644 --- a/lib/classes/eventsmanager/notify/push.php +++ b/lib/classes/eventsmanager/notify/push.php @@ -86,7 +86,7 @@ class eventsmanager_notify_push extends eventsmanager_notifyAbstract $readyToSend = false; try { - $repository = $this->app['EM']->getRepository('\Entities\Basket'); + $repository = $this->app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\Basket'); $basket = $repository->find($params['ssel_id']); $user_from = User_Adapter::getInstance($params['from'], $this->app); diff --git a/lib/classes/eventsmanager/notify/uploadquarantine.php b/lib/classes/eventsmanager/notify/uploadquarantine.php index ef0d8ba346..d1a098e3f6 100644 --- a/lib/classes/eventsmanager/notify/uploadquarantine.php +++ b/lib/classes/eventsmanager/notify/uploadquarantine.php @@ -9,6 +9,8 @@ * file that was distributed with this source code. */ +use Alchemy\Phrasea\Model\Entities\LazaretCheck; +use Alchemy\Phrasea\Model\Entities\LazaretFile; use Alchemy\Phrasea\Notification\Receiver; use Alchemy\Phrasea\Notification\Mail\MailInfoRecordQuarantined; @@ -43,8 +45,8 @@ class eventsmanager_notify_uploadquarantine extends eventsmanager_notifyAbstract */ public function fire($event, $params, &$object) { - if (isset($params['lazaret_file']) && $params['lazaret_file'] instanceof \Entities\LazaretFile) { - /* @var $lazaretFile \Entities\LazaretFile */ + if (isset($params['lazaret_file']) && $params['lazaret_file'] instanceof LazaretFile) { + /* @var $lazaretFile LazaretFile */ $lazaretFile = $params['lazaret_file']; $domXML = new DOMDocument('1.0', 'UTF-8'); @@ -62,7 +64,7 @@ class eventsmanager_notify_uploadquarantine extends eventsmanager_notifyAbstract $reasons = $domXML->createElement('reasons'); foreach ($lazaretFile->getChecks() as $check) { - /* @var $check \Entities\LazaretCheck */ + /* @var $check LazaretCheck */ $reason = $domXML->createElement('checkClassName'); $reason->appendChild($domXML->createTextNode($check->getCheckClassname())); $reasons->appendChild($reason); diff --git a/lib/classes/eventsmanager/notify/validate.php b/lib/classes/eventsmanager/notify/validate.php index c14f4d74b3..7a8d46d8ed 100644 --- a/lib/classes/eventsmanager/notify/validate.php +++ b/lib/classes/eventsmanager/notify/validate.php @@ -97,7 +97,7 @@ class eventsmanager_notify_validate extends eventsmanager_notifyAbstract $user_to = User_Adapter::getInstance($params['to'], $this->app); $basket = $this->app['EM'] - ->getRepository('\Entities\Basket') + ->getRepository('Alchemy\Phrasea\Model\Entities\Basket') ->find($params['ssel_id']); $title = $basket->getName(); @@ -146,7 +146,7 @@ class eventsmanager_notify_validate extends eventsmanager_notifyAbstract $sender = User_Adapter::getInstance($from, $this->app)->get_display_name(); try { - $repository = $this->app['EM']->getRepository('\Entities\Basket'); + $repository = $this->app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\Basket'); $basket = $repository->findUserBasket($this->app, $ssel_id, $this->app['authentication']->getUser(), false); diff --git a/lib/classes/eventsmanager/notify/validationdone.php b/lib/classes/eventsmanager/notify/validationdone.php index f4096351f4..1118328c79 100644 --- a/lib/classes/eventsmanager/notify/validationdone.php +++ b/lib/classes/eventsmanager/notify/validationdone.php @@ -92,7 +92,7 @@ class eventsmanager_notify_validationdone extends eventsmanager_notifyAbstract $user_to = User_Adapter::getInstance($params['to'], $this->app); $basket = $this->app['EM'] - ->getRepository('\Entities\Basket') + ->getRepository('Alchemy\Phrasea\Model\Entities\Basket') ->find($params['ssel_id']); $title = $basket->getName(); @@ -140,7 +140,7 @@ class eventsmanager_notify_validationdone extends eventsmanager_notifyAbstract $sender = $registered_user->get_display_name(); try { - $repository = $this->app['EM']->getRepository('\Entities\Basket'); + $repository = $this->app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\Basket'); $basket = $repository->findUserBasket($this->app, $ssel_id, $this->app['authentication']->getUser(), false); } catch (Exception $e) { diff --git a/lib/classes/eventsmanager/notify/validationreminder.php b/lib/classes/eventsmanager/notify/validationreminder.php index 3f3572be7b..56f6908c98 100644 --- a/lib/classes/eventsmanager/notify/validationreminder.php +++ b/lib/classes/eventsmanager/notify/validationreminder.php @@ -98,7 +98,7 @@ class eventsmanager_notify_validationreminder extends eventsmanager_notifyAbstra $readyToSend = false; try { $basket = $this->app['EM'] - ->getRepository('\Entities\Basket') + ->getRepository('Alchemy\Phrasea\Model\Entities\Basket') ->find($params['ssel_id']); $title = $basket->getName(); @@ -145,7 +145,7 @@ class eventsmanager_notify_validationreminder extends eventsmanager_notifyAbstra $sender = User_Adapter::getInstance($from, $this->app)->get_display_name(); try { - $repository = $this->app['EM']->getRepository('\Entities\Basket'); + $repository = $this->app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\Basket'); $basket = $repository->findUserBasket($this->app, $ssel_id, $this->app['authentication']->getUser(), false); diff --git a/lib/classes/patch/320f.php b/lib/classes/patch/320f.php index 70cb23ae0c..831a76e92d 100644 --- a/lib/classes/patch/320f.php +++ b/lib/classes/patch/320f.php @@ -10,10 +10,10 @@ */ use Alchemy\Phrasea\Application; -use Entities\Feed; -use Entities\FeedEntry; -use Entities\FeedItem; -use Entities\FeedPublisher; +use Alchemy\Phrasea\Model\Entities\Feed; +use Alchemy\Phrasea\Model\Entities\FeedEntry; +use Alchemy\Phrasea\Model\Entities\FeedItem; +use Alchemy\Phrasea\Model\Entities\FeedPublisher; use Gedmo\Timestampable\TimestampableListener; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; diff --git a/lib/classes/patch/361.php b/lib/classes/patch/361.php index 16257dc120..970d3c0e5c 100644 --- a/lib/classes/patch/361.php +++ b/lib/classes/patch/361.php @@ -87,7 +87,7 @@ class patch_361 implements patchInterface } } - $dql = "SELECT b FROM Entities\Basket b WHERE b.description != ''"; + $dql = "SELECT b FROM Alchemy\Phrasea\Model\Entities\Basket b WHERE b.description != ''"; $n = 0; $perPage = 100; diff --git a/lib/classes/patch/370a7.php b/lib/classes/patch/370a7.php index 1c37f52ba6..1ac0657b94 100644 --- a/lib/classes/patch/370a7.php +++ b/lib/classes/patch/370a7.php @@ -10,6 +10,8 @@ */ use Alchemy\Phrasea\Application; +use Alchemy\Phrasea\Model\Entities\LazaretFile; +use Alchemy\Phrasea\Model\Entities\LazaretSession; use MediaAlchemyst\Exception\ExceptionInterface as MediaAlchemystException; use MediaAlchemyst\Specification\Image as ImageSpec; @@ -60,7 +62,7 @@ class patch_370a7 implements patchInterface $conn = $appbox->get_connection(); try { - //get all old lazaret file & transform them to \Entities\LazaretFile object + //get all old lazaret file & transform them to LazaretFile object $sql = 'SELECT * FROM lazaret'; $stmt = $conn->prepare($sql); $stmt->execute(); @@ -76,10 +78,10 @@ class patch_370a7 implements patchInterface //order matters for foreign keys constraints //truncate all altered tables - $this->truncateTable($app['EM'], 'Entities\\LazaretAttribute'); - $this->truncateTable($app['EM'], 'Entities\\LazaretCheck'); - $this->truncateTable($app['EM'], 'Entities\\LazaretFile'); - $this->truncateTable($app['EM'], 'Entities\\LazaretSession'); + $this->truncateTable($app['EM'], 'Alchemy\\Phrasea\\Model\\Entities\\LazaretAttribute'); + $this->truncateTable($app['EM'], 'Alchemy\\Phrasea\\Model\\Entities\\LazaretCheck'); + $this->truncateTable($app['EM'], 'Alchemy\\Phrasea\\Model\\Entities\\LazaretFile'); + $this->truncateTable($app['EM'], 'Alchemy\\Phrasea\\Model\\Entities\\LazaretSession'); $i = 0; @@ -108,10 +110,10 @@ class patch_370a7 implements patchInterface $borderFile = new \Alchemy\Phrasea\Border\File($app, $media, $collection); - $lazaretSession = new \Entities\LazaretSession(); + $lazaretSession = new LazaretSession(); $lazaretSession->setUsrId($row['usr_id']); - $lazaretFile = new \Entities\LazaretFile(); + $lazaretFile = new LazaretFile(); $lazaretFile->setBaseId($row['base_id']); if (null === $row['uuid']) { diff --git a/lib/classes/patch/3805.php b/lib/classes/patch/3805.php index 2a3d9daf49..38e6dcf4e9 100644 --- a/lib/classes/patch/3805.php +++ b/lib/classes/patch/3805.php @@ -10,7 +10,7 @@ */ use Alchemy\Phrasea\Application; -use Entities\AuthFailure; +use Alchemy\Phrasea\Model\Entities\AuthFailure; class patch_3805 implements patchInterface { diff --git a/lib/classes/patch/3811.php b/lib/classes/patch/3811.php index bf6166a4b4..2800817b90 100644 --- a/lib/classes/patch/3811.php +++ b/lib/classes/patch/3811.php @@ -10,8 +10,8 @@ */ use Alchemy\Phrasea\Application; -use Entities\Session; -use Entities\SessionModule; +use Alchemy\Phrasea\Model\Entities\Session; +use Alchemy\Phrasea\Model\Entities\SessionModule; class patch_3811 implements patchInterface { diff --git a/lib/classes/patch/390.php b/lib/classes/patch/390.php index 4e7b62ef44..ff204cecf1 100644 --- a/lib/classes/patch/390.php +++ b/lib/classes/patch/390.php @@ -10,7 +10,7 @@ */ use Alchemy\Phrasea\Application; -use Entities\FtpCredential; +use Alchemy\Phrasea\Model\Entities\FtpCredential; class patch_390 implements patchInterface { diff --git a/lib/classes/patch/3902.php b/lib/classes/patch/3902.php index 09f12eada2..89444f0e20 100644 --- a/lib/classes/patch/3902.php +++ b/lib/classes/patch/3902.php @@ -11,7 +11,7 @@ use Alchemy\Phrasea\Application; use Doctrine\ORM\EntityManager; -use Entities\User; +use Alchemy\Phrasea\Model\Entities\User; use Gedmo\Timestampable\TimestampableListener; class patch_3902 implements patchInterface @@ -175,7 +175,7 @@ class patch_3902 implements patchInterface $n = 0; - $repository = $em->getRepository('Entities\User'); + $repository = $em->getRepository('Alchemy\Phrasea\Model\Entities\User'); foreach ($rows as $row) { $user = $repository->findOneByLogin($row['usr_login']); diff --git a/lib/classes/patch/3903.php b/lib/classes/patch/3903.php index 4ab076d126..b868084234 100644 --- a/lib/classes/patch/3903.php +++ b/lib/classes/patch/3903.php @@ -10,7 +10,7 @@ */ use Alchemy\Phrasea\Application; -use Entities\UserQuery; +use Alchemy\Phrasea\Model\Entities\UserQuery; class patch_3903 implements patchInterface { diff --git a/lib/classes/patch/3904.php b/lib/classes/patch/3904.php index 0723e7ed58..2f0d90820f 100644 --- a/lib/classes/patch/3904.php +++ b/lib/classes/patch/3904.php @@ -10,7 +10,7 @@ */ use Alchemy\Phrasea\Application; -use Entities\UserSetting; +use Alchemy\Phrasea\Model\Entities\UserSetting; class patch_3904 implements patchInterface { diff --git a/lib/classes/patch/3905.php b/lib/classes/patch/3905.php index f1747464fe..82cd3cec02 100644 --- a/lib/classes/patch/3905.php +++ b/lib/classes/patch/3905.php @@ -10,7 +10,7 @@ */ use Alchemy\Phrasea\Application; -use Entities\UserNotificationSetting; +use Alchemy\Phrasea\Model\Entities\UserNotificationSetting; class patch_3905 implements patchInterface { diff --git a/lib/classes/patch/3906.php b/lib/classes/patch/3906.php index 3c6324b982..a23f593a57 100644 --- a/lib/classes/patch/3906.php +++ b/lib/classes/patch/3906.php @@ -10,8 +10,8 @@ */ use Alchemy\Phrasea\Application; -use Entities\FtpExport; -use Entities\FtpExportElement; +use Alchemy\Phrasea\Model\Entities\FtpExport; +use Alchemy\Phrasea\Model\Entities\FtpExportElement; use Gedmo\Timestampable\TimestampableListener; class patch_3906 implements patchInterface diff --git a/lib/classes/patch/3907.php b/lib/classes/patch/3907.php index ca836f328e..0755d1e2cb 100644 --- a/lib/classes/patch/3907.php +++ b/lib/classes/patch/3907.php @@ -10,12 +10,12 @@ */ use Alchemy\Phrasea\Application; -use Entities\AggregateToken; -use Entities\Feed; -use Entities\FeedEntry; -use Entities\FeedItem; -use Entities\FeedPublisher; -use Entities\FeedToken; +use Alchemy\Phrasea\Model\Entities\AggregateToken; +use Alchemy\Phrasea\Model\Entities\Feed; +use Alchemy\Phrasea\Model\Entities\FeedEntry; +use Alchemy\Phrasea\Model\Entities\FeedItem; +use Alchemy\Phrasea\Model\Entities\FeedPublisher; +use Alchemy\Phrasea\Model\Entities\FeedToken; class patch_3907 implements patchInterface { diff --git a/lib/classes/queries.php b/lib/classes/queries.php index 60ea1527ab..d33fba4f75 100644 --- a/lib/classes/queries.php +++ b/lib/classes/queries.php @@ -188,7 +188,7 @@ class queries $history = '
- {% if list.getOwner(app['authentication'].getUser(), app).getRole() >= constant('\\Entities\\UsrListOwner::ROLE_EDITOR') %} + {% if list.getOwner(app['authentication'].getUser(), app).getRole() >= constant('Alchemy\\Phrasea\\Model\\Entities\\UsrListOwner::ROLE_EDITOR') %} |
- {% if list.getOwner(app['authentication'].getUser(), app).getRole() == constant('\\Entities\\UsrListOwner::ROLE_ADMIN') %}
+ {% if list.getOwner(app['authentication'].getUser(), app).getRole() == constant('Alchemy\\Phrasea\\Model\\Entities\\UsrListOwner::ROLE_ADMIN') %}
![]() |
- {% if list.getOwner(app['authentication'].getUser(), app).getRole() >= constant('\\Entities\\UsrListOwner::ROLE_ADMIN') %}
+ {% if list.getOwner(app['authentication'].getUser(), app).getRole() >= constant('Alchemy\\Phrasea\\Model\\Entities\\UsrListOwner::ROLE_ADMIN') %}