FreenetIS
 All Classes Namespaces Functions Variables Pages
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Attributes | List of all members
Sms_message_Model Class Reference
Inheritance diagram for Sms_message_Model:
ORM

Public Member Functions

 get_all_records ($limit_from=0, $limit_results=50, $order_by= 'id', $order_by_direction= 'desc', $filter_values=array())
 Gets all SMS messages.
 get_unread_messages ($limit_from=0, $limit_results=50, $order_by= 'id', $order_by_direction= 'asc', $filter_values=array())
 Gets all unread SMS messages.
 count_of_unread_messages ()
 Gets count of all unread messages.
 count_all_messages ($filter_sql= '')
 Count the number of records in the table.

Static Public Member Functions

static get_types ($translate=TRUE)
 Gets type names array.
static get_states ($translate=TRUE)
 Gets state names array.

Public Attributes

const RECEIVED = 0
 Type of SMS: recieved.
const SENT = 1
 Type of SMS: sent.
const RECEIVED_UNREAD = 0
 State of recieved SMS: SMS was not readed yet.
const RECEIVED_READ = 1
 State of recieved SMS: SMS was readed.
const SENT_OK = 0
 State of sended SMS: SMS was sended.
const SENT_UNSENT = 1
 State of sended SMS: SMS was not sended yet.
const SENT_FAILED = 2
 State of sended SMS: SMS sent failed.

Static Public Attributes

static $states

Protected Attributes

 $belongs_to = array('user', 'sms_message_id' => 'sms_message')

Member Function Documentation

Sms_message_Model::count_all_messages (   $filter_sql = '')

Count the number of records in the table.

Parameters
string$filter_sql
Returns
integer
Sms_message_Model::count_of_unread_messages ( )

Gets count of all unread messages.

Returns
integer
Sms_message_Model::get_all_records (   $limit_from = 0,
  $limit_results = 50,
  $order_by = 'id',
  $order_by_direction = 'desc',
  $filter_values = array() 
)

Gets all SMS messages.

Parameters
integer$limit_from
integer$limit_results
string$order_by
string$order_by_direction
array$filter_values
Returns
Mysql_Result
static Sms_message_Model::get_states (   $translate = TRUE)
static

Gets state names array.

Parameters
bool$translate
Returns
array
static Sms_message_Model::get_types (   $translate = TRUE)
static

Gets type names array.

Parameters
bool$translate
Returns
array
Sms_message_Model::get_unread_messages (   $limit_from = 0,
  $limit_results = 50,
  $order_by = 'id',
  $order_by_direction = 'asc',
  $filter_values = array() 
)

Gets all unread SMS messages.

Parameters
integer$limit_from
integer$limit_results
string$order_by
string$order_by_direction
array$filter_values
Returns
Mysql_Result

Member Data Documentation

Sms_message_Model::$states
static
Initial value:
array
(
self::SENT_OK => 'Sent',
self::SENT_UNSENT => 'Unsent',
self::SENT_FAILED => 'Failed',
)

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