aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Controller/WallabagRestController.php
diff options
context:
space:
mode:
authorJeremy <jeremy.benoist@gmail.com>2015-01-31 19:09:34 +0100
committerJeremy <jeremy.benoist@gmail.com>2015-01-31 19:12:49 +0100
commit7df80cb32ca9b7d0fe452320ddc3563a1e373e2f (patch)
treec07eb79213d471aa33c49ef4e5819e41cc12f242 /src/Wallabag/CoreBundle/Controller/WallabagRestController.php
parent1990517b2263a080946853ed697a6d687262ae80 (diff)
downloadwallabag-7df80cb32ca9b7d0fe452320ddc3563a1e373e2f.tar.gz
wallabag-7df80cb32ca9b7d0fe452320ddc3563a1e373e2f.tar.zst
wallabag-7df80cb32ca9b7d0fe452320ddc3563a1e373e2f.zip
CS
Diffstat (limited to 'src/Wallabag/CoreBundle/Controller/WallabagRestController.php')
-rw-r--r--src/Wallabag/CoreBundle/Controller/WallabagRestController.php30
1 files changed, 11 insertions, 19 deletions
diff --git a/src/Wallabag/CoreBundle/Controller/WallabagRestController.php b/src/Wallabag/CoreBundle/Controller/WallabagRestController.php
index 8e018e88..5668d934 100644
--- a/src/Wallabag/CoreBundle/Controller/WallabagRestController.php
+++ b/src/Wallabag/CoreBundle/Controller/WallabagRestController.php
@@ -3,7 +3,6 @@
3namespace Wallabag\CoreBundle\Controller; 3namespace Wallabag\CoreBundle\Controller;
4 4
5use Nelmio\ApiDocBundle\Annotation\ApiDoc; 5use Nelmio\ApiDocBundle\Annotation\ApiDoc;
6use FOS\RestBundle\Controller\Annotations\View;
7use Symfony\Bundle\FrameworkBundle\Controller\Controller; 6use Symfony\Bundle\FrameworkBundle\Controller\Controller;
8use Symfony\Component\HttpFoundation\Request; 7use Symfony\Component\HttpFoundation\Request;
9use Wallabag\CoreBundle\Entity\Entries; 8use Wallabag\CoreBundle\Entity\Entries;
@@ -12,7 +11,6 @@ use Wallabag\CoreBundle\Service\Extractor;
12 11
13class WallabagRestController extends Controller 12class WallabagRestController extends Controller
14{ 13{
15
16 /** 14 /**
17 * Retrieve all entries. It could be filtered by many options. 15 * Retrieve all entries. It could be filtered by many options.
18 * 16 *
@@ -44,14 +42,13 @@ class WallabagRestController extends Controller
44 $entries = $this 42 $entries = $this
45 ->getDoctrine() 43 ->getDoctrine()
46 ->getRepository('WallabagCoreBundle:Entries') 44 ->getRepository('WallabagCoreBundle:Entries')
47 ->findEntries(1, (int)$isArchived, (int)$isStarred, (int)$isDeleted, $sort, $order); 45 ->findEntries(1, (int) $isArchived, (int) $isStarred, (int) $isDeleted, $sort, $order);
48 46
49 if(!is_array($entries)) { 47 if (!is_array($entries)) {
50 throw $this->createNotFoundException(); 48 throw $this->createNotFoundException();
51 } 49 }
52 50
53 return $entries; 51 return $entries;
54
55 } 52 }
56 53
57 /** 54 /**
@@ -119,7 +116,6 @@ class WallabagRestController extends Controller
119 */ 116 */
120 public function patchEntriesAction(Entries $entry) 117 public function patchEntriesAction(Entries $entry)
121 { 118 {
122
123 } 119 }
124 120
125 /** 121 /**
@@ -133,10 +129,8 @@ class WallabagRestController extends Controller
133 */ 129 */
134 public function deleteEntriesAction(Entries $entry) 130 public function deleteEntriesAction(Entries $entry)
135 { 131 {
136
137 } 132 }
138 133
139
140 /** 134 /**
141 * Retrieve all tags for an entry 135 * Retrieve all tags for an entry
142 * 136 *
@@ -146,8 +140,8 @@ class WallabagRestController extends Controller
146 * } 140 * }
147 * ) 141 * )
148 */ 142 */
149 public function getEntriesTagsAction(Entries $entry) { 143 public function getEntriesTagsAction(Entries $entry)
150 144 {
151 } 145 }
152 146
153 /** 147 /**
@@ -162,8 +156,8 @@ class WallabagRestController extends Controller
162 * } 156 * }
163 * ) 157 * )
164 */ 158 */
165 public function postEntriesTagsAction(Entries $entry) { 159 public function postEntriesTagsAction(Entries $entry)
166 160 {
167 } 161 }
168 162
169 /** 163 /**
@@ -178,7 +172,6 @@ class WallabagRestController extends Controller
178 */ 172 */
179 public function deleteEntriesTagsAction(Entries $entry, Tags $tag) 173 public function deleteEntriesTagsAction(Entries $entry, Tags $tag)
180 { 174 {
181
182 } 175 }
183 176
184 /** 177 /**
@@ -187,8 +180,8 @@ class WallabagRestController extends Controller
187 * @ApiDoc( 180 * @ApiDoc(
188 * ) 181 * )
189 */ 182 */
190 public function getTagsAction() { 183 public function getTagsAction()
191 184 {
192 } 185 }
193 186
194 /** 187 /**
@@ -200,8 +193,8 @@ class WallabagRestController extends Controller
200 * } 193 * }
201 * ) 194 * )
202 */ 195 */
203 public function getTagAction(Tags $tag) { 196 public function getTagAction(Tags $tag)
204 197 {
205 } 198 }
206 199
207 /** 200 /**
@@ -215,6 +208,5 @@ class WallabagRestController extends Controller
215 */ 208 */
216 public function deleteTagAction(Tags $tag) 209 public function deleteTagAction(Tags $tag)
217 { 210 {
218
219 } 211 }
220} \ No newline at end of file 212}