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


PHP SocialTable类代码示例

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


在下文中一共展示了SocialTable类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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 <mark@stackideas.com>
  */
 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 <mark@stackideas.com>
  */
 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


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