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


PHP oxBase::_insert方法代码示例

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


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

示例1: _insert

 /**
  * Inserts object data fields in DB. Returns true on success.
  *
  * @return bool
  */
 protected function _insert()
 {
     // set oxcreate
     $sNow = date('Y-m-d H:i:s', oxRegistry::get("oxUtilsDate")->getTime());
     $this->oxremark__oxcreate = new oxField($sNow, oxField::T_RAW);
     $this->oxremark__oxheader = new oxField($sNow, oxField::T_RAW);
     return parent::_insert();
 }
开发者ID:Crease29,项目名称:oxideshop_ce,代码行数:13,代码来源:oxremark.php

示例2: _insert

 /**
  * Inserts object data to DB, returns true on success.
  *
  * @return mixed
  */
 protected function _insert()
 {
     // marking basket as not new any more
     $this->_blNewBasket = false;
     if (!isset($this->oxuserbaskets__oxpublic->value)) {
         $this->oxuserbaskets__oxpublic = new oxField(1, oxField::T_RAW);
     }
     $iTime = oxRegistry::get("oxUtilsDate")->getTime();
     $this->oxuserbaskets__oxupdate = new oxField($iTime);
     return parent::_insert();
 }
开发者ID:Crease29,项目名称:oxideshop_ce,代码行数:16,代码来源:oxuserbasket.php

示例3: _insert

 /**
  * Inserts nbews object data to DB. Returns true on success.
  *
  * @return mixed oxid on success or false on failure
  */
 protected function _insert()
 {
     // set subscription date
     $this->oxnewssubscribed__oxsubscribed = new oxField(date('Y-m-d H:i:s'), oxField::T_RAW);
     return parent::_insert();
 }
开发者ID:JulianaSchuster,项目名称:oxid-frontend,代码行数:11,代码来源:oxnewssubscribed.php

示例4: insert

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

示例5: _insert

 /**
  * Sets article creation date
  * (oxorderarticle::oxorderarticles__oxtimestamp). Then executes parent method
  * parent::_insert() and returns insertion status.
  *
  * @return bool
  */
 protected function _insert()
 {
     $iInsertTime = time();
     $now = date('Y-m-d H:i:s', $iInsertTime);
     $this->oxorderarticles__oxtimestamp = new oxField($now);
     return parent::_insert();
 }
开发者ID:Alpha-Sys,项目名称:oxideshop_ce,代码行数:14,代码来源:OrderArticle.php

示例6: _insert

 /**
  * Inserts payment information to DB. Returns insert status.
  *
  * @return bool
  */
 protected function _insert()
 {
     // we do not store credit card information
     // check and in case skip it
     if (!$this->getStoreCreditCardInfo() && $this->oxuserpayments__oxpaymentsid->value == 'oxidcreditcard') {
         return true;
     }
     //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::_insert();
     //restore, as encoding was needed only for saving
     if ($sEncodedValue) {
         $this->oxuserpayments__oxvalue->setValue($sValue);
     }
     return $blRet;
 }
开发者ID:Alpha-Sys,项目名称:oxideshop_ce,代码行数:27,代码来源:UserPayment.php

示例7: _insert

 /**
  * Inserts new guestbook entry. Returns true on success.
  *
  * @return bool
  */
 protected function _insert()
 {
     // set oxcreate
     $this->oxgbentries__oxcreate = new oxField(date('Y-m-d H:i:s', oxUtilsDate::getInstance()->getTime()));
     return parent::_insert();
 }
开发者ID:JulianaSchuster,项目名称:oxid-frontend,代码行数:11,代码来源:oxgbentry.php

示例8: _insert

 /**
  * Inserts object data into DB, returns true on success.
  *
  * @return bool
  */
 protected function _insert()
 {
     // set oxinsert value
     $this->oxpricealarm__oxinsert = new oxField(date('Y-m-d', oxRegistry::get("oxUtilsDate")->getTime()));
     return parent::_insert();
 }
开发者ID:mibexx,项目名称:oxid_yttutorials,代码行数:11,代码来源:oxpricealarm.php

示例9: _insert

 /**
  * Inserts payment information to DB. Returns insert status.
  *
  * @return bool
  */
 protected function _insert()
 {
     // we do not store credit card information
     // check and in case skip it
     if (!$this->getStoreCreditCardInfo() && $this->oxuserpayments__oxpaymentsid->value == 'oxidcreditcard') {
         return true;
     }
     //encode sensitive data
     if ($sValue = $this->oxuserpayments__oxvalue->value) {
         $oDb = oxDb::getDb();
         $sEncodedValue = $oDb->getOne("select encode( " . $oDb->quote($sValue) . ", '" . $this->getPaymentKey() . "' )", false, false);
         $this->oxuserpayments__oxvalue->setValue($sEncodedValue);
     }
     $blRet = parent::_insert();
     //restore, as encoding was needed only for saving
     if ($sEncodedValue) {
         $this->oxuserpayments__oxvalue->setValue($sValue);
     }
     return $blRet;
 }
