/**
  * @param string $userId
  * @param string $projectId
  * @param string $namespace - an arbitrary string representing a namespace for this vote model within the project
  */
 public function __construct($userId, $projectId, $namespace)
 {
     $this->votes = new ArrayOf(function () {
         return new GenericVote();
     });
     $this->namespace = $namespace;
     parent::__construct('vote', $userId, $projectId);
     $this->read();
 }
 /**
  * @param string $userId
  * @param string $projectId
  * @param string $questionId
  */
 public function __construct($userId, $projectId, $questionId)
 {
     $this->questionRef = new IdReference($questionId);
     $this->votes = new ArrayOf(function () {
         return new Vote();
     });
     parent::__construct('vote', $userId, $projectId);
     $this->read();
 }
 /**
  * @param string $itemType
  * @param string $userId
  * @param string $projectId
  * @param string $questionId
  */
 public function __construct($itemType, $userId, $projectId, $questionId = '')
 {
     $this->unread = new ArrayOf(function () {
         return new UnreadItem();
     });
     $this->questionRef = new IdReference($questionId);
     $this->_type = $itemType;
     parent::__construct('unread_item', $userId, $projectId);
     $this->read();
 }