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)
{
/**
* 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",
+ * "format": "epub|mobi|pdf|json|xml|txt|csv",
* "category": "all|unread|starred|archive"
* })
+ *
+ * @return \Symfony\Component\HttpFoundation\Response
*/
public function downloadEntriesAction($format, $category)
{