abstract class SmsParserBase in SMS Framework 7
Base implementation of SmsParserInterface().
Hierarchy
- class \SmsParserBase implements SmsParserInterface
 
Expanded class hierarchy of SmsParserBase
File
- ./
sms.parser.inc, line 102  
View source
abstract class SmsParserBase implements SmsParserInterface {
  /**
   * The request being parsed.
   *
   * @var array
   */
  protected $request;
  /**
   * The SMS sender number.
   *
   * @var string
   */
  protected $number;
  /**
   * The SMS body.
   *
   * @var string
   */
  protected $message;
  /**
   * The sms_incoming options.
   *
   * @var array
   */
  protected $options;
  /**
   * {@inheritdoc}
   */
  static function checkAccess($originator, $request) {
    return TRUE;
  }
  /**
   * {@inheritdoc}
   */
  public function __construct($request = array()) {
    $this->request = $request;
    $this->number = '';
    $this->message = '';
    $this->options = array();
  }
  /**
   * {@inheritdoc}
   */
  public function setRequest($request) {
    $this->request = $request;
  }
  /**
   * {@inheritdoc}
   */
  public function getNumber() {
    return $this->number;
  }
  /**
   * {@inheritdoc}
   */
  public function getMessage() {
    return $this->message;
  }
  /**
   * {@inheritdoc}
   */
  public function getOptions() {
    return $this->options;
  }
  /**
   * {@inheritdoc}
   */
  public abstract function parseRequest();
  /**
   * {@inheritdoc}
   */
  public function getResponse() {
    return array(
      'headers' => array(
        // Even though we should have a body entity to return.
        'Status' => '202 Accepted',
      ),
      'body' => '',
    );
  }
}Members
| 
            Name | 
                  Modifiers | Type | Description | Overrides | 
|---|---|---|---|---|
| 
            SmsParserBase:: | 
                  protected | property | The SMS body. | |
| 
            SmsParserBase:: | 
                  protected | property | The SMS sender number. | |
| 
            SmsParserBase:: | 
                  protected | property | The sms_incoming options. | |
| 
            SmsParserBase:: | 
                  protected | property | The request being parsed. | |
| 
            SmsParserBase:: | 
                  static | function | 
            Checks access to parser for incoming SMS. Overrides SmsParserInterface:: | 
                  |
| 
            SmsParserBase:: | 
                  public | function | 
            Retrieves SMS message content. Overrides SmsParserInterface:: | 
                  |
| 
            SmsParserBase:: | 
                  public | function | 
            Retrieves SMS sender number. Overrides SmsParserInterface:: | 
                  |
| 
            SmsParserBase:: | 
                  public | function | 
            Retrieves sms_incoming() options. Overrides SmsParserInterface:: | 
                  |
| 
            SmsParserBase:: | 
                  public | function | 
            Retrieves the response if any. Overrides SmsParserInterface:: | 
                  |
| 
            SmsParserBase:: | 
                  abstract public | function | 
            Parses the request. Overrides SmsParserInterface:: | 
                  |
| 
            SmsParserBase:: | 
                  public | function | 
            Sets the request. Overrides SmsParserInterface:: | 
                  |
| 
            SmsParserBase:: | 
                  public | function | 
            Starts a parser. Load URI information. Overrides SmsParserInterface:: |