From 644f2eedac8e912c3019366b29ecdfbd9a15c5d9 Mon Sep 17 00:00:00 2001 From: Oliver Gasser Date: Wed, 27 Aug 2014 13:20:12 +0200 Subject: [PATCH] Update database.rst After discussion with @Raydiation, changed entity properties to ```protected```. --- developer_manual/app/database.rst | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/developer_manual/app/database.rst b/developer_manual/app/database.rst index 91165b9e7..06f71bbc2 100644 --- a/developer_manual/app/database.rst +++ b/developer_manual/app/database.rst @@ -180,9 +180,9 @@ Entities are data objects that carry all the table's information for one row. Ev class Author extends Entity { - private $stars; - private $name; - private $phoneNumber; + protected $stars; + protected $name; + protected $phoneNumber; public function __construct() { // add types in constructor @@ -202,7 +202,7 @@ The following types can be added for a field: Accessing attributes -------------------- -Since all attributes should be private, getters and setters are automatically generated for you: +Since all attributes should be protected, getters and setters are automatically generated for you: .. code-block:: php @@ -214,9 +214,9 @@ Since all attributes should be private, getters and setters are automatically ge use \OCP\AppFramework\Db\Entity; class Author extends Entity { - private $stars; - private $name; - private $phoneNumber; + protected $stars; + protected $name; + protected $phoneNumber; } $author = new Author();