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