X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabag%2FCoreBundle%2FController%2FExportController.php;h=6191d5d7973241f4582007b1db063766856e9f9b;hb=336262e6ee9c57437793a06fb416206ac73a1702;hp=dd3cb7ca5d84cd5807b4f7953876c235bad5616d;hpb=add597bad95b30dbecab3aecc8362a1ccd427976;p=github%2Fwallabag%2Fwallabag.git diff --git a/src/Wallabag/CoreBundle/Controller/ExportController.php b/src/Wallabag/CoreBundle/Controller/ExportController.php index dd3cb7ca..6191d5d7 100644 --- a/src/Wallabag/CoreBundle/Controller/ExportController.php +++ b/src/Wallabag/CoreBundle/Controller/ExportController.php @@ -7,14 +7,24 @@ use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Wallabag\CoreBundle\Entity\Entry; +/** + * The try/catch can be removed once all formats will be implemented. + * Still need implementation: txt. + */ class ExportController extends Controller { /** * Gets one entry content. * - * @param Entry $entry + * @param Entry $entry + * @param string $format * - * @Route("/export/{id}.{format}", requirements={"id" = "\d+"}, name="export_entry") + * @Route("/export/{id}.{format}", name="export_entry", requirements={ + * "format": "epub|mobi|pdf|json|xml|txt|csv", + * "id": "\d+" + * }) + * + * @return \Symfony\Component\HttpFoundation\Response */ public function downloadEntryAction(Entry $entry, $format) { @@ -31,10 +41,15 @@ class ExportController extends Controller /** * Export all entries for current user. * + * @param string $format + * @param string $category + * * @Route("/export/{category}.{format}", name="export_entries", requirements={ - * "_format": "epub|mobi|pdf|json|xml|txt|csv", - * "category": "all|unread|starred|archive" + * "format": "epub|mobi|pdf|json|xml|txt|csv", + * "category": "all|unread|starred|archive|tag_entries|untagged" * }) + * + * @return \Symfony\Component\HttpFoundation\Response */ public function downloadEntriesAction($format, $category) {