开发者ID:ioanok,项目名称:symfoxid,代码行数:25,代码来源:oxuserpayment.php

示例10: _insert

 /**
  * Inserts user object data to DB. Returns true on success.
  *
  * @return bool
  */
 protected function _insert()
 {
     // set oxcreate date
     $this->oxuser__oxcreate = new oxField(date('Y-m-d H:i:s'), oxField::T_RAW);
     if (!isset($this->oxuser__oxboni->value)) {
         $this->oxuser__oxboni = new oxField($this->getBoni(), oxField::T_RAW);
     }
     return parent::_insert();
 }
开发者ID:Alpha-Sys,项目名称:oxideshop_ce,代码行数:14,代码来源:User.php

示例11: _insert

 /**
  * Insert 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.
  *
  * @return bool
  */
 protected function _insert()
 {
     $blRet = parent::_insert();
     if ($blRet) {
         //also insert to multilang tables if it is separate
         foreach ($this->_getLanguageSetTables() as $sTable) {
             $sSq = "insert into {$sTable} set " . $this->_getUpdateFieldsForTable($sTable, $this->getUseSkipSaveFields());
             $blRet = $blRet && (bool) oxDb::getDb()->execute($sSq);
         }
     }
     return $blRet;
 }
开发者ID:Crease29,项目名称:oxideshop_ce,代码行数:19,代码来源:I18n.php

示例12: _insert

 /**
  * Inserts object data fiels in DB. Returns true on success.
  *
  * @return bool
  */
 protected function _insert()
 {
     // set oxcreate
     $this->oxreviews__oxcreate = new oxField(date('Y-m-d H:i:s', oxRegistry::get("oxUtilsDate")->getTime()));
     return parent::_insert();
 }
开发者ID:Alpha-Sys,项目名称:oxideshop_ce,代码行数:11,代码来源:Review.php

示例13: _insert

 /**
  * Inserts order object information in DB. Returns true on success.
  *
  * @return bool
  */
 protected function _insert()
 {
     $myConfig = $this->getConfig();
     $oUtilsDate = oxRegistry::get("oxUtilsDate");
     //V #M525 orderdate must be the same as it was
     if (!$this->oxorder__oxorderdate->value) {
         $this->oxorder__oxorderdate = new oxField(date('Y-m-d H:i:s', $oUtilsDate->getTime()), oxField::T_RAW);
     } else {
         $this->oxorder__oxorderdate = new oxField($oUtilsDate->formatDBDate($this->oxorder__oxorderdate->value, true));
     }
     $this->oxorder__oxshopid = new oxField($myConfig->getShopId(), oxField::T_RAW);
     $this->oxorder__oxsenddate = new oxField($oUtilsDate->formatDBDate($this->oxorder__oxsenddate->value, true));
     $blInsert = parent::_insert();
     return $blInsert;
 }
开发者ID:Alpha-Sys,项目名称:oxideshop_ce,代码行数:20,代码来源:Order.php

示例14: _insert

 /**
  * Insert 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.
  *
  * @return bool
  */
 protected function _insert()
 {
     $result = parent::_insert();
     if ($result) {
         //also insert to multilang tables if it is separate
         foreach ($this->_getLanguageSetTables() as $table) {
             $sql = "insert into {$table} set " . $this->_getUpdateFieldsForTable($table, $this->getUseSkipSaveFields());
             $result = $result && (bool) $this->executeDatabaseQuery($sql);
         }
     }
     return $result;
 }
开发者ID:Alpha-Sys,项目名称:oxideshop_ce,代码行数:19,代码来源:MultiLanguageModel.php

示例15: _insert

 /**
  * Inserts order object information in DB. Returns true on success.
  *
  * @return bool
  */
 protected function _insert()
 {
     $myConfig = $this->getConfig();
     $oUtilsDate = oxUtilsDate::getInstance();
     //V #M525 orderdate must be the same as it was
     if (!$this->oxorder__oxorderdate->value) {
         $this->oxorder__oxorderdate = new oxField(date('Y-m-d H:i:s', $oUtilsDate->getTime()), oxField::T_RAW);
     } else {
         $this->oxorder__oxorderdate = new oxField($oUtilsDate->formatDBDate($this->oxorder__oxorderdate->value, true));
     }
     $this->oxorder__oxshopid = new oxField($myConfig->getShopId(), oxField::T_RAW);
     $this->oxorder__oxsenddate = new oxField($oUtilsDate->formatDBDate($this->oxorder__oxsenddate->value, true));
     if ($blInsert = parent::_insert()) {
         // setting order number
         if (!$this->oxorder__oxordernr->value) {
             $aWhere = '';
             // separate order numbers for shops ...
             if ($this->_blSeparateNumbering) {
                 $aWhere = array('oxshopid = "' . $myConfig->getShopId() . '"');
             }
             $this->_setRecordNumber('oxordernr', $aWhere);
         }
     }
     return $blInsert;
 }
开发者ID:JulianaSchuster,项目名称:oxid-frontend,代码行数:30,代码来源:oxorder.php


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