diff --git a/lib/Doctrine/Entities/Basket.php b/lib/Doctrine/Entities/Basket.php index c6895b428b..d5ffde4ea5 100644 --- a/lib/Doctrine/Entities/Basket.php +++ b/lib/Doctrine/Entities/Basket.php @@ -23,50 +23,51 @@ require_once __DIR__ . '/../../classes/User/Adapter.class.php'; class Basket { + const CACHE_SUFFIX = '_basket'; /** * @var integer $id */ - private $id; + protected $id; /** * @var string $name */ - private $name; + protected $name; /** * @var text $description */ - private $description; + protected $description; /** * @var integer $usr_id */ - private $usr_id; + protected $usr_id; /** * @var integer $pusher_id */ - private $pusher_id; + protected $pusher_id; /** * @var boolean $archived */ - private $archived = false; + protected $archived = false; /** * @var datetime $created */ - private $created; + protected $created; /** * @var datetime $updated */ - private $updated; + protected $updated; /** * @var Entities\BasketElement */ - private $elements; + protected $elements; public function __construct() { @@ -272,7 +273,7 @@ class Basket /** * @var Entities\ValidationSession */ - private $validation; + protected $validation; /** * Set validation @@ -297,7 +298,7 @@ class Basket /** * @var boolean $is_read */ - private $is_read = true; + protected $is_read = true; /** * Set is_read diff --git a/lib/Doctrine/Entities/BasketElement.php b/lib/Doctrine/Entities/BasketElement.php index 89b3f24a23..827cf3f1b8 100644 --- a/lib/Doctrine/Entities/BasketElement.php +++ b/lib/Doctrine/Entities/BasketElement.php @@ -22,41 +22,42 @@ require_once __DIR__ . '/../../classes/record/adapter.class.php'; */ class BasketElement { - + + const CACHE_SUFFIX = "_basketElement"; /** * @var integer $id */ - private $id; + protected $id; /** * @var integer $record_id */ - private $record_id; + protected $record_id; /** * @var integer $sbas_id */ - private $sbas_id; + protected $sbas_id; /** * @var integer $ord */ - private $ord; + protected $ord; /** * @var datetime $created */ - private $created; + protected $created; /** * @var datetime $updated */ - private $updated; + protected $updated; /** * @var Entities\Basket */ - private $basket; + protected $basket; /** * Get id @@ -207,7 +208,7 @@ class BasketElement /** * @var Entities\ValidationData */ - private $validation_datas; + protected $validation_datas; public function __construct() { @@ -243,14 +244,13 @@ class BasketElement { foreach ($this->validation_datas as $validationData) { - /* @var $validationData \Entities\ValidationData */ if ($validationData->getParticipant()->getUser()->get_id() == $user->get_id()) { return $validationData; } } - throw new \Exception('There is no such participant'); + throw new \Exception('There is no such participant '. $user->get_email()); } } diff --git a/lib/Doctrine/Entities/StoryWZ.php b/lib/Doctrine/Entities/StoryWZ.php index 68c5ad5b30..4c6623d287 100644 --- a/lib/Doctrine/Entities/StoryWZ.php +++ b/lib/Doctrine/Entities/StoryWZ.php @@ -28,27 +28,27 @@ class StoryWZ /** * @var integer $id */ - private $id; + protected $id; /** * @var integer $sbas_id */ - private $sbas_id; + protected $sbas_id; /** * @var integer $record_id */ - private $record_id; + protected $record_id; /** * @var integer $usr_id */ - private $usr_id; + protected $usr_id; /** * @var datetime $created */ - private $created; + protected $created; /** * Get id diff --git a/lib/Doctrine/Entities/UsrList.php b/lib/Doctrine/Entities/UsrList.php index 170a481635..9c34627834 100644 --- a/lib/Doctrine/Entities/UsrList.php +++ b/lib/Doctrine/Entities/UsrList.php @@ -22,32 +22,32 @@ class UsrList /** * @var integer $id */ - private $id; + protected $id; /** * @var string $name */ - private $name; + protected $name; /** * @var datetime $created */ - private $created; + protected $created; /** * @var datetime $updated */ - private $updated; + protected $updated; /** * @var Entities\UsrListOwner */ - private $owners; + protected $owners; /** * @var \Doctrine\Common\Collections\Collection */ - private $entries; + protected $entries; public function __construct() { diff --git a/lib/Doctrine/Entities/UsrListEntry.php b/lib/Doctrine/Entities/UsrListEntry.php index 89f50c80b2..ae4c917160 100644 --- a/lib/Doctrine/Entities/UsrListEntry.php +++ b/lib/Doctrine/Entities/UsrListEntry.php @@ -22,27 +22,27 @@ class UsrListEntry /** * @var integer $id */ - private $id; + protected $id; /** * @var integer $usr_id */ - private $usr_id; + protected $usr_id; /** * @var datetime $created */ - private $created; + protected $created; /** * @var datetime $updated */ - private $updated; + protected $updated; /** * @var Entities\UsrList */ - private $list; + protected $list; /** * Get id diff --git a/lib/Doctrine/Entities/UsrListOwner.php b/lib/Doctrine/Entities/UsrListOwner.php index 280b71e3a8..1fc63c7152 100644 --- a/lib/Doctrine/Entities/UsrListOwner.php +++ b/lib/Doctrine/Entities/UsrListOwner.php @@ -25,32 +25,32 @@ class UsrListOwner /** * @var integer $id */ - private $id; + protected $id; /** * @var integer $usr_id */ - private $usr_id; + protected $usr_id; /** * @var string $role */ - private $role; + protected $role; /** * @var datetime $created */ - private $created; + protected $created; /** * @var datetime $updated */ - private $updated; + protected $updated; /** * @var Entities\UsrList */ - private $list; + protected $list; /** * Get id diff --git a/lib/Doctrine/Entities/ValidationData.php b/lib/Doctrine/Entities/ValidationData.php index 6467314107..c787f71b6a 100644 --- a/lib/Doctrine/Entities/ValidationData.php +++ b/lib/Doctrine/Entities/ValidationData.php @@ -20,32 +20,32 @@ class ValidationData /** * @var integer $id */ - private $id; + protected $id; /** * @var boolean $agreement */ - private $agreement; + protected $agreement; /** * @var text $note */ - private $note; + protected $note; /** * @var datetime $updated */ - private $updated; + protected $updated; /** * @var Entities\ValidationParticipant */ - private $participant; + protected $participant; /** * @var Entities\BasketElement */ - private $basket_element; + protected $basket_element; /** diff --git a/lib/Doctrine/Entities/ValidationParticipant.php b/lib/Doctrine/Entities/ValidationParticipant.php index 24944fec08..a70d313cbe 100644 --- a/lib/Doctrine/Entities/ValidationParticipant.php +++ b/lib/Doctrine/Entities/ValidationParticipant.php @@ -23,47 +23,47 @@ class ValidationParticipant /** * @var integer $id */ - private $id; + protected $id; /** * @var integer $usr_id */ - private $usr_id; + protected $usr_id; /** * @var Entities\ValidationSession */ - private $session; + protected $session; /** * @var datetime $reminded */ - private $reminded = null; + protected $reminded = null; /** * @var Entities\ValidationData */ - private $datas; + protected $datas; /** * @var boolean $is_confirmed */ - private $is_confirmed = false; + protected $is_confirmed = false; /** * @var boolean $can_agree */ - private $can_agree = false; + protected $can_agree = false; /** * @var boolean $can_see_others */ - private $can_see_others = false; + protected $can_see_others = false; /** * @var boolean $is_aware */ - private $is_aware = false; + protected $is_aware = false; public function __construct() { diff --git a/lib/Doctrine/Entities/ValidationSession.php b/lib/Doctrine/Entities/ValidationSession.php index f6dd812af7..adb779ddfa 100644 --- a/lib/Doctrine/Entities/ValidationSession.php +++ b/lib/Doctrine/Entities/ValidationSession.php @@ -23,52 +23,52 @@ class ValidationSession /** * @var integer $id */ - private $id; + protected $id; /** * @var string $name */ - private $name; + protected $name; /** * @var text $description */ - private $description; + protected $description; /** * @var boolean $archived */ - private $archived; + protected $archived; /** * @var datetime $created */ - private $created; + protected $created; /** * @var datetime $updated */ - private $updated; + protected $updated; /** * @var datetime $expires */ - private $expires; + protected $expires; /** * @var datetime $reminded */ - private $reminded; + protected $reminded; /** * @var Entities\Basket */ - private $basket; + protected $basket; /** * @var Entities\ValidationParticipant */ - private $participants; + protected $participants; public function __construct() { @@ -280,18 +280,18 @@ class ValidationSession } } - throw new \Exception_NotFound('Particpant not found'); + throw new \Exception_NotFound('Particpant not found' . $user->get_email()); } /** * @var integer $initiator */ - private $initiator; + protected $initiator; /** * @var integer $initiator_id */ - private $initiator_id; + protected $initiator_id; /** * Set initiator_id