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


PHP ElggEntity::update方法代碼示例

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


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

示例1: update

 /**
  * {@inheritdoc}
  */
 protected function update()
 {
     global $CONFIG;
     if (!parent::update()) {
         return false;
     }
     $guid = (int) $this->guid;
     $title = sanitize_string($this->title);
     $description = sanitize_string($this->description);
     $query = "UPDATE {$CONFIG->dbprefix}objects_entity\n\t\t\tset title='{$title}', description='{$description}' where guid={$guid}";
     return $this->getDatabase()->updateData($query) !== false;
 }
開發者ID:thehereward,項目名稱:Elgg,代碼行數:15,代碼來源:ElggObject.php

示例2: update

 /**
  * {@inheritdoc}
  */
 protected function update()
 {
     global $CONFIG;
     if (!parent::update()) {
         return false;
     }
     $guid = (int) $this->guid;
     $name = sanitize_string($this->name);
     $username = sanitize_string($this->username);
     $password = sanitize_string($this->password);
     $salt = sanitize_string($this->salt);
     $email = sanitize_string($this->email);
     $language = sanitize_string($this->language);
     $query = "UPDATE {$CONFIG->dbprefix}users_entity\n\t\t\tSET name='{$name}', username='{$username}', password='{$password}', salt='{$salt}',\n\t\t\temail='{$email}', language='{$language}'\n\t\t\tWHERE guid = {$guid}";
     return $this->getDatabase()->updateData($query) !== false;
 }
開發者ID:sephiroth88,項目名稱:Elgg,代碼行數:19,代碼來源:ElggUser.php

示例3: update

 /**
  * {@inheritdoc}
  */
 protected function update()
 {
     if (!parent::update()) {
         return false;
     }
     $dbprefix = elgg_get_config('dbprefix');
     $query = "\n\t\t\tUPDATE {$dbprefix}objects_entity\n\t\t\tSET title = :title,\n\t\t\t\tdescription = :description\n\t\t\tWHERE guid = :guid\n\t\t";
     $params = [':guid' => $this->guid, ':title' => (string) $this->title, ':description' => (string) $this->description];
     return $this->getDatabase()->updateData($query, false, $params) !== false;
 }
開發者ID:elgg,項目名稱:elgg,代碼行數:13,代碼來源:ElggObject.php

示例4: update

 /**
  * {@inheritdoc}
  */
 protected function update()
 {
     global $CONFIG;
     if (!parent::update()) {
         return false;
     }
     $guid = (int) $this->guid;
     $name = sanitize_string($this->name);
     $description = sanitize_string($this->description);
     $url = sanitize_string($this->url);
     $query = "UPDATE {$CONFIG->dbprefix}sites_entity\n\t\t\tSET name='{$name}', description='{$description}', url='{$url}' WHERE guid={$guid}";
     return $this->getDatabase()->updateData($query) !== false;
 }
開發者ID:Twizanex,項目名稱:GuildWoW,代碼行數:16,代碼來源:ElggSite.php

示例5: update

 /** @override */
 protected function update()
 {
     global $CONFIG;
     if (!parent::update()) {
         return false;
     }
     $guid = (int) $this->guid;
     $name = sanitize_string($this->name);
     $description = sanitize_string($this->description);
     $query = "UPDATE {$CONFIG->dbprefix}groups_entity set" . " name='{$name}', description='{$description}' where guid={$guid}";
     return update_data($query) !== false;
 }
開發者ID:nogsus,項目名稱:Elgg,代碼行數:13,代碼來源:ElggGroup.php


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