本文整理汇总了PHP中Gems_Loader::getRespondent方法的典型用法代码示例。如果您正苦于以下问题:PHP Gems_Loader::getRespondent方法的具体用法?PHP Gems_Loader::getRespondent怎么用?PHP Gems_Loader::getRespondent使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Gems_Loader
的用法示例。
在下文中一共展示了Gems_Loader::getRespondent方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: afterRegistry
public function afterRegistry()
{
if (!$this->respondent) {
$this->respondent = $this->loader->getRespondent($this->patientId, $this->organizationId);
}
parent::afterRegistry();
if ($this->respondent) {
$this->addTo($this->respondent->getEmailAddress(), $this->respondent->getName());
$this->setLanguage($this->respondent->getLanguage());
}
}
示例2: handleRespondentChanged
/**
*
* @param string $patientId
* @param int|\Gems_User_Organization $organization
* @param int $respondentId
* @return boolean True when something changed
*/
public function handleRespondentChanged($patientId, $organization, $respondentId = null)
{
if ($organization instanceof \Gems_User_Organization) {
$org = $organization;
$orgId = $organization->getId();
} else {
$org = $this->loader->getOrganization($organization);
$orgId = $organization;
}
$changeEventClass = $org->getRespondentChangeEventClass();
if ($changeEventClass) {
$event = $this->loader->getEvents()->loadRespondentChangedEvent($changeEventClass);
if ($event) {
$respondent = $this->loader->getRespondent($patientId, $orgId, $respondentId);
if ($event->processChangedRespondent($respondent)) {
// If no change was registered yet, do so now
if (!$this->getChanged()) {
$this->addChanged();
}
return true;
}
}
}
return false;
}
示例3: getRespondent
/**
* Get the respondent linked to this token
*
* @return \Gems_Tracker_Respondent
*/
public function getRespondent()
{
$patientNumber = $this->getPatientNumber();
$organizationId = $this->getOrganizationId();
if (!$this->_respondentObject instanceof \Gems_Tracker_Respondent || $this->_respondentObject->getPatientNumber() !== $patientNumber || $this->_respondentObject->getOrganizationId() !== $organizationId) {
$this->_respondentObject = $this->loader->getRespondent($patientNumber, $organizationId);
}
return $this->_respondentObject;
}
示例4: getRespondent
/**
* Return the respondent object
*
* @return \Gems_Tracker_Respondent
*/
public function getRespondent()
{
return $this->loader->getRespondent($this->getPatientNumber(), $this->getOrganizationId(), $this->getRespondentId());
}