当前位置: 首页>>代码示例>>PHP>>正文


PHP oxBase::_update方法代码示例

本文整理汇总了PHP中oxBase::_update方法的典型用法代码示例。如果您正苦于以下问题:PHP oxBase::_update方法的具体用法?PHP oxBase::_update怎么用?PHP oxBase::_update使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在oxBase的用法示例。


在下文中一共展示了oxBase::_update方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: _update

 /**
  * We need to check if we unsubscribe here
  *
  * @return mixed oxid on success or false on failure
  */
 protected function _update()
 {
     if (($this->_blWasSubscribed || $this->_blWasPreSubscribed) && !$this->oxnewssubscribed__oxdboptin->value) {
         // set unsubscription date
         $this->oxnewssubscribed__oxunsubscribed->setValue(date('Y-m-d H:i:s'));
         // 0001974 Same object can be called many times without requiring to renew date.
         // If so happens, it would have _aSkipSaveFields set to skip date field. So need to check and
         // release if _aSkipSaveFields are set for field oxunsubscribed.
         $aSkipSaveFieldsKeys = array_keys($this->_aSkipSaveFields, 'oxunsubscribed');
         foreach ($aSkipSaveFieldsKeys as $iSkipSaveFieldKey) {
             unset($this->_aSkipSaveFields[$iSkipSaveFieldKey]);
         }
     } else {
         // don't update date
         $this->_aSkipSaveFields[] = 'oxunsubscribed';
     }
     return parent::_update();
 }
开发者ID:JulianaSchuster,项目名称:oxid-frontend,代码行数:23,代码来源:oxnewssubscribed.php

示例2: _update

 /**
  * Updates payment record in DB. Returns update status.
  *
  * @return bool
  */
 protected function _update()
 {
     //encode sensitive data
     if ($sValue = $this->oxuserpayments__oxvalue->value) {
         // Function is called from inside a transaction in Category::save (see ESDEV-3804 and ESDEV-3822).
         // No need to explicitly force master here.
         $database = oxDb::getDb();
         $sEncodedValue = $database->getOne("select encode( " . $database->quote($sValue) . ", '" . $this->getPaymentKey() . "' )");
         $this->oxuserpayments__oxvalue->setValue($sEncodedValue);
     }
     $blRet = parent::_update();
     //restore, as encoding was needed only for saving
     if ($sEncodedValue) {
         $this->oxuserpayments__oxvalue->setValue($sValue);
     }
     return $blRet;
 }
开发者ID:Alpha-Sys,项目名称:oxideshop_ce,代码行数:22,代码来源:UserPayment.php

示例3: update

 /**
  * Force update.
  *
  * @return mixed
  */
 public function update()
 {
     return parent::_update();
 }
开发者ID:Crease29,项目名称:oxideshop_ce,代码行数:9,代码来源:oxbaseTest.php

示例4: _update

 /**
  * Updates payment record in DB. Returns update status.
  *
  * @return bool
  */
 protected function _update()
 {
     $oDb = oxDb::getDb();
     //encode sensitive data
     if ($sValue = $this->oxuserpayments__oxvalue->value) {
         $sEncodedValue = $oDb->getOne("select encode( " . $oDb->quote($sValue) . ", '" . $this->getPaymentKey() . "' )", false, false);
         $this->oxuserpayments__oxvalue->setValue($sEncodedValue);
     }
     $blRet = parent::_update();
     //restore, as encoding was needed only for saving
     if ($sEncodedValue) {
         $this->oxuserpayments__oxvalue->setValue($sValue);
     }
     return $blRet;
 }
开发者ID:ioanok,项目名称:symfoxid,代码行数:20,代码来源:oxuserpayment.php

示例5: _update

 /**
  * Update this Object into the database, this function only works on
  * the main table, it will not save any dependend tables, which might
  * be loaded through oxlist (with exception of the active language set
  * table, which will be updated).
  *
  * @throws oxObjectException Throws on failure inserting
  *
  * @return bool
  */
 protected function _update()
 {
     $blRet = parent::_update();
     if ($blRet) {
         //also update multilang table if it is separate
         $aUpdateTables = array();
         if ($this->_blEmployMultilanguage) {
             $sCoreTable = $this->getCoreTableName();
             $sLangTable = getLangTableName($sCoreTable, $this->getLanguage());
             if ($sCoreTable != $sLangTable) {
                 $aUpdateTables[] = $sLangTable;
             }
         } else {
             $aUpdateTables = $this->_getLanguageSetTables();
         }
         foreach ($aUpdateTables as $sLangTable) {
             $sUpdate = "insert into {$sLangTable} set " . $this->_getUpdateFieldsForTable($sLangTable, $this->getUseSkipSaveFields()) . " on duplicate key update " . $this->_getUpdateFieldsForTable($sLangTable);
             $blRet = (bool) oxDb::getDb()->execute($sUpdate);
         }
     }
     // currently only multilanguage objects are SEO
     // if current object is managed by SEO and SEO is ON
     if ($blRet && $this->_blIsSeoObject && $this->getUpdateSeo() && $this->isAdmin()) {
         // marks all object db entries as expired
         oxRegistry::get("oxSeoEncoder")->markAsExpired($this->getId(), null, 1, $this->getLanguage());
     }
     return $blRet;
 }
开发者ID:Crease29,项目名称:oxideshop_ce,代码行数:38,代码来源:I18n.php

示例6: _update

 /**
  * Updates changed user object data to DB. Returns true on success.
  *
  * @return bool
  */
 protected function _update()
 {
     //V #M418: for not registered users, don't change boni during update
     if (!$this->oxuser__oxpassword->value && $this->oxuser__oxregister->value < 1) {
         $this->_aSkipSaveFields[] = 'oxboni';
     }
     // don't change this field
     $this->_aSkipSaveFields[] = 'oxcreate';
     if (!$this->isAdmin()) {
         $this->_aSkipSaveFields[] = 'oxcustnr';
         $this->_aSkipSaveFields[] = 'oxrights';
     }
     // updating subscription information
     if ($blUpdate = parent::_update()) {
         $this->getNewsSubscription()->updateSubscription($this);
     }
     return $blUpdate;
 }
开发者ID:Alpha-Sys,项目名称:oxideshop_ce,代码行数:23,代码来源:User.php

示例7: _update

 /**
  * Updates object parameters to DB.
  *
  * @return null
  */
 protected function _update()
 {
     $this->_aSkipSaveFields = array('oxtimestamp', 'oxorderdate');
     $this->oxorder__oxsenddate = new oxField(oxRegistry::get("oxUtilsDate")->formatDBDate($this->oxorder__oxsenddate->value, true));
     return parent::_update();
 }
开发者ID:Alpha-Sys,项目名称:oxideshop_ce,代码行数:11,代码来源:Order.php

示例8: _update

 /**
  * Updates object parameters to DB.
  *
  * @return null
  */
 protected function _update()
 {
     $this->oxorder__oxsenddate = new oxField(oxUtilsDate::getInstance()->formatDBDate($this->oxorder__oxsenddate->value, true));
     return parent::_update();
 }
开发者ID:JulianaSchuster,项目名称:oxid-frontend,代码行数:10,代码来源:oxorder.php


注:本文中的oxBase::_update方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。