commit 94abaca063a1b8220752568db866e1ee27f12009
parent b9c0a89940ca08fff6ed13378e0fc86bcafe4742
Author: Felicitus <felicitus@felicitus.org>
Date: Wed, 27 May 2015 18:35:45 +0200
Added doctrine rest controller which can be called by the ExtJS stores. Supports filtering and sorting
Diffstat:
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/src/PartKeepr/DoctrineReflectionBundle/Controller/DoctrineRESTQueryController.php b/src/PartKeepr/DoctrineReflectionBundle/Controller/DoctrineRESTQueryController.php
@@ -134,7 +134,6 @@ class DoctrineRESTQueryController extends FOSRestController
* @param QueryBuilder $qb
* @param ParamFetcher $paramFetcher
*
- * @throws \Exception
*/
protected function applySorting (QueryBuilder $qb, ParamFetcher $paramFetcher) {
$sort = $paramFetcher->get("sort");
@@ -156,6 +155,7 @@ class DoctrineRESTQueryController extends FOSRestController
*
* @param $sort string A json string which includes the sorters
* @return Sorter[]
+ * @throws \Exception
*/
protected function parseSorters ($sort) {
$decodedJson = json_decode($sort, true);
@@ -164,9 +164,6 @@ class DoctrineRESTQueryController extends FOSRestController
throw new \Exception("sort parameter has an invalid format");
}
- /**
- * @var $sorters Sorter[]
- */
$sorters = array();
foreach ($decodedJson as $sorter) {
@@ -190,6 +187,7 @@ class DoctrineRESTQueryController extends FOSRestController
* @param $sort string A json string which includes the sorters
*
* @return Filter[]
+ * @throws \Exception
*/
protected function parseFilters($filter)
{
@@ -199,9 +197,6 @@ class DoctrineRESTQueryController extends FOSRestController
throw new \Exception("filter parameter has an invalid format");
}
- /**
- * @var $sorters Sorter[]
- */
$filters = array();
foreach ($decodedJson as $filter) {