public function __construct($projectModel, $id = '')
 {
     $this->id = new Id();
     $this->_projectModel = $projectModel;
     $databaseName = $projectModel->databaseName();
     parent::__construct(MessageModelMongoMapper::connect($databaseName), $id);
 }
 public function __construct($projectModel, $id = '')
 {
     $this->_projectModel = $projectModel;
     $this->id = new Id();
     $databaseName = $projectModel->databaseName();
     parent::__construct(self::mapper($databaseName), $id);
 }
 /**
  * @param ProjectModel $projectModel
  * @param string       $id
  */
 public function __construct($projectModel, $id = '')
 {
     $this->id = new Id();
     $this->itemKeys = new ArrayOf();
     $this->name = "";
     $databaseName = $projectModel->databaseName();
     parent::__construct(self::mapper($databaseName), $id);
 }
 public function __construct($projectModel, $id = '')
 {
     $this->id = new Id();
     $this->_projectModel = $projectModel;
     $this->isArchived = false;
     $databaseName = 'sf_jamaican_psalms';
     parent::__construct(TextModelMongoMapper_sf_v0_9_18::connect($databaseName), $id);
 }
 public function __construct($type, $userId, $projectId)
 {
     $this->id = new Id();
     $this->type = $type;
     $this->userRef = new IdReference($userId);
     $this->projectRef = new IdReference($projectId);
     parent::__construct(self::mapper(), '');
 }
 /**
  * @param ProjectModel $projectModel
  * @param string       $id
  */
 public function __construct($projectModel, $id = '')
 {
     $this->id = new Id();
     $this->content = '';
     $this->regarding = new SemDomTransFieldReference();
     $this->entryRef = new Id();
     $databaseName = $projectModel->databaseName();
     parent::__construct(self::mapper($databaseName), $id);
 }
 /**
  * @param \Api\Model\ProjectModel $projectModel
  * @param string               $id
  */
 public function __construct($projectModel, $id = '')
 {
     $this->items = new ArrayOf(function ($data) {
         return new LexiconOptionListItem();
     });
     $this->id = new Id();
     $this->canDelete = true;
     $databaseName = $projectModel->databaseName();
     parent::__construct(self::mapper($databaseName), $id);
 }
示例#8
0
 /**
  * @param string $databaseName
  * @param string $id
  */
 public function __construct($databaseName, $id = '')
 {
     $this->id = new Id();
     $this->userRef = new IdReference();
     $this->dateCreated = new \DateTime();
     $this->dateSent = new \DateTime();
     $this->provider = self::SMS_TWILIO;
     $this->state = self::SMS_NEW;
     parent::__construct(SmsMongoMapper::connect($databaseName), $id);
 }
 public function read($id)
 {
     parent::read($id);
     if (!$this->communicate_via) {
         $this->communicate_via = self::COMMUNICATE_VIA_EMAIL;
     }
     if (!$this->avatar_ref) {
         $default_avatar = "anonymoose.png";
         $this->avatar_ref = $default_avatar;
     }
 }
 /**
  * @param ProjectModel $projectModel
  * @param string       $id
  */
 public function __construct($projectModel, $id = '')
 {
     $this->id = new Id();
     $this->key = "";
     $this->name = new SemDomTransTranslatedForm();
     $this->description = new SemDomTransTranslatedForm();
     $this->searchKeys = new ArrayOf(function ($data) {
         return new SemDomTransTranslatedForm();
     });
     $this->questions = new ArrayOf(function ($data) {
         return new SemDomTransQuestion();
     });
     $databaseName = $projectModel->databaseName();
     parent::__construct(self::mapper($databaseName), $id);
 }
示例#11
0
 public function __construct($projectModel, $id = '')
 {
     $this->id = new Id();
     $this->workflowState = "open";
     // default workflow state
     $this->description = '';
     $this->title = '';
     $this->dateCreated = new \DateTime();
     $this->dateEdited = new \DateTime();
     $this->textRef = new IdReference();
     $this->answers = new MapOf(function () {
         return new AnswerModel();
     });
     $databaseName = $projectModel->databaseName();
     parent::__construct(QuestionModelMongoMapper::connect($databaseName), $id);
 }
示例#12
0
 /**
  *
  * @param ProjectModel $projectModel
  * @param string $id
  */
 public function __construct($projectModel, $id = '')
 {
     $this->id = new Id();
     $this->projectRef = new IdReference($projectModel->id->asString());
     $this->textRef = new IdReference();
     $this->questionRef = new IdReference();
     $this->userRef = new IdReference();
     $this->userRef2 = new IdReference();
     $this->entryRef = new IdReference();
     $this->action = $this::UNKNOWN;
     $this->date = new \DateTime();
     // set the timestamp to now
     $this->actionContent = new MapOf();
     // strings
     $this->addContent($this::PROJECT, $projectModel->projectName);
     $databaseName = $projectModel->databaseName();
     parent::__construct(ActivityModelMongoMapper::connect($databaseName), $id);
 }
 /**
  * @param ProjectModel $projectModel
  * @param string       $id
  */
 public function __construct($projectModel, $id = '')
 {
     $this->setReadOnlyProp('authorInfo');
     $this->setReadOnlyProp('replies');
     $this->setReadOnlyProp('score');
     $this->setReadOnlyProp('status');
     $this->setPrivateProp('isDeleted');
     $this->id = new Id();
     $this->entryRef = new IdReference();
     $this->isDeleted = false;
     $this->replies = new ArrayOf(function ($data) {
         return new LexCommentReply();
     });
     $this->status = self::STATUS_OPEN;
     $this->score = 0;
     $this->authorInfo = new AuthorInfo();
     $this->regarding = new LexCommentFieldReference();
     $databaseName = $projectModel->databaseName();
     parent::__construct(self::mapper($databaseName), $id);
 }
 public function __construct($id = null)
 {
     $this->users = array();
     parent::__construct(CommunityModelMongoMapper::instance(), $id);
 }
示例#15
0
 /**
  * Reads the model from the mongo collection
  * Ensures that the required pick lists exist even if not present in the database
  * @param string $id
  * @see MapperModel::read()
  */
 public function read($id)
 {
     $result = parent::read($id);
     $this->userProperties->ensurePickListsExist();
     return $result;
 }
示例#16
0
 /**
  * @param ProjectModel $projectModel
  * @param string $id
  */
 public function __construct($projectModel, $id = '')
 {
     $this->setPrivateProp('guid');
     $this->setPrivateProp('mercurialSha');
     $this->setReadOnlyProp('authorInfo');
     $this->initLazyProperties(['lexeme', 'senses', 'authorInfo', 'citationForm', 'customFields', 'entryBibliography', 'entryRestrictions', 'environments', 'etymology', 'etymologyGloss', 'etymologyComment', 'etymologySource', 'literalMeaning', 'location', 'morphologyType', 'note', 'morphType', 'pronunciation', 'cvPattern', 'tone', 'summaryDefinition'], false);
     $this->isDeleted = false;
     $this->id = new Id();
     $databaseName = $projectModel->databaseName();
     parent::__construct(self::mapper($databaseName), $id);
 }
示例#17
0
 public function __construct($id = '')
 {
     $this->id = new Id();
     parent::__construct(PasswordModel_MongoMapper::instance(), $id);
 }
 public function __construct($id = '')
 {
     $this->id = new Id();
     parent::__construct(GlobalQuestionTemplateModelMongoMapper::instance(), $id);
 }