X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabag%2FCoreBundle%2FCommand%2FExportCommand.php;h=0dacb73406f013b19433325c477b785ae8a41545;hb=f808b01692a835673f328d7221ba8c212caa9b61;hp=e4977e11e9dd290e574656361691ca7452fd35d0;hpb=25203e5081c8da21869db1d16610f83f888249b5;p=github%2Fwallabag%2Fwallabag.git diff --git a/src/Wallabag/CoreBundle/Command/ExportCommand.php b/src/Wallabag/CoreBundle/Command/ExportCommand.php index e4977e11..0dacb734 100644 --- a/src/Wallabag/CoreBundle/Command/ExportCommand.php +++ b/src/Wallabag/CoreBundle/Command/ExportCommand.php @@ -32,14 +32,14 @@ class ExportCommand extends ContainerAwareCommand protected function execute(InputInterface $input, OutputInterface $output) { try { - $user = $this->get('wallabag_user.user_repository')->findOneByUserName($input->getArgument('username')); + $user = $this->getContainer()->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->get('wallabag_core.entry_repository') + $entries = $this->getContainer()->get('wallabag_core.entry_repository') ->getBuilderForAllByUser($user->getId()) ->getQuery() ->getResult(); @@ -49,7 +49,7 @@ class ExportCommand extends ContainerAwareCommand $filePath = $input->getArgument('filepath'); if (!$filePath) { - $filePath = $this->getContainer()->getParameter('kernel.root_dir').'/../'.sprintf('%s-export.json', $user->getUsername()); + $filePath = $this->getContainer()->getParameter('kernel.root_dir') . '/../' . sprintf('%s-export.json', $user->getUsername()); } try {