當前位置: 首頁>>代碼示例>>PHP>>正文


PHP WebVista_Model_ORM::persist方法代碼示例

本文整理匯總了PHP中WebVista_Model_ORM::persist方法的典型用法代碼示例。如果您正苦於以下問題:PHP WebVista_Model_ORM::persist方法的具體用法?PHP WebVista_Model_ORM::persist怎麽用?PHP WebVista_Model_ORM::persist使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在WebVista_Model_ORM的用法示例。


在下文中一共展示了WebVista_Model_ORM::persist方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: persist

 public function persist()
 {
     if (!$this->dateTime || $this->dateTime == '0000-00-00 00:00:00') {
         $this->dateTime = date('Y-m-d H:i:s');
     }
     return parent::persist();
 }
開發者ID:dragonlet,項目名稱:clearhealth,代碼行數:7,代碼來源:PatientVisitType.php

示例2: persist

 public function persist()
 {
     if (!strlen($this->guid) > 0) {
         $this->guid = str_replace('-', '', NSDR::create_guid());
     }
     return parent::persist();
 }
開發者ID:dragonlet,項目名稱:clearhealth,代碼行數:7,代碼來源:DiscountTable.php

示例3: persist

 public function persist()
 {
     $this->homeAddress->type = 'HOME';
     $this->billingAddress->type = 'BILL';
     parent::persist();
     $this->person->persist();
 }
開發者ID:dragonlet,項目名稱:clearhealth,代碼行數:7,代碼來源:Patient.php

示例4: persist

 public function persist()
 {
     if ($this->_persistMode != WebVista_Model_ORM::DELETE && (int) $this->program_order === 0) {
         $this->program_order = self::maxProgramOrder($this) + 1;
     }
     return parent::persist();
 }
開發者ID:dragonlet,項目名稱:clearhealth,代碼行數:7,代碼來源:InsuredRelationship.php

示例5: persist

 public function persist()
 {
     $claimFileId = (int) $this->claimFileId;
     if (!$claimFileId > 0) {
         $this->claimFileId = $this->nextSequenceId('claimSequences');
     }
     return parent::persist();
 }
開發者ID:dragonlet,項目名稱:clearhealth,代碼行數:8,代碼來源:ClaimFile.php

示例6: persist

 public function persist()
 {
     if ($this->_persistMode == WebVista_Model_ORM::DELETE) {
         $db = Zend_Registry::get("dbAdapter");
         $db->delete($this->_table, 'healthStatusHandlerId=' . $this->healthStatusHandlerId . ' AND personId=' . $this->personId);
         return;
     }
     parent::persist();
 }
開發者ID:dragonlet,項目名稱:clearhealth,代碼行數:9,代碼來源:HealthStatusHandlerPatient.php

示例7: persist

 public function persist()
 {
     if (!$this->dateTime || $this->dateTime == '0000-00-00 00:00:00') {
         $this->dateTime = date('Y-m-d H:i:s');
     }
     if (!$this->patientProcedureId > 0) {
         $this->populateVisitDiagnoses();
     }
     return parent::persist();
 }
開發者ID:dragonlet,項目名稱:clearhealth,代碼行數:10,代碼來源:PatientProcedure.php

示例8: persist

 public function persist()
 {
     if ($this->_ormPersist) {
         return parent::persist();
     }
     if ($this->shouldAudit()) {
         $sql = $this->toSQL();
         AuditLog::appendSql($sql);
     }
 }
開發者ID:dragonlet,項目名稱:clearhealth,代碼行數:10,代碼來源:AuditValue.php

示例9: persist

 /**
  * Overrides WebVista_Model_ORM::persist()
  */
 public function persist()
 {
     $order = (int) $this->order;
     if (!$order > 0 && $this->_persistMode != WebVista_Model_ORM::DELETE) {
         $db = Zend_Registry::get("dbAdapter");
         $dbSelect = $db->select()->from($this->_table, "MAX(`order`) AS order");
         $result = $db->fetchRow($dbSelect);
         $this->order = $result['order'] + 1;
     }
     parent::persist();
 }
開發者ID:dragonlet,項目名稱:clearhealth,代碼行數:14,代碼來源:BarcodeMacro.php

示例10: persist

 public function persist()
 {
     parent::persist();
     $storageString = new StorageString();
     $storageString->setPersistMode($this->_persistMode);
     $storageString->foreignKey = $this->companyId;
     $storageString->valueKey = 'email';
     $storageString->value = $this->_companyEmail;
     $storageString->arrayIndex = 1;
     // start index at 1, may have problem with ORM
     $storageString->persist();
 }
開發者ID:dragonlet,項目名稱:clearhealth,代碼行數:12,代碼來源:Company.php

示例11: persist

 public function persist()
 {
     $filename = $this->getUploadFilename();
     $version = (int) $this->version;
     if ($version <= 0) {
         $this->version = $this->getLatestVersion() + 1;
     }
     $ret = parent::persist();
     if ($ret && $this->_persistMode == self::DELETE && file_exists($filename)) {
         unlink($filename);
     }
     return $ret;
 }
開發者ID:jakedorst,項目名稱:ch3-dev-preview,代碼行數:13,代碼來源:UpdateFile.php

示例12: persist

 public function persist()
 {
     $cascadePersist = null;
     if (!$this->numberId > 0) {
         $this->number->persist();
         $this->numberId = $this->number->numberId;
         $cascadePersist = $this->number->_cascadePersist;
         $this->number->_cascadePersist = false;
     }
     parent::persist();
     if ($cascadePersist !== null) {
         $this->number->_cascadePersist = $cascadePersist;
     }
 }
開發者ID:dragonlet,項目名稱:clearhealth,代碼行數:14,代碼來源:CompanyNumber.php

示例13: persist

 public function persist()
 {
     $ret = parent::persist();
     if ($this->_persistMode !== WebVista_Model_ORM::DELETE) {
         return $ret;
     }
     $method = new NSDRDefinitionMethod();
     $methodIterator = $method->getIteratorByParentId($this->uuid);
     $methods = $methodIterator->toArray('uuid', 'uuid');
     foreach ($methods as $key => $val) {
         $item = clone $method;
         $item->uuid = $key;
         $item->setPersistMode($this->_persistMode);
         $item->persist();
     }
     return $ret;
 }
開發者ID:jakedorst,項目名稱:ch3-dev-preview,代碼行數:17,代碼來源:NSDRDefinition.php

示例14: persist

 public function persist()
 {
     if ($this->_persistMode === WebVista_Model_ORM::DELETE) {
         $db = Zend_Registry::get('dbAdapter');
         $sql = $this->toSQL();
         $code = preg_replace('/[^a-z_0-9- \\.]/i', '', $this->code);
         $sql .= " AND `code` = '{$code}'";
         $db->query($sql);
         $this->postPersist();
         if ($this->shouldAudit()) {
             WebVista_Model_ORM::audit($this);
         }
     } else {
         parent::persist();
     }
     return $this;
 }
開發者ID:jakedorst,項目名稱:ch3-dev-preview,代碼行數:17,代碼來源:ProcedureCodesImmunization.php

示例15: persist

 public function persist()
 {
     if ($this->_persistMode == WebVista_Model_ORM::DELETE) {
         return parent::persist();
     }
     $db = Zend_Registry::get('dbAdapter');
     $clinicalNoteTemplateId = (int) $this->clinicalNoteTemplateId;
     $data = $this->toArray();
     if ($clinicalNoteTemplateId > 0) {
         $ret = $db->update($this->_table, $data, 'clinicalNoteTemplateId = ' . $clinicalNoteTemplateId);
     } else {
         $this->clinicalNoteTemplateId = WebVista_Model_ORM::nextSequenceId();
         $data['clinicalNoteTemplateId'] = $this->clinicalNoteTemplateId;
         $ret = $db->insert($this->_table, $data);
     }
     return $this;
 }
開發者ID:dragonlet,項目名稱:clearhealth,代碼行數:17,代碼來源:ClinicalNoteTemplate.php


注:本文中的WebVista_Model_ORM::persist方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。