diff options
Diffstat (limited to 'lib/Db/Folder.php')
-rw-r--r-- | lib/Db/Folder.php | 33 |
1 files changed, 20 insertions, 13 deletions
diff --git a/lib/Db/Folder.php b/lib/Db/Folder.php index 096e14323..4a6ec8ba1 100644 --- a/lib/Db/Folder.php +++ b/lib/Db/Folder.php @@ -5,10 +5,10 @@ * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * - * @author Alessandro Cosentino <cosenal@gmail.com> - * @author Bernhard Posselt <dev@bernhard-posselt.com> - * @copyright Alessandro Cosentino 2012 - * @copyright Bernhard Posselt 2012, 2014 + * @author Alessandro Cosentino <cosenal@gmail.com> + * @author Bernhard Posselt <dev@bernhard-posselt.com> + * @copyright 2012 Alessandro Cosentino + * @copyright 2012-2014 Bernhard Posselt */ namespace OCA\News\Db; @@ -30,9 +30,9 @@ use \OCP\AppFramework\Db\Entity; * @method void setDeletedAt(integer $value) * @method string getLastModified() * @method void setLastModified(string $value) - */ -class Folder extends Entity implements IAPI, \JsonSerializable { +class Folder extends Entity implements IAPI, \JsonSerializable +{ use EntityJSONSerializer; @@ -43,7 +43,8 @@ class Folder extends Entity implements IAPI, \JsonSerializable { protected $deletedAt; protected $lastModified; - public function __construct(){ + public function __construct() + { $this->addType('parentId', 'integer'); $this->addType('opened', 'boolean'); $this->addType('deletedAt', 'integer'); @@ -52,21 +53,27 @@ class Folder extends Entity implements IAPI, \JsonSerializable { /** * Turns entitie attributes into an array */ - public function jsonSerialize() { - return $this->serializeFields([ + public function jsonSerialize() + { + return $this->serializeFields( + [ 'id', 'parentId', 'name', 'userId', 'opened', 'deletedAt', - ]); + ] + ); } - public function toAPI() { - return $this->serializeFields([ + public function toAPI() + { + return $this->serializeFields( + [ 'id', 'name' - ]); + ] + ); } }
\ No newline at end of file |