當前位置: 首頁>>代碼示例>>PHP>>正文


PHP DatabaseObject::save方法代碼示例

本文整理匯總了PHP中DatabaseObject::save方法的典型用法代碼示例。如果您正苦於以下問題:PHP DatabaseObject::save方法的具體用法?PHP DatabaseObject::save怎麽用?PHP DatabaseObject::save使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在DatabaseObject的用法示例。


在下文中一共展示了DatabaseObject::save方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: setObjectStatusAction

 public static function setObjectStatusAction(DatabaseObject &$object, $action)
 {
     if ($action == 'publish') {
         $object->sendLive();
         $object->save();
     } else {
         if ($action == 'unpublish') {
             $object->sendBackToDraft();
             //echo "object sent back to draft";
             $object->save();
         } else {
             if ($action == 'delete') {
                 $object->delete();
             }
         }
     }
 }
開發者ID:vinnivinsachi,項目名稱:Vincent-DR,代碼行數:17,代碼來源:StaticUtility.php

示例2: save

 public function save()
 {
     //We have added the name attribute after the fact, and here, we are cleaning it up
     unset($this->attributes["shortName"]);
     unset($this->attributesNames["shortName"]);
     unset($this->attributes["subjectText"]);
     unset($this->attributesNames["subjectText"]);
     parent::save();
 }
開發者ID:jcraitz,項目名稱:resources,代碼行數:9,代碼來源:Downtime.php

示例3: save

	function save() {
		$addons = $this->addons;					// Save current addons model
		if (!empty($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:robbiespire,項目名稱:paQui,代碼行數:12,代碼來源:Purchased.php

示例4: save

	function save () {
		parent::save();

		if (empty($this->info) || !is_array($this->info)) return true;
		foreach ((array)$this->info as $name => $value) {
			$Meta = new MetaObject(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:robbiespire,項目名稱:paQui,代碼行數:19,代碼來源:Customer.php

示例5: save

	/**
	 * Process content into an index and save it
	 *	 
	 * @since 1.1
	 *
	 * @return void Description...
	 **/
	function save ($content) {
		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 = apply_filters('ecart_index_content',$content);

		parent::save();
	}
開發者ID:robbiespire,項目名稱:paQui,代碼行數:19,代碼來源:Search.php


注:本文中的DatabaseObject::save方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。