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


PHP DB_DataObject::insert方法代碼示例

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


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

示例1: insert

 function insert()
 {
     //Update publication date if it hasn't been set already.
     if (!isset($this->pubDate)) {
         $this->pubDate = time();
     }
     $ret = parent::insert();
     return $ret;
 }
開發者ID:victorfcm,項目名稱:VuFind-Plus,代碼行數:9,代碼來源:EditorialReview.php

示例2: insert

 function insert()
 {
     $ret = parent::insert();
     //Load the person this is for, and update solr
     if ($this->personId) {
         require_once ROOT_DIR . '/sys/Genealogy/Person.php';
         $person = Person::staticGet('personId', $this->personId);
         $person->saveToSolr();
     }
     return $ret;
 }
開發者ID:bryandease,項目名稱:VuFind-Plus,代碼行數:11,代碼來源:Marriage.php

示例3: insertDetailed

 function insertDetailed($insertInSolr = true)
 {
     $result = parent::insert($insertInSolr);
     if (!$insertInSolr) {
         return $result;
     } else {
         if ($result !== 0) {
             if (!$this->saveToSolr()) {
                 //Could not save to solr
                 return false;
             }
         } else {
             return false;
         }
         return true;
     }
 }
開發者ID:bryandease,項目名稱:VuFind-Plus,代碼行數:17,代碼來源:SolrDataObject.php

示例4: insert

 function insert()
 {
     if (!isset($this->source) || $this->source == '') {
         $this->source = 'VuFind';
     }
     parent::insert();
 }
開發者ID:bryandease,項目名稱:VuFind-Plus,代碼行數:7,代碼來源:Resource.php

示例5: insert

 function insert()
 {
     $result = parent::insert();
     return $result;
 }
開發者ID:Br3nda,項目名稱:laconica,代碼行數:5,代碼來源:Memcached_DataObject.php

示例6: insert

 /**
  * Override the update functionality to save the associated lists
  *
  * @see DB/DB_DataObject::insert()
  */
 public function insert()
 {
     $ret = parent::insert();
     if ($ret === FALSE) {
         return $ret;
     } else {
         $this->saveLists();
     }
     return true;
 }
開發者ID:bryandease,項目名稱:VuFind-Plus,代碼行數:15,代碼來源:ListWidget.php

示例7: insert

 /**
  * Override the update functionality to save the related objects
  *
  * @see DB/DB_DataObject::insert()
  */
 public function insert()
 {
     $ret = parent::insert();
     if ($ret !== FALSE) {
         $this->saveSubBrowseCategories();
     }
     return $ret;
 }
開發者ID:victorfcm,項目名稱:VuFind-Plus,代碼行數:13,代碼來源:BrowseCategory.php

示例8: insert

 function insert()
 {
     parent::insert();
     global $memCache;
     $memCache->delete('loan_rule_determiners');
 }
開發者ID:victorfcm,項目名稱:VuFind-Plus,代碼行數:6,代碼來源:LoanRuleDeterminer.php

示例9: insert

 function insert()
 {
     $this->calcIpRange();
     return parent::insert();
 }
開發者ID:victorfcm,項目名稱:VuFind-Plus,代碼行數:5,代碼來源:subnet.php

示例10: insert

 function insert()
 {
     $this->created = time();
     $this->dateUpdated = time();
     parent::insert();
 }
開發者ID:victorfcm,項目名稱:VuFind-Plus,代碼行數:6,代碼來源:UserList.php

示例11: insert

 function insert()
 {
     $result = $this->trigger('insert');
     switch (true) {
         case $result === 'bypass':
             return true;
             break;
         case $result === 'fail':
             return false;
             break;
         default:
             if (parent::insert()) {
                 DB_DataObject_Pluggable::storeToRegistry($this);
                 $this->trigger('postinsert');
                 return true;
             }
             return false;
     }
 }
開發者ID:demental,項目名稱:m,代碼行數:19,代碼來源:Pluggable.php

示例12: insert

 public function insert()
 {
     // avoid those annoying PEAR::DB strict standards warnings it causes
     $old = error_reporting();
     error_reporting(error_reporting() & ~E_STRICT);
     $res = parent::insert();
     // reset
     error_reporting($old);
     return $res;
 }
開發者ID:bashrc,項目名稱:gnusocial-debian,代碼行數:10,代碼來源:GS_DataObject.php

示例13: insert

 /**
  * Override the update functionality to save the related objects
  *
  * @see DB/DB_DataObject::insert()
  */
 public function insert()
 {
     $ret = parent::insert();
     if ($ret === FALSE) {
         return $ret;
     } else {
         $this->saveHolidays();
         $this->saveNearbyBookStores();
         $this->saveFacets();
         $this->saveSearchSources();
         return $ret;
     }
 }
開發者ID:bryandease,項目名稱:VuFind-Plus,代碼行數:18,代碼來源:Library.php

示例14: insert

 function insert()
 {
     //set default values as needed
     if (!isset($this->homeLocationId)) {
         $this->homeLocationId = 0;
     }
     if (!isset($this->myLocation1Id)) {
         $this->myLocation1Id = 0;
     }
     if (!isset($this->myLocation2Id)) {
         $this->myLocation2Id = 0;
     }
     if (!isset($this->bypassAutoLogout)) {
         $this->bypassAutoLogout = 0;
     }
     parent::insert();
     $this->saveRoles();
 }
開發者ID:bryandease,項目名稱:VuFind-Plus,代碼行數:18,代碼來源:User.php

示例15: insert

 /**
  * Override the update functionality to save the related objects
  *
  * @see DB/DB_DataObject::insert()
  */
 public function insert()
 {
     if (isset($this->showInMainDetails) && is_array($this->showInMainDetails)) {
         // convert array to string before storing in database
         $this->showInMainDetails = serialize($this->showInMainDetails);
     }
     $ret = parent::insert();
     if ($ret !== FALSE) {
         $this->saveHolidays();
         $this->saveNearbyBookStores();
         $this->saveFacets();
         $this->saveSearchSources();
         $this->saveLibraryLinks();
         $this->saveLibraryTopLinks();
         $this->saveBrowseCategories();
         $this->saveMoreDetailsOptions();
     }
     return $ret;
 }
開發者ID:victorfcm,項目名稱:VuFind-Plus,代碼行數:24,代碼來源:Library.php


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