当前位置: 首页>>代码示例>>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;未经允许,请勿转载。