Class Notifications_model - echiong/testRepo GitHub Wiki
##Class Notifications_model
Notifications_model handles notification related data operations
Package: [[application<a href="Package application.models.md">models]]
Extends:
CI_Model
Located at application/models/notifications_model.php
##Methods summary
public from ( integer $userID = null, string $type = 'users' )
Instantiate the value of $from and $fromThing.
Parameters
$userID
integer
$userID ID of actor
$type
string
$type actor type
Used by
Components::comment()
Users::follow_user()
return--object
Users::follow_user()
public to ( integer $thingID, string $thing = 'feat' )
Instantiate the value of $to and $toThing.
Parameters
$thingID
integer
$thingID ID of object
$thing
string
$thing object type
Used by
Users::follow_user()
return--object
Users::follow_user()
public create ( integer $user, string $name )
Creates a notification record.
Parameters
$user
integer
$user User ID
$name
string
$name The action usedby Users::follow_user() return boolean
Used by Users::follow_user()
public get_list ( integer $user = null, boolean $format = true )
Retrieves and returns the list of notifications.
Parameters
$user
integer
$user User ID.
$format
boolean
$format Flag that determines if the list will be formatted
Used by
Users::notifications()
return--array
public reset_notifications ( integer $userID = null )
Deletes all the notificaitons for the current user (or provided $userID)
Parameters
$userID
integer
$userID User's ID
Used by
Users::reset_notifications()
return-void
Users::reset_notifications()
Methods inherited from CI_Model
__construct()
__get()
<table class="summary" id="magicProperties">
<caption>Magic properties summary</caption>
<tr data-order="fromThing" id="m$fromThing">
<td class="attributes"><code>
public
string
</code></td>
<td class="name">
$fromThing
<div class="description detailed">
Actor type - user
</div>
</div></td>
</tr>
<tr data-order="toThing" id="m$toThing">
<td class="attributes"><code>
public
string
</code></td>
<td class="name">
$toThing
<div class="description detailed">
Object type - beats, voices, feats
</div>
</div></td>
</tr>
<tr data-order="from" id="m$from">
<td class="attributes"><code>
public
integer
</code></td>
<td class="name">
$from
<div class="description detailed">
ID of actor
</div>
</div></td>
</tr>
<tr data-order="to" id="m$to">
<td class="attributes"><code>
public
integer
</code></td>
<td class="name">
$to