change private properties to protected

This commit is contained in:
Nicolas Le Goff
2012-02-15 19:32:18 +01:00
parent d94ce73f5c
commit 9dc47ffe39
9 changed files with 73 additions and 72 deletions

View File

@@ -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

View File

@@ -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());
}
}

View File

@@ -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

View File

@@ -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()
{

View File

@@ -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

View File

@@ -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

View File

@@ -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;
/**

View File

@@ -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()
{

View File

@@ -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