當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。