Show:

Users_Mobile Class

Extends Base_Users_Mobile
Module: Users

Class representing 'Mobile' rows in the 'Users' database You can create an object of this class either to access its non-static methods, or to actually represent a mobile row in the Users database.

Methods

__set_state

(
  • $array
)
Users_Mobile

Implements the __set_state method, so it can work with with var_export and be re-imported successfully.

Parameters:

  • $array Array

Returns:

Users_Mobile:

Class instance

sendMessage

(
  • $view
  • $fields=array()
  • $options=array()
  • [$options.language]
)
Boolean

Parameters:

  • $view String

    The name of a view for the message. Fields are passed to this array.

  • $fields=array() Array

    The fields referenced in the subject and/or view

  • $options=array() Array

    Array of options. Can include:
    "delay" => A delay, in milliseconds, to wait until sending email. Only works if Node server is listening.

  • [$options.language] String optional

    Preferred language

Returns:

Boolean:

setUp

()

The setUp() method is called the first time an object of this class is constructed.

Events

Users/mobile/sendMessage

Before

Event Payload:

  • view String
  • fields Array
  • options Array

Users/mobile/sendMessage

After

Event Payload:

  • view String
  • fields Array
  • options Array
  • mail String

Users/mobile/sendMessage/gateway

Before

Event Payload:

  • view String
  • fields Array
  • options Array
  • email Zend_Mail

    You can call methods on this before sending sms

Users/mobile/sendMessage/twilio

Before

Event Payload:

  • view String
  • fields Array
  • options Array
  • client Services_Twilio

    You can call methods on this before sending sms

Users/resend

Before

Event Payload:

  • user String
  • mobile String

Users/resend

After

Event Payload:

  • user String
  • mobile String