From ee57fcbdb9b07190989df3e2f2ae4709480ad4a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucca=20Mendon=C3=A7a?= Date: Sun, 2 Jul 2017 16:09:52 -0300 Subject: [PATCH] Fix for the issue #56 --- src/Controllers/ContentController.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Controllers/ContentController.php b/src/Controllers/ContentController.php index 92a9887..0cb5182 100644 --- a/src/Controllers/ContentController.php +++ b/src/Controllers/ContentController.php @@ -44,30 +44,30 @@ public function connect(Application $app) */ $ctr = $app['controllers_factory']; - $ctr->get('/', 'root') + $ctr->get('/', [$this, 'root']) ->bind('jsonapi'); - $ctr->get('/menu', 'menu') + $ctr->get('/menu', [$this, 'menu']) ->bind('jsonapi.menu'); - $ctr->get('/taxonomy', 'taxonomy') + $ctr->get('/taxonomy', [$this, 'taxonomy']) ->bind('jsonapi.taxonomy'); - $ctr->get('/search', 'searchAll') + $ctr->get('/search', [$this, 'searchAll']) ->bind('jsonapi.searchAll') ->convert('parameters', 'jsonapi.converter:grabParameters'); - $ctr->get('/{contentType}/search', 'searchContent') + $ctr->get('/{contentType}/search', [$this, 'searchContent']) ->bind('jsonapi.searchContent') ->convert('parameters', 'jsonapi.converter:grabParameters'); - $ctr->get('/{contentType}/{slug}/{relatedContentType}', 'singleContent') + $ctr->get('/{contentType}/{slug}/{relatedContentType}', [$this, 'singleContent']) ->value('relatedContentType', null) ->assert('slug', '[a-zA-Z0-9_\-]+') ->bind('jsonapi.singleContent') ->convert('parameters', 'jsonapi.converter:grabParameters'); - $ctr->get('/{contentType}', 'listContent') + $ctr->get('/{contentType}', [$this, 'listContent']) ->bind('jsonapi.listContent') ->convert('parameters', 'jsonapi.converter:grabParameters');