OPEN SOURCE SOCIAL NETWORK 6.6
Loading...
Searching...
No Matches
OssnMessages Class Reference
Inheritance diagram for OssnMessages:
OssnEntities OssnDatabase OssnBase OssnSession OssnChat

Public Member Functions

 __construct ()
 
 send ($from, $to, $message)
 
 markViewed ($from, $to)
 
 getNew ($from, $to, $viewed=0)
 
 recentChat ($to, $count=false)
 
 getWith ($from, $to, $count=false)
 
 get ($from, $to)
 
 recentSent ($from)
 
 countUNREAD ($to)
 
 getMessage ($id)
 
 deleteUser ($guid)
 
 searchMessages (array $params=array())
 
 save ()
 
- Public Member Functions inherited from OssnEntities
 add ()
 
 get_entity ()
 
 save ()
 
 get_entities ()
 
 AddedEntityGuid ()
 
 updateEntity ()
 
 deleteByOwnerGuid ($guid, $type)
 
 deleteEntity ($guid='')
 
 searchEntities (array $params=array())
 
 canChange ($user='')
 
 destruct ()
 
- Public Member Functions inherited from OssnDatabase
 __construct ()
 
 Connect ()
 
 insert ($params)
 
 statement ($query)
 
 execute ($values=array())
 
 update ($params=array())
 
 select ($params, $multi='')
 
 fetch ($data=false)
 
 delete ($params)
 
 getLastEntry ()
 
 constructWheres (array $array, $operator="AND")
 
 generateLimit ($data_limit=false, $page_limit=false, $offset=false)
 
 clearVars ()
 
 __destruct ()
 
- Public Member Functions inherited from OssnBase
 getGUID ()
 
 getID ()
 
 getParam ($param)
 
 isParam ($param)
 
 __call ($method, $args)
 

Additional Inherited Members

- Static Public Member Functions inherited from OssnSession
static start ()
 
static assign ($name='', $value='')
 
static unassign ($name='')
 
static isSession ($name='')
 
static getSession ($name='')
 

Constructor & Destructor Documentation

◆ __construct()

__construct ( )

Initialize the objects.

Returns
void

Reimplemented from OssnDatabase.

Member Function Documentation

◆ countUNREAD()

countUNREAD (   $to)

Count unread messages

@params integer $to Users guid

Returns
object

◆ deleteUser()

deleteUser (   $guid)

Delete users all messages. This will also delete someone else message to this user.

@params integer $guid User guid.

Returns
boolean

◆ get()

get (   $from,
  $to 
)

Get messages between two users

@params $from: User 1 guid $to User 2 guid

Returns
object

◆ getMessage()

getMessage (   $id)

Get message by id

@params integer $id ID of message

Returns
object|false

◆ getNew()

getNew (   $from,
  $to,
  $viewed = 0 
)

Get new messages

@params $from: User 1 guid $to User 2 guid

Returns
bool

◆ getWith()

getWith (   $from,
  $to,
  $count = false 
)

Get messages between two users

@params $from: User 1 guid $to User 2 guid

Returns
object

Reimplemented in OssnChat.

◆ markViewed()

markViewed (   $from,
  $to 
)

Mark message as viewed

@params $from: User 1 guid $to User 2 guid

Returns
bool

◆ recentChat()

recentChat (   $to,
  $count = false 
)

Get recently chat list

@params $to User 2 guid

Returns
object

◆ recentSent()

recentSent (   $from)

Get recent sent messages

@params $from User 1 guid

Returns
object

◆ save()

save ( )

A messages save function

Returns
boolean

Reimplemented from OssnEntities.

◆ searchMessages()

searchMessages ( array  $params = array())

Search messages by some options

Parameters
array$paramsA valid options in format:
string$params,['id']message id
string$params,['message_from']A user GUID who sent messages
string$params,['message_to']A user GUID who receieve messages
integer$params,['viewed']True if message is viewed , false if message isn't viewed or 1/0
integer$params,['limit']Result limit default, Default is 20 values
string$params,['order_by']To show result in sepcific order. Default is DESC.
string$params,['count']Count the message

reutrn array|false;

◆ send()

send (   $from,
  $to,
  $message 
)

Send message

@params integer $from: User 1 guid @params integer $to User 2 guid @params string $message Message

Returns
boolean

The documentation for this class was generated from the following file: