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

Public Member Functions

 add ($type, $poster_guid, $subject_guid, $item_guid=null, $notification_owner='')
 
 notifyParticipant ($partcipate, $vars)
 
 get ($guid_two='', $unread=false, $limit=false, $count=false)
 
 countNotification ($guid)
 
 getbyGUID ($guid='')
 
 setViewed ($guid)
 
 deleteUserNotifications ($user)
 
 clearAll ($guid)
 
 deleteNotification (array $params=array())
 
 searchNotifications (array $params=array())
 
 toTemplate ()
 
- 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='')
 

Member Function Documentation

◆ add()

add (   $type,
  $poster_guid,
  $subject_guid,
  $item_guid = null,
  $notification_owner = '' 
)

Add notification to database

Parameters
integer$subject_idId of item which user comment
integer$poster_guidGuid of item poster
integer$item_guid,Guid of item
integer$notification_owner,Guid of notification owner
Returns
boolean;

◆ clearAll()

clearAll (   $guid)

Clear all notifications of specific user See : 3 state logic for notifications #202 https://github.com/opensource-socialnetwork/opensource-socialnetwork/issues/202

Parameters
integer$guidUser guid
Returns
boolean;

◆ countNotification()

countNotification (   $guid)

Count user notification

Parameters
integer$guidcount user notifications
Returns
integer;

◆ deleteNotification()

deleteNotification ( array  $params = array())

Delete a notifications

Parameters
array$paramsA wheres clause
Returns
boolean

◆ deleteUserNotifications()

deleteUserNotifications (   $user)

Delete user notifications

Parameters
object$userUser entity
Returns
boolean;

◆ get()

get (   $guid_two = '',
  $unread = false,
  $limit = false,
  $count = false 
)

Get notifications

Parameters
integer$guid_twoUser guid
integer$poster_guidGuid of item poster;
Returns
array

◆ getbyGUID()

getbyGUID (   $guid = '')

Get notitication by guid

Parameters
integer$guidNotification guid
Returns
object;

◆ notifyParticipant()

notifyParticipant (   $partcipate,
  $vars 
)

Add notification participant

Parameters
integer$partcipateUser guid who you wanted to notify
array$varsOption values
Returns
boolean

◆ searchNotifications()

searchNotifications ( array  $params = array())

Search Notifcations

Parameters
array$paramsA valid options in format,
string$params,['type']Notification type
string$params,['owner_guid']Notification owner guid
string$params,['poster_guid']Notification poster guid
string$params,['subject_guid']Notifcation subject guid
string$params,['item_created']Notifcation time_created
string$params,['item_guid']Notifcation item guid
string$params,['count']If you wanted to count then true
string$params,['viewed']If viewed true, if not then false
string$params,['guid']Notifcation guid
string$params,['order_by']Order list , default ASC guid

reutrn array|false;

◆ setViewed()

setViewed (   $guid)

Mark notification as viewd

Parameters
integer$guidNotification guid
Returns
object;

◆ toTemplate()

toTemplate ( )

Make notifcation item to output view

Returns
string|false

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