diff options
author | Alessandro Cosentino <cosenal@gmail.com> | 2013-03-02 19:50:33 +0100 |
---|---|---|
committer | Alessandro Cosentino <cosenal@gmail.com> | 2013-03-02 19:50:33 +0100 |
commit | 4902253e9c8aac706091c6337391153b02923689 (patch) | |
tree | 3012e106d477a83e718ea42741c445895922df8e /external_api/folder.php | |
parent | 165540d34652fb895cb7f29c818fb3427bfba8c4 (diff) |
prototype for business layer for feed
Diffstat (limited to 'external_api/folder.php')
-rw-r--r-- | external_api/folder.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/external_api/folder.php b/external_api/folder.php index 5a3f70328..e2bbeb870 100644 --- a/external_api/folder.php +++ b/external_api/folder.php @@ -8,8 +8,13 @@ class API_Folder { public static function getAll() { $container = createDIContainer(); - $controller = $container['FolderBL']; - return \OC_OCS_Result($controller->getAll()); + $bl = $container['FolderBL']; + $folders = $bl->getAll(); + $serializedFolders = array(); + foreach ($folders as $folder) { + $serializedFolders[] = $folder->jsonSerialize(); + } + return new \OC_OCS_Result($serializedFolders); } } |