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


PHP sfDoctrineRecord::save方法代碼示例

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


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

示例1: save

 public function save(Doctrine_Connection $conn = null)
 {
     if (is_null($conn)) {
         $conn = opDoctrineQuery::chooseConnection(true);
     }
     parent::save($conn);
 }
開發者ID:Kazuhiro-Murota,項目名稱:OpenPNE3,代碼行數:7,代碼來源:opDoctrineRecord.class.php

示例2: save

 public function save(Doctrine_Connection $conn = null)
 {
     $hasConnection = Doctrine_Manager::getInstance()->hasConnectionForComponent($this->getTable()->getComponentName());
     if (is_null($conn) && !$hasConnection) {
         $conn = opDoctrineQuery::chooseConnection(true);
     }
     parent::save($conn);
 }
開發者ID:te-koyama,項目名稱:openpne,代碼行數:8,代碼來源:opDoctrineRecord.class.php

示例3: saveReview

 /**
  *
  * @param sfDoctrineRecord $review
  * @return PerformanceReview      
  */
 public function saveReview(sfDoctrineRecord $review)
 {
     try {
         $review->save();
         $review->refresh();
         return $review;
         //@codeCoverageIgnoreStart
     } catch (Exception $e) {
         throw new DaoException($e->getMessage(), $e->getCode(), $e);
     }
     //@codeCoverageIgnoreEnd
 }
開發者ID:lahirwisada,項目名稱:orangehrm,代碼行數:17,代碼來源:PerformanceReviewDao.php

示例4: save

 public function save(Doctrine_Connection $conn = null)
 {
     parent::save($conn);
     foreach ($this->array_object as $object) {
         $object->setReferencedRelation($this->getTable()->getTableName());
         $object->setRecordId($this->id);
         try {
             $object->save();
         } catch (Doctrine_Exception $ne) {
             $e = new DarwinPgErrorParser($ne);
             $this->array_errors[] = "Unit " . $this->getTable()->getTableName() . " object were not saved: " . $e->getMessage() . ";";
         }
     }
     return $this->array_errors;
 }
開發者ID:naturalsciences,項目名稱:Darwin,代碼行數:15,代碼來源:DarwinModel.class.php

示例5: saveKpi

 /**
  *
  * @param sfDoctrineRecord $kpi
  * @return \sfDoctrineRecord
  * @throws DaoException 
  */
 public function saveKpi(sfDoctrineRecord $kpi)
 {
     try {
         if ($kpi->getDefaultKpi() > 0) {
             $query = Doctrine_Query::create()->update('Kpi k')->set('default_kpi', 'null');
             $query->execute();
         }
         $kpi->save();
         $kpi->refresh();
         return $kpi;
         //@codeCoverageIgnoreStart
     } catch (Exception $e) {
         throw new DaoException($e->getMessage(), $e->getCode(), $e);
     }
     //@codeCoverageIgnoreEnd
 }
開發者ID:lahirwisada,項目名稱:orangehrm,代碼行數:22,代碼來源:KpiDao.php


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