本文整理匯總了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());
}