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


PHP ShoppDatabaseObject::save方法代码示例

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


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

示例1: save

 /**
  * Save the object back to the database
  *
  * @author Jonathan Davis
  * @since 1.1
  *
  * @return void
  **/
 function save()
 {
     if (!empty($this->_xcols)) {
         $value = new stdClass();
         foreach ((array) $this->_xcols as $col) {
             $value->{$col} = $this->{$col};
         }
         $this->value = $value;
     }
     parent::save();
 }
开发者ID:forthrobot,项目名称:inuvik,代码行数:19,代码来源:Meta.php

示例2: save

 public function save()
 {
     $addons = $this->addons;
     // Save current addons model
     if (!empty($addons) && is_array($addons)) {
         $this->addons = 'yes';
     }
     // convert property to usable flag
     parent::save();
     if (!empty($addons) && is_array($addons)) {
         foreach ($addons as $Addon) {
             $Addon->parent = $this->id;
             $Addon->save();
         }
     }
     $this->addons = $addons;
     // restore addons model
 }
开发者ID:forthrobot,项目名称:inuvik,代码行数:18,代码来源:Purchased.php

示例3: save

 /**
  * Saves updates or creates records for the defined object properties
  *
  * @author Jonathan Davis
  * @since 1.2
  *
  * @return void
  **/
 function save()
 {
     $this->value = array();
     foreach ($this->_settings as $property) {
         if (!isset($this->{$property})) {
             continue;
         }
         $this->value[$property] = $this->{$property};
     }
     parent::save();
 }
开发者ID:forthrobot,项目名称:inuvik,代码行数:19,代码来源:Membership.php

示例4: save

 public function save()
 {
     $new = false;
     if (empty($this->id)) {
         $new = true;
     }
     if (!empty($this->card)) {
         $this->card = PayCard::truncate($this->card);
     }
     parent::save();
 }
开发者ID:borkweb,项目名称:shopp,代码行数:11,代码来源:Purchase.php

示例5: save

 /**
  * Adds the save_post event to Shopp custom post saves
  *
  * @author Jonathan Davis
  * @since 1.2
  *
  * @return void
  **/
 function save()
 {
     parent::save();
     do_action('save_post', $this->id, get_post($this->id));
 }
开发者ID:crunnells,项目名称:shopp,代码行数:13,代码来源:DB.php

示例6: save

 /**
  * Save the record to the database
  *
  * @author Jonathan Davis
  * @since 1.2
  *
  * @return void
  **/
 public function save()
 {
     if (empty($this->password)) {
         // Do not save empty password updates
         unset($this->password);
     }
     parent::save();
     if (empty($this->info) || !is_array($this->info)) {
         return true;
     }
     foreach ((array) $this->info as $name => $value) {
         $Meta = new ShoppMetaObject(array('parent' => $this->id, 'context' => 'customer', 'type' => 'meta', 'name' => $name));
         $Meta->parent = $this->id;
         $Meta->context = 'customer';
         $Meta->type = 'meta';
         $Meta->name = $name;
         $Meta->value = $value;
         $Meta->save();
     }
 }
开发者ID:BlessySoftwares,项目名称:anvelocom,代码行数:28,代码来源:Customer.php

示例7: save

 /**
  * Process content into an index and save it
  *
  * @author Jonathan Davis
  * @since 1.1
  *
  * @param string $content The content to index
  * @return void
  **/
 function save()
 {
     list($content, ) = func_get_args();
     $content = apply_filters('shopp_index_content', $content, $this);
     if (empty($this->product) || empty($this->type) || empty($content)) {
         return false;
     }
     $factoring = Lookup::index_factors();
     if (isset($factoring[$this->type])) {
         $this->factor = $factoring[$this->type];
     } else {
         $this->factor = 1;
     }
     $this->terms = $content;
     parent::save();
 }
开发者ID:forthrobot,项目名称:inuvik,代码行数:25,代码来源:Search.php


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