X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabag%2FCoreBundle%2FCommand%2FExportCommand.php;h=e4977e11e9dd290e574656361691ca7452fd35d0;hb=25203e5081c8da21869db1d16610f83f888249b5;hp=e3d3b399506ff4e3986a84b044f032c882732783;hpb=f17b89fadce0a8c2280fbe1518d66f20dddce59d;p=github%2Fwallabag%2Fwallabag.git diff --git a/src/Wallabag/CoreBundle/Command/ExportCommand.php b/src/Wallabag/CoreBundle/Command/ExportCommand.php index e3d3b399..e4977e11 100644 --- a/src/Wallabag/CoreBundle/Command/ExportCommand.php +++ b/src/Wallabag/CoreBundle/Command/ExportCommand.php @@ -32,15 +32,14 @@ class ExportCommand extends ContainerAwareCommand protected function execute(InputInterface $input, OutputInterface $output) { try { - $user = $this->getDoctrine()->getRepository('WallabagUserBundle:User')->findOneByUserName($input->getArgument('username')); + $user = $this->get('wallabag_user.user_repository')->findOneByUserName($input->getArgument('username')); } catch (NoResultException $e) { $output->writeln(sprintf('User "%s" not found.', $input->getArgument('username'))); return 1; } - $entries = $this->getDoctrine() - ->getRepository('WallabagCoreBundle:Entry') + $entries = $this->get('wallabag_core.entry_repository') ->getBuilderForAllByUser($user->getId()) ->getQuery() ->getResult();