protected function chkSelected_Click($strFormId, $strControlId, $strParameter) { // We look to the Parameter for the ID of the person being checked $arrParameters = explode(',', $strParameter); $intPersonId = $arrParameters[0]; // Let's get the selected person $objPerson = Person::Load($intPersonId); $chkSelected = $this->GetControl($strControlId); // Let's respond to the user what just happened if ($chkSelected->Checked) { $strResponse = QApplication::HtmlEntities('You just selected ' . $objPerson->FirstName . ' ' . $objPerson->LastName . '.'); } else { $strResponse = QApplication::HtmlEntities('You just deselected ' . $objPerson->FirstName . ' ' . $objPerson->LastName . '.'); } $strResponse .= '<br/>'; // Now, let's go through all the checkboxes and list everyone who has been selected $arrPeople = $this->colSelect->GetSelectedItems('Person'); $strNameArray = array(); foreach ($arrPeople as $objPerson) { $strName = QApplication::HtmlEntities($objPerson->FirstName . ' ' . $objPerson->LastName); $strNameArray[] = $strName; } $strResponse .= 'The list of people who are currently selected: ' . implode(', ', $strNameArray); // Provide feedback to the user by updating the Response label $this->lblResponse->Text = $strResponse; }
public function btnSave_Click($strFormId, $strControlId, $strParameter) { //Create New Group from information stored in mctGroup $objCloneGroup = new Group(); // Update any fields for controls that have been created if ($this->mctGroup->GroupTypeIdControl) { $objCloneGroup->GroupTypeId = $this->mctGroup->GroupTypeIdControl->SelectedValue; } if ($this->mctGroup->MinistryIdControl) { $objCloneGroup->MinistryId = $this->mctGroup->MinistryIdControl->SelectedValue; } if ($this->mctGroup->NameControl) { $objCloneGroup->Name = $this->mctGroup->NameControl->Text; } if ($this->mctGroup->DescriptionControl) { $objCloneGroup->Description = $this->mctGroup->DescriptionControl->Text; } if ($this->mctGroup->ParentGroupIdControl) { $objCloneGroup->ParentGroupId = $this->mctGroup->ParentGroupIdControl->SelectedValue; } if ($this->mctGroup->HierarchyLevelControl) { $objCloneGroup->HierarchyLevel = $this->mctGroup->HierarchyLevelControl->Text; } if ($this->mctGroup->HierarchyOrderNumberControl) { $objCloneGroup->HierarchyOrderNumber = $this->mctGroup->HierarchyOrderNumberControl->Text; } if ($this->mctGroup->ConfidentialFlagControl) { $objCloneGroup->ConfidentialFlag = $this->mctGroup->ConfidentialFlagControl->Checked; } if ($this->mctGroup->EmailBroadcastTypeIdControl) { $objCloneGroup->EmailBroadcastTypeId = $this->mctGroup->EmailBroadcastTypeIdControl->SelectedValue; } if ($this->mctGroup->TokenControl) { $objCloneGroup->Token = $this->mctGroup->TokenControl->Text; } if ($this->mctGroup->ActiveFlagControl) { $objCloneGroup->ActiveFlag = $this->mctGroup->ActiveFlagControl->Checked; } // Update any UniqueReverseReferences (if any) for controls that have been created for it if ($this->mctGroup->GroupCategoryControl) { $objCloneGroup->GroupCategory = GroupCategory::Load($this->mctGroup->GroupCategoryControl->SelectedValue); } if ($this->mctGroup->GrowthGroupControl) { $objCloneGroup->GrowthGroup = GrowthGroup::Load($this->mctGroup->GrowthGroupControl->SelectedValue); } if ($this->mctGroup->SmartGroupControl) { $objCloneGroup->SmartGroup = SmartGroup::Load($this->mctGroup->SmartGroupControl->SelectedValue); } // Save the Cloned Group object $objCloneGroup->Save(); // Get Participation List and propogate it $objGroupParticipationArray = $this->mctGroup->Group->GetActiveGroupParticipationArray(); foreach ($objGroupParticipationArray as $objGroupParticipation) { $objCloneGroup->AddPerson(Person::Load($objGroupParticipation->PersonId), $objGroupParticipation->GroupRoleId); } Group::RefreshHierarchyDataForMinistry($objCloneGroup->MinistryId); $this->objForm->pnlGroups_Refresh(); // Go to new Group. $this->ReturnTo('#' . $objCloneGroup->Id); }
public function pxyName_Click($strFormId, $strControlId, $strParameter) { $objPerson = Person::Load($strParameter); $strMethodCallback = $this->strMethodCallback; if ($this->objParentControl) { $this->objParentControl->{$strMethodCallback}($objPerson); } else { $this->objForm->{$strMethodCallback}($objPerson); } $this->HideDialogBox(); }
protected function SetupPanel() { if (!$this->objGroup->IsLoginCanEdit(QApplication::$Login)) { $this->ReturnTo('/groups/'); } // Get the person and check for validity / authorization $this->objPerson = Person::Load($this->strUrlHashArgument); if (!$this->objPerson) { return $this->ReturnTo('#' . $this->objGroup->Id); } // See if Group can have Explicitly Defined Participants if (!$this->objGroup->IsGroupCanHaveExplicitlyDefinedParticipants()) { return $this->ReturnTo('#' . $this->objGroup->Id); } $this->objDelegate = new EditGroupParticipationDelegate($this, '#' . $this->objGroup->Id); }
protected function SetupPanel() { $this->objPersonMergeWith = Person::Load($this->strUrlHashArgument); if (!$this->objPersonMergeWith || $this->objPersonMergeWith->Id == $this->objPerson->Id) { return $this->ReturnTo($this->objPerson->LinkUrl); } // Do the households match up okay? $blnHouseholdOkay = true; if ($this->objPerson->HouseholdAsHead) { foreach ($this->objPersonMergeWith->GetHouseholdParticipationArray() as $objHouseholdParticipation) { if ($objHouseholdParticipation->HouseholdId != $this->objPerson->HouseholdAsHead->Id) { if ($objHouseholdParticipation->Household->CountHouseholdParticipations() > 1) { $blnHouseholdOkay = false; } } } } if ($this->objPersonMergeWith->HouseholdAsHead) { foreach ($this->objPerson->GetHouseholdParticipationArray() as $objHouseholdParticipation) { if ($objHouseholdParticipation->HouseholdId != $this->objPersonMergeWith->HouseholdAsHead->Id) { if ($objHouseholdParticipation->Household->CountHouseholdParticipations() > 1) { $blnHouseholdOkay = false; } } } } if (!$blnHouseholdOkay) { $this->strTemplate = dirname(__FILE__) . '/Vicp_Merge_Fields_Invalid.tpl.php'; return; } if ($this->objPerson->PublicLogin && $this->objPersonMergeWith->PublicLogin) { $this->strTemplate = dirname(__FILE__) . '/Vicp_Merge_Fields_InvalidPublicLogin.tpl.php'; return; } $this->btnLeft = new QButton($this); $this->btnLeft->CssClass = 'primary'; $this->btnLeft->Text = 'Use This'; $this->btnLeft->AddAction(new QClickEvent(), new QConfirmAction('You are about to PERMANENTLY merge two records together. This cannot be undone.\\r\\nAre you SURE you wish to proceed?')); $this->btnLeft->AddAction(new QClickEvent(), new QAjaxControlAction($this, 'btnLeft_Click')); $this->btnRight = new QButton($this); $this->btnRight->CssClass = 'primary'; $this->btnRight->Text = 'Use This'; $this->btnRight->AddAction(new QClickEvent(), new QConfirmAction('You are about to PERMANENTLY merge two records together. This cannot be undone.\\r\\nAre you SURE you wish to proceed?')); $this->btnRight->AddAction(new QClickEvent(), new QAjaxControlAction($this, 'btnRight_Click')); }
protected function SetupPerson() { // Lookup Object PK information from Query String (if applicable) // Set mode to Edit or New depending on what's found $intId = QApplication::QueryString('intId'); if ($intId) { $this->objPerson = Person::Load($intId); if (!$this->objPerson) { throw new Exception('Could not find a Person object with PK arguments: ' . $intId); } $this->strTitleVerb = QApplication::Translate('Edit'); $this->blnEditMode = true; } else { $this->objPerson = new Person(); $this->strTitleVerb = QApplication::Translate('Create'); $this->blnEditMode = false; } }
/** * This performs the actual upload of the package's payload * @param string $strPackageName * @param string $strUsername * @param string $strPassword * @param boolean $blnGzCompress * @param string $strQpmXml * @return string */ public function UploadPackage($strPackageName, $strUsername, $strPassword, $blnGzCompress, $strQpmXml) { $objPerson = Person::Load($this->Login($strUsername, $strPassword)); $objPackage = Package::Load($this->GetPackageId($strPackageName)); if ($blnGzCompress) { $strQpmXml = gzuncompress($strQpmXml); } try { $objContribution = $objPackage->PostContributionVersion($objPerson, $strQpmXml, null); } catch (Exception $objExc) { return 'a server exception was thrown by the qpm webservice: ' . $objExc->getMessage(); } if ($objContribution) { $objPackage->PostMessage('A new version of this package was uploaded by ' . $objPerson->DisplayName, null, null); return sprintf('package %s/%s uploaded successfully', $objPerson->Username, $objPackage->Token); } else { return 'an unknown error has occurred, package not uploaded'; } }
protected function Form_Create() { $this->objPerson = Person::Load(QApplication::PathInfo(0)); if (!$this->objPerson) { QApplication::Redirect('/'); } if (!$this->objPerson->IsIndividual()) { QApplication::Redirect('/'); } $this->strPageTitle .= $this->objPerson->Name; $this->pnlContent = new EditHouseholdHomeAddressPanel($this); $this->pnlContent->objDelegate = new EditHomeAddressDelegate($this->pnlContent, $this->objPerson->LinkUrl, null); $this->pnlContent->btnSave->AddAction(new QClickEvent(), new QShowDialogBox($this->pnlContent->objDelegate->dlgMessage)); $this->pnlContent->btnSave->AddAction(new QClickEvent(), new QAjaxAction('btnSave_Click')); // Copy over home phone number foreach ($this->objPerson->GetPhoneArray() as $objPhone) { if ($objPhone->PhoneTypeId == PhoneType::Home) { $this->pnlContent->objDelegate->arrPhones[0]->Number = $objPhone->Number; } } }
protected function SetupPanel() { // Ensure Permission - figure if they can modify the email address they can modify the co-primary. if (!$this->objPerson->IsLoginCanEditEmailAddress(QApplication::$Login)) { return $this->ReturnTo('#contact'); } $this->pnlPerson = new SelectPersonPanel($this); $this->pnlPerson->Name = 'Co-Primary'; $this->pnlPerson->AllowCreate = true; $this->pnlPerson->Required = true; // Initialize if ($this->objPerson->CoPrimary) { $objCoPrimary = Person::Load($this->objPerson->CoPrimary); if ($objCoPrimary) { $this->pnlPerson->txtName->Text = sprintf("%s %s", $objCoPrimary->FirstName, $objCoPrimary->LastName); } } $this->btnSave->Text = 'Update'; $this->btnDelete = new QLinkButton($this); $this->btnDelete->Text = 'Delete'; $this->btnDelete->CssClass = 'delete'; }
/** * This will save this object's Email instance, * updating only the fields which have had a control created for it. */ public function SaveEmail() { try { // Update any fields for controls that have been created if ($this->lstPerson) { $this->objEmail->PersonId = $this->lstPerson->SelectedValue; } if ($this->txtAddress) { $this->objEmail->Address = $this->txtAddress->Text; } // Update any UniqueReverseReferences (if any) for controls that have been created for it if ($this->lstPersonAsPrimary) { $this->objEmail->PersonAsPrimary = Person::Load($this->lstPersonAsPrimary->SelectedValue); } // Save the Email object $this->objEmail->Save(); // Finally, update any ManyToManyReferences (if any) } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } }
/** * Override method to perform a property "Get" * This will get the value of $strName * * @param string $strName Name of the property to get * @return mixed */ public function __get($strName) { switch ($strName) { /////////////////// // Member Variables /////////////////// case 'Id': // Gets the value for intId (Read-Only PK) // @return integer return $this->intId; case 'SignupFormId': // Gets the value for intSignupFormId (Not Null) // @return integer return $this->intSignupFormId; case 'PersonId': // Gets the value for intPersonId // @return integer return $this->intPersonId; case 'SignupByPersonId': // Gets the value for intSignupByPersonId // @return integer return $this->intSignupByPersonId; case 'SignupEntryStatusTypeId': // Gets the value for intSignupEntryStatusTypeId (Not Null) // @return integer return $this->intSignupEntryStatusTypeId; case 'DateCreated': // Gets the value for dttDateCreated (Not Null) // @return QDateTime return $this->dttDateCreated; case 'DateSubmitted': // Gets the value for dttDateSubmitted // @return QDateTime return $this->dttDateSubmitted; case 'AmountTotal': // Gets the value for fltAmountTotal // @return double return $this->fltAmountTotal; case 'AmountPaid': // Gets the value for fltAmountPaid // @return double return $this->fltAmountPaid; case 'AmountBalance': // Gets the value for fltAmountBalance // @return double return $this->fltAmountBalance; case 'InternalNotes': // Gets the value for strInternalNotes // @return string return $this->strInternalNotes; case 'CommunicationsEntryId': // Gets the value for intCommunicationsEntryId // @return integer return $this->intCommunicationsEntryId; /////////////////// // Member Objects /////////////////// /////////////////// // Member Objects /////////////////// case 'SignupForm': // Gets the value for the SignupForm object referenced by intSignupFormId (Not Null) // @return SignupForm try { if (!$this->objSignupForm && !is_null($this->intSignupFormId)) { $this->objSignupForm = SignupForm::Load($this->intSignupFormId); } return $this->objSignupForm; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } case 'Person': // Gets the value for the Person object referenced by intPersonId // @return Person try { if (!$this->objPerson && !is_null($this->intPersonId)) { $this->objPerson = Person::Load($this->intPersonId); } return $this->objPerson; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } case 'SignupByPerson': // Gets the value for the Person object referenced by intSignupByPersonId // @return Person try { if (!$this->objSignupByPerson && !is_null($this->intSignupByPersonId)) { $this->objSignupByPerson = Person::Load($this->intSignupByPersonId); } return $this->objSignupByPerson; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } case 'CommunicationsEntry': // Gets the value for the CommunicationListEntry object referenced by intCommunicationsEntryId // @return CommunicationListEntry try { if (!$this->objCommunicationsEntry && !is_null($this->intCommunicationsEntryId)) { $this->objCommunicationsEntry = CommunicationListEntry::Load($this->intCommunicationsEntryId); } return $this->objCommunicationsEntry; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } case 'ClassRegistration': // Gets the value for the ClassRegistration object that uniquely references this SignupEntry // by objClassRegistration (Unique) // @return ClassRegistration try { if ($this->objClassRegistration === false) { // We've attempted early binding -- and the reverse reference object does not exist return null; } if (!$this->objClassRegistration) { $this->objClassRegistration = ClassRegistration::LoadBySignupEntryId($this->intId); } return $this->objClassRegistration; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } //////////////////////////// // Virtual Object References (Many to Many and Reverse References) // (If restored via a "Many-to" expansion) //////////////////////////// //////////////////////////// // Virtual Object References (Many to Many and Reverse References) // (If restored via a "Many-to" expansion) //////////////////////////// case '_FormAnswer': // Gets the value for the private _objFormAnswer (Read-Only) // if set due to an expansion on the form_answer.signup_entry_id reverse relationship // @return FormAnswer return $this->_objFormAnswer; case '_FormAnswerArray': // Gets the value for the private _objFormAnswerArray (Read-Only) // if set due to an ExpandAsArray on the form_answer.signup_entry_id reverse relationship // @return FormAnswer[] return (array) $this->_objFormAnswerArray; case '_SignupPayment': // Gets the value for the private _objSignupPayment (Read-Only) // if set due to an expansion on the signup_payment.signup_entry_id reverse relationship // @return SignupPayment return $this->_objSignupPayment; case '_SignupPaymentArray': // Gets the value for the private _objSignupPaymentArray (Read-Only) // if set due to an ExpandAsArray on the signup_payment.signup_entry_id reverse relationship // @return SignupPayment[] return (array) $this->_objSignupPaymentArray; case '_SignupProduct': // Gets the value for the private _objSignupProduct (Read-Only) // if set due to an expansion on the signup_product.signup_entry_id reverse relationship // @return SignupProduct return $this->_objSignupProduct; case '_SignupProductArray': // Gets the value for the private _objSignupProductArray (Read-Only) // if set due to an ExpandAsArray on the signup_product.signup_entry_id reverse relationship // @return SignupProduct[] return (array) $this->_objSignupProductArray; case '__Restored': return $this->__blnRestored; default: try { return parent::__get($strName); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } } }
case 'daughter': $intRelationshipTypeId = RelationshipType::Child; break; case 'brother': case 'sister': $intRelationshipTypeId = RelationshipType::Sibling; break; case 'grandmother': case 'grandfather': $intRelationshipTypeId = RelationshipType::Grandparent; break; case 'grandchild': case 'grandson': case 'granddaughter': $intRelationshipTypeId = RelationshipType::Grandchild; break; } if ($intRelationshipTypeId) { $objPerson = Person::Load($intPersonIdByIndvId[$objRow['indvid']]); $objRelatedPerson = Person::Load($intPersonIdByIndvId[$objRow['reltindvid']]); if (!Relationship::LoadByPersonIdRelatedToPersonId($objPerson->Id, $objRelatedPerson->Id)) { $objPerson->AddRelationship($objRelatedPerson, $intRelationshipTypeId); } } } } $objParticipationCursor = HouseholdParticipation::QueryCursor(QQ::All()); $intCount = HouseholdParticipation::CountAll(); while (QDataGen::DisplayWhileTask('Recalculating HouseholdParticipation Roles', $intCount) && ($objHouseholdParticipation = HouseholdParticipation::InstantiateCursor($objParticipationCursor))) { $objHouseholdParticipation->RefreshRole(); }
protected function chkSelected_Click($strFormId, $strControlId, $strParameter) { // We look to the Parameter for the ID of the person being checked $intPersonId = $strParameter; // Let's get the selected person $objPerson = Person::Load($intPersonId); // Let's respond to the user what just happened if ($this->GetControl($strControlId)->Checked) { $strResponse = QApplication::HtmlEntities('You just selected ' . $objPerson->FirstName . ' ' . $objPerson->LastName . '.'); } else { $strResponse = QApplication::HtmlEntities('You just deselected ' . $objPerson->FirstName . ' ' . $objPerson->LastName . '.'); } $strResponse .= '<br/>'; // Now, let's go through all the checkboxes and list everyone who has been selected $strNameArray = array(); foreach ($this->GetAllControls() as $objControl) { if (substr($objControl->ControlId, 0, 11) == 'chkSelected') { if ($objControl->Checked) { $objPerson = Person::Load($objControl->ActionParameter); $strName = QApplication::HtmlEntities($objPerson->FirstName . ' ' . $objPerson->LastName); array_push($strNameArray, $strName); } } } $strResponse .= 'The list of people who are currently selected: ' . implode(', ', $strNameArray); // Provide feedback to the user by updating the Response label $this->lblResponse->Text = $strResponse; }
public function pxySelectPerson_Click($strFormId, $strControlId, $strParameter) { if ($strFormId) { $this->blnExplicitSelectionFlag = true; } $this->objSelectedPerson = Person::Load($strParameter); $this->pnlPerson_Refresh(); $this->dtgPeople->Refresh(); }
public function QueueMessages() { if ($this->Group) { foreach ($this->Group->GetActiveGroupParticipationArray() as $objParticipation) { $objPerson = $objParticipation->Person; EmailOutgoingQueue::QueueMessage($this->EmailMessage, $this->Group->Token, $objPerson); // GJS: At this point, also check if there is a co-primary and include them to the list if ($objPerson->DateOfBirth && $objPerson->CoPrimary) { $objCoPrimary = Person::Load($objPerson->CoPrimary); if ($objCoPrimary) { EmailOutgoingQueue::QueueMessage($this->EmailMessage, $this->Group->Token, $objCoPrimary); } } } foreach ($this->Group->Ministry->GetLoginArray() as $objLogin) { if ($objLogin->DomainActiveFlag && $objLogin->LoginActiveFlag) { EmailOutgoingQueue::QueueMessage($this->EmailMessage, $this->Group->Token, $objLogin); } } } else { if ($this->CommunicationList) { foreach ($this->CommunicationList->GetPersonArray() as $objPerson) { EmailOutgoingQueue::QueueMessage($this->EmailMessage, $this->CommunicationList->Token, $objPerson); } foreach ($this->CommunicationList->GetCommunicationListEntryArray() as $objCommunicationListEntry) { EmailOutgoingQueue::QueueMessage($this->EmailMessage, $this->CommunicationList->Token, $objCommunicationListEntry); } foreach ($this->CommunicationList->Ministry->GetLoginArray() as $objLogin) { if ($objLogin->DomainActiveFlag && $objLogin->LoginActiveFlag) { EmailOutgoingQueue::QueueMessage($this->EmailMessage, $this->CommunicationList->Token, $objLogin); } } } } }
/** * Override method to perform a property "Get" * This will get the value of $strName * * @param string $strName Name of the property to get * @return mixed */ public function __get($strName) { switch ($strName) { /////////////////// // Member Variables /////////////////// case 'Id': // Gets the value for intId (Read-Only PK) // @return integer return $this->intId; case 'EmailMessageId': // Gets the value for intEmailMessageId (Not Null) // @return integer return $this->intEmailMessageId; case 'GroupId': // Gets the value for intGroupId // @return integer return $this->intGroupId; case 'CommunicationListId': // Gets the value for intCommunicationListId // @return integer return $this->intCommunicationListId; case 'LoginId': // Gets the value for intLoginId // @return integer return $this->intLoginId; case 'CommunicationListEntryId': // Gets the value for intCommunicationListEntryId // @return integer return $this->intCommunicationListEntryId; case 'PersonId': // Gets the value for intPersonId // @return integer return $this->intPersonId; /////////////////// // Member Objects /////////////////// /////////////////// // Member Objects /////////////////// case 'EmailMessage': // Gets the value for the EmailMessage object referenced by intEmailMessageId (Not Null) // @return EmailMessage try { if (!$this->objEmailMessage && !is_null($this->intEmailMessageId)) { $this->objEmailMessage = EmailMessage::Load($this->intEmailMessageId); } return $this->objEmailMessage; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } case 'Group': // Gets the value for the Group object referenced by intGroupId // @return Group try { if (!$this->objGroup && !is_null($this->intGroupId)) { $this->objGroup = Group::Load($this->intGroupId); } return $this->objGroup; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } case 'CommunicationList': // Gets the value for the CommunicationList object referenced by intCommunicationListId // @return CommunicationList try { if (!$this->objCommunicationList && !is_null($this->intCommunicationListId)) { $this->objCommunicationList = CommunicationList::Load($this->intCommunicationListId); } return $this->objCommunicationList; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } case 'Login': // Gets the value for the Login object referenced by intLoginId // @return Login try { if (!$this->objLogin && !is_null($this->intLoginId)) { $this->objLogin = Login::Load($this->intLoginId); } return $this->objLogin; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } case 'CommunicationListEntry': // Gets the value for the CommunicationListEntry object referenced by intCommunicationListEntryId // @return CommunicationListEntry try { if (!$this->objCommunicationListEntry && !is_null($this->intCommunicationListEntryId)) { $this->objCommunicationListEntry = CommunicationListEntry::Load($this->intCommunicationListEntryId); } return $this->objCommunicationListEntry; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } case 'Person': // Gets the value for the Person object referenced by intPersonId // @return Person try { if (!$this->objPerson && !is_null($this->intPersonId)) { $this->objPerson = Person::Load($this->intPersonId); } return $this->objPerson; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } //////////////////////////// // Virtual Object References (Many to Many and Reverse References) // (If restored via a "Many-to" expansion) //////////////////////////// //////////////////////////// // Virtual Object References (Many to Many and Reverse References) // (If restored via a "Many-to" expansion) //////////////////////////// case '__Restored': return $this->__blnRestored; default: try { return parent::__get($strName); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } } }
/** * Override method to perform a property "Get" * This will get the value of $strName * * @param string $strName Name of the property to get * @return mixed */ public function __get($strName) { switch ($strName) { /////////////////// // Member Variables /////////////////// case 'Id': // Gets the value for intId (Read-Only PK) // @return integer return $this->intId; case 'PackageCategoryId': // Gets the value for intPackageCategoryId (Not Null) // @return integer return $this->intPackageCategoryId; case 'Token': // Gets the value for strToken (Unique) // @return string return $this->strToken; case 'Name': // Gets the value for strName // @return string return $this->strName; case 'Description': // Gets the value for strDescription // @return string return $this->strDescription; case 'LastPostDate': // Gets the value for dttLastPostDate // @return QDateTime return $this->dttLastPostDate; case 'LastPostedByPersonId': // Gets the value for intLastPostedByPersonId // @return integer return $this->intLastPostedByPersonId; /////////////////// // Member Objects /////////////////// /////////////////// // Member Objects /////////////////// case 'PackageCategory': // Gets the value for the PackageCategory object referenced by intPackageCategoryId (Not Null) // @return PackageCategory try { if (!$this->objPackageCategory && !is_null($this->intPackageCategoryId)) { $this->objPackageCategory = PackageCategory::Load($this->intPackageCategoryId); } return $this->objPackageCategory; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } case 'LastPostedByPerson': // Gets the value for the Person object referenced by intLastPostedByPersonId // @return Person try { if (!$this->objLastPostedByPerson && !is_null($this->intLastPostedByPersonId)) { $this->objLastPostedByPerson = Person::Load($this->intLastPostedByPersonId); } return $this->objLastPostedByPerson; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } case 'TopicLink': // Gets the value for the TopicLink object that uniquely references this Package // by objTopicLink (Unique) // @return TopicLink try { if ($this->objTopicLink === false) { // We've attempted early binding -- and the reverse reference object does not exist return null; } if (!$this->objTopicLink) { $this->objTopicLink = TopicLink::LoadByPackageId($this->intId); } return $this->objTopicLink; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } //////////////////////////// // Virtual Object References (Many to Many and Reverse References) // (If restored via a "Many-to" expansion) //////////////////////////// //////////////////////////// // Virtual Object References (Many to Many and Reverse References) // (If restored via a "Many-to" expansion) //////////////////////////// case '_PackageContribution': // Gets the value for the private _objPackageContribution (Read-Only) // if set due to an expansion on the package_contribution.package_id reverse relationship // @return PackageContribution return $this->_objPackageContribution; case '_PackageContributionArray': // Gets the value for the private _objPackageContributionArray (Read-Only) // if set due to an ExpandAsArray on the package_contribution.package_id reverse relationship // @return PackageContribution[] return (array) $this->_objPackageContributionArray; case '__Restored': return $this->__blnRestored; default: try { return parent::__get($strName); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } } }
/** * Override method to perform a property "Get" * This will get the value of $strName * * @param string $strName Name of the property to get * @return mixed */ public function __get($strName) { switch ($strName) { /////////////////// // Member Variables /////////////////// case 'Id': // Gets the value for intId (Read-Only PK) // @return integer return $this->intId; case 'LinkedMarriageId': // Gets the value for intLinkedMarriageId (Unique) // @return integer return $this->intLinkedMarriageId; case 'PersonId': // Gets the value for intPersonId (Not Null) // @return integer return $this->intPersonId; case 'MarriedToPersonId': // Gets the value for intMarriedToPersonId // @return integer return $this->intMarriedToPersonId; case 'MarriageStatusTypeId': // Gets the value for intMarriageStatusTypeId (Not Null) // @return integer return $this->intMarriageStatusTypeId; case 'DateStart': // Gets the value for dttDateStart // @return QDateTime return $this->dttDateStart; case 'DateEnd': // Gets the value for dttDateEnd // @return QDateTime return $this->dttDateEnd; /////////////////// // Member Objects /////////////////// /////////////////// // Member Objects /////////////////// case 'LinkedMarriage': // Gets the value for the Marriage object referenced by intLinkedMarriageId (Unique) // @return Marriage try { if (!$this->objLinkedMarriage && !is_null($this->intLinkedMarriageId)) { $this->objLinkedMarriage = Marriage::Load($this->intLinkedMarriageId); } return $this->objLinkedMarriage; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } case 'Person': // Gets the value for the Person object referenced by intPersonId (Not Null) // @return Person try { if (!$this->objPerson && !is_null($this->intPersonId)) { $this->objPerson = Person::Load($this->intPersonId); } return $this->objPerson; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } case 'MarriedToPerson': // Gets the value for the Person object referenced by intMarriedToPersonId // @return Person try { if (!$this->objMarriedToPerson && !is_null($this->intMarriedToPersonId)) { $this->objMarriedToPerson = Person::Load($this->intMarriedToPersonId); } return $this->objMarriedToPerson; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } case 'MarriageAsLinked': // Gets the value for the Marriage object that uniquely references this Marriage // by objMarriageAsLinked (Unique) // @return Marriage try { if ($this->objMarriageAsLinked === false) { // We've attempted early binding -- and the reverse reference object does not exist return null; } if (!$this->objMarriageAsLinked) { $this->objMarriageAsLinked = Marriage::LoadByLinkedMarriageId($this->intId); } return $this->objMarriageAsLinked; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } //////////////////////////// // Virtual Object References (Many to Many and Reverse References) // (If restored via a "Many-to" expansion) //////////////////////////// //////////////////////////// // Virtual Object References (Many to Many and Reverse References) // (If restored via a "Many-to" expansion) //////////////////////////// case '__Restored': return $this->__blnRestored; default: try { return parent::__get($strName); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } } }
public function dtgPersonsRow_Click($strFormId, $strControlId, $strParameter) { $intPersonId = intval($strParameter); $objPerson = Person::Load($intPersonId); QApplication::ExecuteJavascript("alert('You clicked on a person with ID #" . $intPersonId . ": " . $objPerson->FirstName . " " . $objPerson->LastName . "');"); }
protected function btnSave_Click($strFormId, $strControlId, $strParameter) { if (!$this->objSelectedHousehold) { QApplication::DisplayAlert('Please Select a Household'); return; } $this->objHousehold->MergeHousehold($this->objSelectedHousehold, Person::Load($this->lstHead->SelectedValue)); $this->RedirectToViewPage(); }
* } */ $person = new Person(); $person->name_first = 'Andi'; $person->name_last = 'Gutmans'; $person->save(); // this save() will fail on INSERT as favorite_color is a must fill... $person = new Person(); $person->name_first = 'Andi'; $person->name_last = 'Gutmans'; $person->favorite_color = 'blue'; $person->save(); // this save will perform an INSERT successfully echo "<p>The Insert ID generated:"; print_r($person->id); $person->favorite_color = 'red'; $person->save(); // this save() will perform an UPDATE $person = new Person(); $person->name_first = 'John'; $person->name_last = 'Lim'; $person->favorite_color = 'lavender'; $person->save(); // this save will perform an INSERT successfully // load record where id=2 into a new ADOdb_Active_Record $person2 = new Person(); $person2->Load('id=2'); var_dump($person2); $activeArr = $db->GetActiveRecordsClass($class = "Person", $table = "persons", "id=" . $db->Param(0), array(2)); $person2 = $activeArr[0]; echo "<p>Name (should be John): ", $person->name_first, " <br> Class (should be Person): ", get_class($person2);
/** * Override method to perform a property "Get" * This will get the value of $strName * * @param string $strName Name of the property to get * @return mixed */ public function __get($strName) { switch ($strName) { /////////////////// // Member Variables /////////////////// case 'Id': // Gets the value for intId (Read-Only PK) // @return integer return $this->intId; case 'Name': // Gets the value for strName // @return string return $this->strName; case 'HeadPersonId': // Gets the value for intHeadPersonId (Unique) // @return integer return $this->intHeadPersonId; case 'CombinedStewardshipFlag': // Gets the value for blnCombinedStewardshipFlag // @return boolean return $this->blnCombinedStewardshipFlag; case 'Members': // Gets the value for strMembers // @return string return $this->strMembers; /////////////////// // Member Objects /////////////////// /////////////////// // Member Objects /////////////////// case 'HeadPerson': // Gets the value for the Person object referenced by intHeadPersonId (Unique) // @return Person try { if (!$this->objHeadPerson && !is_null($this->intHeadPersonId)) { $this->objHeadPerson = Person::Load($this->intHeadPersonId); } return $this->objHeadPerson; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } //////////////////////////// // Virtual Object References (Many to Many and Reverse References) // (If restored via a "Many-to" expansion) //////////////////////////// //////////////////////////// // Virtual Object References (Many to Many and Reverse References) // (If restored via a "Many-to" expansion) //////////////////////////// case '_Address': // Gets the value for the private _objAddress (Read-Only) // if set due to an expansion on the address.household_id reverse relationship // @return Address return $this->_objAddress; case '_AddressArray': // Gets the value for the private _objAddressArray (Read-Only) // if set due to an ExpandAsArray on the address.household_id reverse relationship // @return Address[] return (array) $this->_objAddressArray; case '_HouseholdParticipation': // Gets the value for the private _objHouseholdParticipation (Read-Only) // if set due to an expansion on the household_participation.household_id reverse relationship // @return HouseholdParticipation return $this->_objHouseholdParticipation; case '_HouseholdParticipationArray': // Gets the value for the private _objHouseholdParticipationArray (Read-Only) // if set due to an ExpandAsArray on the household_participation.household_id reverse relationship // @return HouseholdParticipation[] return (array) $this->_objHouseholdParticipationArray; case '_HouseholdSplitAsSplit': // Gets the value for the private _objHouseholdSplitAsSplit (Read-Only) // if set due to an expansion on the household_split.split_household_id reverse relationship // @return HouseholdSplit return $this->_objHouseholdSplitAsSplit; case '_HouseholdSplitAsSplitArray': // Gets the value for the private _objHouseholdSplitAsSplitArray (Read-Only) // if set due to an ExpandAsArray on the household_split.split_household_id reverse relationship // @return HouseholdSplit[] return (array) $this->_objHouseholdSplitAsSplitArray; case '_HouseholdSplit': // Gets the value for the private _objHouseholdSplit (Read-Only) // if set due to an expansion on the household_split.household_id reverse relationship // @return HouseholdSplit return $this->_objHouseholdSplit; case '_HouseholdSplitArray': // Gets the value for the private _objHouseholdSplitArray (Read-Only) // if set due to an ExpandAsArray on the household_split.household_id reverse relationship // @return HouseholdSplit[] return (array) $this->_objHouseholdSplitArray; case '_ParentPagerHousehold': // Gets the value for the private _objParentPagerHousehold (Read-Only) // if set due to an expansion on the parent_pager_household.household_id reverse relationship // @return ParentPagerHousehold return $this->_objParentPagerHousehold; case '_ParentPagerHouseholdArray': // Gets the value for the private _objParentPagerHouseholdArray (Read-Only) // if set due to an ExpandAsArray on the parent_pager_household.household_id reverse relationship // @return ParentPagerHousehold[] return (array) $this->_objParentPagerHouseholdArray; case '__Restored': return $this->__blnRestored; default: try { return parent::__get($strName); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } } }
/** * Override method to perform a property "Get" * This will get the value of $strName * * @param string $strName Name of the property to get * @return mixed */ public function __get($strName) { switch ($strName) { /////////////////// // Member Variables /////////////////// case 'Id': /** * Gets the value for intId (Read-Only PK) * @return integer */ return $this->intId; case 'ImageFileTypeId': /** * Gets the value for intImageFileTypeId (Not Null) * @return integer */ return $this->intImageFileTypeId; case 'PersonId': /** * Gets the value for intPersonId (Not Null) * @return integer */ return $this->intPersonId; case 'Name': /** * Gets the value for strName * @return string */ return $this->strName; case 'Description': /** * Gets the value for strDescription * @return string */ return $this->strDescription; case 'Url': /** * Gets the value for strUrl * @return string */ return $this->strUrl; case 'LiveFlag': /** * Gets the value for blnLiveFlag (Not Null) * @return boolean */ return $this->blnLiveFlag; /////////////////// // Member Objects /////////////////// /////////////////// // Member Objects /////////////////// case 'Person': /** * Gets the value for the Person object referenced by intPersonId (Not Null) * @return Person */ try { if (!$this->objPerson && !is_null($this->intPersonId)) { $this->objPerson = Person::Load($this->intPersonId); } return $this->objPerson; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } //////////////////////////// // Virtual Object References (Many to Many and Reverse References) // (If restored via a "Many-to" expansion) //////////////////////////// //////////////////////////// // Virtual Object References (Many to Many and Reverse References) // (If restored via a "Many-to" expansion) //////////////////////////// case '__Restored': return $this->__blnRestored; default: try { return parent::__get($strName); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } } }
/** * Override method to perform a property "Get" * This will get the value of $strName * * @param string $strName Name of the property to get * @return mixed */ public function __get($strName) { switch ($strName) { /////////////////// // Member Variables /////////////////// case 'SignupEntryId': // Gets the value for intSignupEntryId (PK) // @return integer return $this->intSignupEntryId; case 'ClassMeetingId': // Gets the value for intClassMeetingId (Not Null) // @return integer return $this->intClassMeetingId; case 'PersonId': // Gets the value for intPersonId (Not Null) // @return integer return $this->intPersonId; case 'ClassGradeId': // Gets the value for intClassGradeId // @return integer return $this->intClassGradeId; case 'ChildcareNotes': // Gets the value for strChildcareNotes // @return string return $this->strChildcareNotes; /////////////////// // Member Objects /////////////////// /////////////////// // Member Objects /////////////////// case 'SignupEntry': // Gets the value for the SignupEntry object referenced by intSignupEntryId (PK) // @return SignupEntry try { if (!$this->objSignupEntry && !is_null($this->intSignupEntryId)) { $this->objSignupEntry = SignupEntry::Load($this->intSignupEntryId); } return $this->objSignupEntry; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } case 'ClassMeeting': // Gets the value for the ClassMeeting object referenced by intClassMeetingId (Not Null) // @return ClassMeeting try { if (!$this->objClassMeeting && !is_null($this->intClassMeetingId)) { $this->objClassMeeting = ClassMeeting::Load($this->intClassMeetingId); } return $this->objClassMeeting; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } case 'Person': // Gets the value for the Person object referenced by intPersonId (Not Null) // @return Person try { if (!$this->objPerson && !is_null($this->intPersonId)) { $this->objPerson = Person::Load($this->intPersonId); } return $this->objPerson; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } case 'ClassGrade': // Gets the value for the ClassGrade object referenced by intClassGradeId // @return ClassGrade try { if (!$this->objClassGrade && !is_null($this->intClassGradeId)) { $this->objClassGrade = ClassGrade::Load($this->intClassGradeId); } return $this->objClassGrade; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } //////////////////////////// // Virtual Object References (Many to Many and Reverse References) // (If restored via a "Many-to" expansion) //////////////////////////// //////////////////////////// // Virtual Object References (Many to Many and Reverse References) // (If restored via a "Many-to" expansion) //////////////////////////// case '_ClassAttendence': // Gets the value for the private _objClassAttendence (Read-Only) // if set due to an expansion on the class_attendence.class_registration_id reverse relationship // @return ClassAttendence return $this->_objClassAttendence; case '_ClassAttendenceArray': // Gets the value for the private _objClassAttendenceArray (Read-Only) // if set due to an ExpandAsArray on the class_attendence.class_registration_id reverse relationship // @return ClassAttendence[] return (array) $this->_objClassAttendenceArray; case '__Restored': return $this->__blnRestored; default: try { return parent::__get($strName); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } } }
<li>First Name: <?php _p($objPerson->FirstName); ?> </li> <li>Last Name: <?php _p($objPerson->LastName); ?> </li> </ul> <?php // Update the field and save $objPerson->FirstName = 'FooBar'; $objPerson->Save(); // Restore the same person object just to make sure we // have a clean object from the database $objPerson = Person::Load(3); ?> <h3><em>After the Save</em></h3> <ul> <li>Person ID: <?php _p($objPerson->Id); ?> </li> <li>First Name: <?php _p($objPerson->FirstName); ?> </li> <li>Last Name: <?php _p($objPerson->LastName); ?> </li>
<li>AssociateChildCategory</li> <li>UnassocaiteChildCategory</li> <li>UnassociateAllChildCategories</li> <li>DeleteChildCategory</li> <li>DeleteAllChildCategories</li> </ul> (Note that even though this is being documented here, self-referential tables aren't actually defined in the <b>Examples Site Database</b>.) </div> <h3>Person's Reverse Relationships with Project (via project.manager_person_id)<br/>and Login (via login.person_id)</h3> <?php // Let's load a Person object -- let's select the Person with ID #1 $objPerson = Person::Load(7); ?> Person ID: <?php _p($objPerson->Id); ?> <br/> First Name: <?php _p($objPerson->FirstName); ?> <br/> Last Name: <?php _p($objPerson->LastName); ?> <br/><br/><br/>
protected function btnSave_Click($strFormId, $strControlId, $strParameter) { if ($this->intEditPersonId == -1) { $objPerson = new Person(); } else { $objPerson = Person::Load($this->intEditPersonId); } $objPerson->FirstName = trim($this->txtFirstName->Text); $objPerson->LastName = trim($this->txtLastName->Text); $objPerson->Save(); $this->intEditPersonId = null; }
public function __get($strName) { switch ($strName) { case 'AllowCreate': return $this->blnAllowCreate; case 'ForceAsMaleFlag': return $this->blnForceAsMaleFlag; case 'Person': if ($this->blnAllowCreate && $this->intSelectedPersonId == -1) { if (!is_null($this->blnForceAsMaleFlag)) { $blnGender = $this->blnForceAsMaleFlag; } else { if (!is_null($this->lstGender->SelectedValue)) { $blnGender = $this->lstGender->SelectedValue == 'M'; } else { $blnGender = null; } } $strEmail = trim(strtolower($this->txtEmail->Text)); $strPhone = trim(strtolower($this->txtPhone->Text)); $intPhoneTypeId = $strPhone ? $this->lstPhone->SelectedValue : null; $intMobileProviderId = $strPhone ? $this->lstMobileProvider->SelectedValue : null; $objPerson = Person::CreatePerson($this->txtFirstName->Text, null, $this->txtLastName->Text, $blnGender, $strEmail, $strPhone, $intPhoneTypeId, $intMobileProviderId); if ($this->dtxDateOfBirth->DateTime) { $objPerson->DateOfBirth = $this->dtxDateOfBirth->DateTime; $objPerson->DobGuessedFlag = false; $objPerson->DobYearApproximateFlag = false; $objPerson->RefreshAge(); } return $objPerson; } else { if ($this->intSelectedPersonId > 0) { return Person::Load($this->intSelectedPersonId); } else { return null; } } default: try { return parent::__get($strName); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } } }
/** * Static Helper Method to Create using PK arguments * You must pass in the PK arguments on an object to load, or leave it blank to create a new one. * If you want to load via QueryString or PathInfo, use the CreateFromQueryString or CreateFromPathInfo * static helper methods. Finally, specify a CreateType to define whether or not we are only allowed to * edit, or if we are also allowed to create a new one, etc. * * @param mixed $objParentObject QForm or QPanel which will be using this PersonMetaControl * @param integer $intId primary key value * @param QMetaControlCreateType $intCreateType rules governing Person object creation - defaults to CreateOrEdit * @return PersonMetaControl */ public static function Create($objParentObject, $intId = null, $intCreateType = QMetaControlCreateType::CreateOrEdit) { // Attempt to Load from PK Arguments if (strlen($intId)) { $objPerson = Person::Load($intId); // Person was found -- return it! if ($objPerson) { return new PersonMetaControl($objParentObject, $objPerson); } else { if ($intCreateType != QMetaControlCreateType::CreateOnRecordNotFound) { throw new QCallerException('Could not find a Person object with PK arguments: ' . $intId); } } // If EditOnly is specified, throw an exception } else { if ($intCreateType == QMetaControlCreateType::EditOnly) { throw new QCallerException('No PK arguments specified'); } } // If we are here, then we need to create a new record return new PersonMetaControl($objParentObject, new Person()); }
/** * Override method to perform a property "Get" * This will get the value of $strName * * @param string $strName Name of the property to get * @return mixed */ public function __get($strName) { switch ($strName) { /////////////////// // Member Variables /////////////////// case 'Id': // Gets the value for intId (Read-Only PK) // @return integer return $this->intId; case 'PersonId': // Gets the value for intPersonId (Unique) // @return integer return $this->intPersonId; case 'ActiveFlag': // Gets the value for blnActiveFlag // @return boolean return $this->blnActiveFlag; case 'Username': // Gets the value for strUsername (Unique) // @return string return $this->strUsername; case 'Password': // Gets the value for strPassword // @return string return $this->strPassword; case 'LostPasswordQuestion': // Gets the value for strLostPasswordQuestion // @return string return $this->strLostPasswordQuestion; case 'LostPasswordAnswer': // Gets the value for strLostPasswordAnswer // @return string return $this->strLostPasswordAnswer; case 'TemporaryPasswordFlag': // Gets the value for blnTemporaryPasswordFlag // @return boolean return $this->blnTemporaryPasswordFlag; case 'DateRegistered': // Gets the value for dttDateRegistered (Not Null) // @return QDateTime return $this->dttDateRegistered; case 'DateLastLogin': // Gets the value for dttDateLastLogin // @return QDateTime return $this->dttDateLastLogin; /////////////////// // Member Objects /////////////////// /////////////////// // Member Objects /////////////////// case 'Person': // Gets the value for the Person object referenced by intPersonId (Unique) // @return Person try { if (!$this->objPerson && !is_null($this->intPersonId)) { $this->objPerson = Person::Load($this->intPersonId); } return $this->objPerson; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } case 'ProvisionalPublicLogin': // Gets the value for the ProvisionalPublicLogin object that uniquely references this PublicLogin // by objProvisionalPublicLogin (Unique) // @return ProvisionalPublicLogin try { if ($this->objProvisionalPublicLogin === false) { // We've attempted early binding -- and the reverse reference object does not exist return null; } if (!$this->objProvisionalPublicLogin) { $this->objProvisionalPublicLogin = ProvisionalPublicLogin::LoadByPublicLoginId($this->intId); } return $this->objProvisionalPublicLogin; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } //////////////////////////// // Virtual Object References (Many to Many and Reverse References) // (If restored via a "Many-to" expansion) //////////////////////////// //////////////////////////// // Virtual Object References (Many to Many and Reverse References) // (If restored via a "Many-to" expansion) //////////////////////////// case '__Restored': return $this->__blnRestored; default: try { return parent::__get($strName); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } } }