当前位置: 首页>>代码示例>>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;未经允许,请勿转载。