• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP SocialTable类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: store

 public function store($updateNulls = false)
 {
     if (!$this->created) {
         $this->created = FD::get('Date', 'now', false)->toMySQL();
     }
     return parent::store();
 }
开发者ID:ppantilla,项目名称:bbninja,代码行数:7,代码来源:conversationattachment.php


示例2: store

 public function store($updateNulls = false)
 {
     if (empty($this->ordering)) {
         $this->ordering = $this->getNextOrder('type = ' . FD::db()->quote($this->type) . ' AND parent_uid = ' . FD::db()->quote($this->parent_uid));
     }
     parent::store($updateNulls);
 }
开发者ID:ppantilla,项目名称:bbninja,代码行数:7,代码来源:region.php


示例3: delete

 /**
  * Overrides the delete function
  *
  * @since	1.0
  * @access	public
  * @return	bool
  */
 public function delete($pk = null)
 {
     $state = parent::delete();
     // Delete any items that are related to this stream
     $stream = FD::stream();
     $stream->delete($this->id, 'feeds');
     return $state;
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:15,代码来源:rss.php


示例4: store

 public function store($updateNulls = false)
 {
     if (empty($this->value) && !empty($this->title)) {
         $this->value = JString::strtolower(JString::str_ireplace(' ', '', $this->title));
     }
     if (empty($this->title) && !empty($this->value)) {
         $this->title = JString::ucfirst($this->value);
     }
     return parent::store($updateNulls);
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:10,代码来源:fieldoptions.php


示例5: load

 /**
  * Override parent's load implementation
  *
  * @since   1.0
  * @access  public
  * @param   int     The unique row id.
  * @param   bool    True to reset the default values before loading the new row.
  *
  * @author  Mark Lee <[email protected]>
  */
 public function load($key = null, $reset = true)
 {
     $state = parent::load($key, $reset);
     // @rule: We want to see which steps the user has already walked through.
     if (empty($this->step_access)) {
         $this->step_access = array();
     }
     if (!empty($this->step_access) && is_string($this->step_access)) {
         $this->step_access = explode(',', $this->step_access);
     }
     return $state;
 }
开发者ID:BetterBetterBetter,项目名称:B3App,代码行数:22,代码来源:stepsession.php


示例6: load

 public function load($uid = null, $userId = null, $type = SOCIAL_STREAM_HIDE_TYPE_STREAM)
 {
     if (empty($uid) || empty($userId)) {
         return false;
     }
     $db = FD::db();
     $query = 'select `id` from `#__social_stream_hide`';
     $query .= ' where `user_id` = ' . $db->Quote($userId);
     $query .= ' and `uid` = ' . $db->Quote($uid);
     $query .= ' and `type` = ' . $db->Quote($type);
     $db->setQuery($query);
     $id = $db->loadResult();
     return parent::load($id);
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:14,代码来源:streamhide.php


示例7: loadByUser

 /**
  * Load a particular record given the user's id.
  *
  * @since	1.0
  * @access	public
  * @param	int		The user's id.
  */
 public function loadByUser($userId)
 {
     $db = FD::db();
     $query = array();
     $query[] = 'SELECT * FROM ' . $db->nameQuote($this->_tbl);
     $query[] = 'WHERE ' . $db->nameQuote('user_id') . '=' . $db->Quote($userId);
     $query = implode(' ', $query);
     $db->setQuery($query);
     $result = $db->loadObject();
     if (!$result) {
         return false;
     }
     return parent::bind($result);
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:21,代码来源:profilemap.php


示例8: loadByRelation

 public function loadByRelation($creator, $recipient, $type)
 {
     $db = FD::db();
     $query = 'SELECT COUNT(1) AS related,b.* FROM ' . $db->nameQuote('#__social_conversations_participants') . ' AS a ' . 'INNER JOIN ' . $db->nameQuote($this->_tbl) . ' AS b ' . 'ON b.' . $db->nameQuote('id') . ' = a.' . $db->nameQuote('conversation_id') . ' ' . 'WHERE ( ' . 'a.' . $db->nameQuote('user_id') . ' = ' . $db->Quote($creator) . ' ' . 'OR ' . 'a.' . $db->nameQuote('user_id') . ' = ' . $db->Quote($recipient) . ' ' . ') ' . 'AND b.' . $db->nameQuote('type') . ' = ' . $db->Quote($type) . ' ' . 'GROUP BY a.' . $db->nameQuote('conversation_id');
     // echo $query;exit;
     $db->setQuery($query);
     $data = $db->loadObject();
     if (!isset($data->related)) {
         return false;
     }
     if ($data->related >= 2) {
         return parent::bind($data);
     }
     return false;
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:15,代码来源:conversation.php


示例9: store

 public function store($updateNulls = false)
 {
     if (empty($this->ordering)) {
         $this->ordering = $this->getNextOrder('type = ' . FD::db()->quote($this->type) . ' AND parent_uid = ' . FD::db()->quote($this->parent_uid));
     }
     if (empty($this->uid)) {
         $db = FD::db();
         $sql = $db->sql();
         $sql->raw("SELECT MAX(`uid`) FROM `#__social_regions` WHERE `type` = " . $db->q($this->type));
         $db->setQuery($sql);
         $result = (int) $db->loadResult();
         $this->uid = $result + 1;
     }
     parent::store($updateNulls);
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:15,代码来源:region.php


示例10: store

 public function store($updateNulls = false)
 {
     $now = FD::date();
     // Set created to now by default
     if (empty($this->created)) {
         $this->created = $now->toSql();
     }
     // Set expired to 1 day later by default
     if (empty($this->expired)) {
         $this->expired = FD::date($now->toUnix() + 24 * 60 * 60)->toSql();
     }
     if (is_array($this->value) || is_object($this->value)) {
         $this->value = FD::json()->encode($this->value);
     }
     return parent::store($updateNulls);
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:16,代码来源:tmp.php


示例11: loadByAlertId

 public function loadByAlertId($alert_id, $user_id = null)
 {
     if (is_null($user_id)) {
         $user_id = FD::user()->id;
     }
     $db = FD::db();
     $sql = $db->sql();
     $sql->select('#__social_alert_map');
     $sql->where('alert_id', $alert_id);
     $sql->where('user_id', $user_id);
     $db->setQuery($sql);
     $result = $db->loadObject();
     if (!$result) {
         return false;
     }
     return parent::bind($result);
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:17,代码来源:alertmap.php


示例12: load

 /**
  * Override parent's load implementation
  *
  * @since	1.0
  * @access	public
  * @param	int		The unique row id.
  * @param   bool	True to reset the default values before loading the new row.
  *
  * @author	Mark Lee <[email protected]>
  */
 public function load($key = null, $reset = true)
 {
     $state = parent::load($key, $reset);
     // If state is false, then we create the session here
     if (!$state) {
         $session = JFactory::getSession();
         $this->session_id = $session->getId();
         $this->created = FD::date()->toSql();
         $state = $this->store();
     }
     // @rule: We want to see which steps the user has already walked through.
     if (empty($this->step_access)) {
         $this->step_access = array();
     }
     if (!empty($this->step_access) && is_string($this->step_access)) {
         $this->step_access = explode(',', $this->step_access);
     }
     return $state;
 }
开发者ID:BetterBetterBetter,项目名称:B3App,代码行数:29,代码来源:registration.php


示例13: load

 public function load($uid = null, $utype = '', $component = 'com_easysocial')
 {
     if (empty($uid)) {
         return false;
     }
     if ($utype) {
         $db = FD::db();
         $query = 'select * from ' . $db->nameQuote('#__social_indexer');
         $query .= ' where ' . $db->nameQuote('uid') . ' = ' . $db->Quote($uid);
         $query .= ' and ' . $db->nameQuote('utype') . ' = ' . $db->Quote($utype);
         $query .= ' and ' . $db->nameQuote('component') . ' = ' . $db->Quote($component);
         $db->setQuery($query);
         $result = $db->loadObject();
         if (!$result) {
             return false;
         }
         parent::bind($result);
     } else {
         parent::load($uid);
     }
     return true;
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:22,代码来源:indexer.php


示例14: __construct

 public function __construct($db)
 {
     parent::__construct('#__social_subscriptions', 'id', $db);
 }
开发者ID:ppantilla,项目名称:bbninja,代码行数:4,代码来源:subscription.php


示例15: store

 /**
  * Override's parent's behavior of store.
  *
  * @since	1.0
  * @access	public
  * @param	string
  * @return
  */
 public function store($updateNulls = false)
 {
     $state = parent::store();
     return $state;
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:13,代码来源:streamitem.php


示例16: __construct

 /**
  * Class Constructor
  *
  * @since	1.0
  * @param	JDatabase
  */
 public function __construct($db)
 {
     parent::__construct('#__social_covers', 'id', $db);
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:10,代码来源:cover.php


示例17: __construct

 /**
  * Class Constructor.
  *
  * @since	1.0
  * @access	public
  */
 public function __construct(&$db)
 {
     parent::__construct('#__social_apps_calendar', 'id', $db);
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:10,代码来源:calendar.php


示例18: delete

 /**
  * Overrides parent's delete behavior
  *
  * @since	1.0
  * @access	public
  * @param	string
  * @return
  */
 public function delete($pk = null)
 {
     $state = parent::delete($pk);
     // Delete streams that are related to this note.
     $stream = FD::stream();
     $stream->delete($this->id, 'notes');
     return $state;
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:16,代码来源:note.php


示例19: delete

 /**
  * Override parent's delete behavior
  *
  * @since   1.2
  * @access  public
  * @param   string
  * @return
  */
 public function delete($pk = null)
 {
     $state = parent::delete($pk);
     if (!$state) {
         return false;
     }
     // Delete all existing create access for this category first.
     FD::model('ClusterCategory')->deleteAccess($this->id);
     // Delete this categories fields.
     FD::model('Fields')->deleteFields($this->id, SOCIAL_TYPE_CLUSTERS);
     return $state;
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:20,代码来源:clustercategory.php


示例20: __construct

 public function __construct(&$db)
 {
     parent::__construct('#__social_events_meta', 'id', $db);
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:4,代码来源:eventmeta.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP Societe类代码示例发布时间:2022-05-23
下一篇:
PHP SocialManager类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap