Net_SMS
[ class tree: Net_SMS ] [ index: Net_SMS ] [ all elements ]

Class: Net_SMS_textmagic_http

Source Location: /Net_SMS-0.2.1/Net/SMS/textmagic_http.php

Class Overview

Net_SMS
   |
   --Net_SMS_textmagic_http

Net_SMS_textmagic_http Class implements the HTTP API for accessing the TextMagic (api.textmagic.com) SMS gateway.


Author(s):

Variables

Methods


Inherited Variables

Inherited Methods

Class: Net_SMS

Net_SMS::__construct()
Constructor
Net_SMS::authenticate()
Authenticates against the gateway if required.
Net_SMS::getBalance()
If the current driver has a credit capability, queries the gateway for a credit balance and returns the value.
Net_SMS::getError()
Returns a string representation of an error code.
Net_SMS::hasCapability()
Query the current Gateway object to find out if it supports the given capability.
Net_SMS::send()
Sends a message to one or more recipients. Hands off the actual sending to the gateway driver.
Net_SMS::_send()
This function does the actual sending of the message.

Class Details

[line 19]
Net_SMS_textmagic_http Class implements the HTTP API for accessing the TextMagic (api.textmagic.com) SMS gateway.

Copyright 2009 Fedyashev Nikita <nikita@realitydrivendeveloper.com>

See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.

$Horde: framework/Net_SMS/SMS/textmagic_http.php,v 1.20 2006/01/01 21:10:07 jan Exp $



[ Top ]


Class Variables

$capabilities = array('auth'           => false,
                              'batch'          => 100,
                              'multi'          => true,
                              'receive'        => true,
                              'credit'         => true,
                              'addressbook'    => false,
                              'lists'          => false,

                              'message_status' => true,
                              'delete_reply'   => true,
                              'check_number'   => true)

[line 53]

An array of capabilities, so that the driver can report which operations

it supports and which it doesn't. Possible values are:

   send           - Send SMS, scheduled sending;
   account        - Check account balance;
   messageStatus  - Check messages's cost and delivery status;
   receive        - Receive incoming messages;
   deleteReply    - Delete specified incoming messages;
   checkNumber    - Check phone number validity and destination price;


Type:   array


[ Top ]

$password =

[line 26]

  • Access: protected

Type:   mixed


[ Top ]

$request =

[line 23]

  • Access: protected

Type:   mixed


[ Top ]

$username =

[line 25]

  • Access: protected

Type:   mixed


[ Top ]



Method Detail

__construct (Constructor)   [line 28]

Net_SMS_textmagic_http __construct( $params, HTTP_Request2 $request)

  • Access: public

Overrides Net_SMS::__construct() (Constructor)

Parameters:

   $params   — 
HTTP_Request2   $request   — 

[ Top ]

checkNumber   [line 321]

array checkNumber( array $numbers)

This function allows you to validate phone number's format, check its country and message price to the destination .
  • Return: An array with the success status and additional information.

Parameters:

array   $numbers   —  Phone numbers array to be checked.

[ Top ]

deleteReply   [line 260]

array deleteReply( array $ids)

This function allows you to delete Incoming message
  • Return: An array with the success status and additional information.

Parameters:

array   $ids   —  The array containing message IDs.

[ Top ]

getDefaultSendParams   [line 444]

array getDefaultSendParams( )

Returns the parameters that can be set as default for sending messages using this gateway driver and displayed when sending messages.
  • Return: Array of parameters that can be set as default.
  • Todo: Set up batch fields/params, would be nice to have ringtone/logo support too, queue choice, unicode choice.

[ Top ]

getError   [line 498]

mixed getError( [string $error_text = ''], integer $error)

Returns a string representation of an error code.
  • Return: A textual message corresponding to the error code or a PEAR Error if passed an existing error text.
  • Todo: Check which of these are actually required and trim down the list.

Overrides Net_SMS::getError() (Returns a string representation of an error code.)

Parameters:

string   $error_text   —  An existing error text to use to raise a PEAR Error.
integer   $error   —  The error code to look up.

[ Top ]

getInfo   [line 412]

array getInfo( )

Identifies this gateway driver and returns a brief description.
  • Return: Array of driver info.

[ Top ]

getParams   [line 425]

array getParams( )

Returns the required parameters for this gateway driver.
  • Return: Array of required parameters.

[ Top ]

getPassword   [line 549]

void getPassword( )

  • Access: public

[ Top ]

getSendParams   [line 468]

array getSendParams( $params)

Returns the parameters for sending messages using this gateway driver, displayed when sending messages. These are filtered out using the default values set for the gateway.
  • Return: Array of required parameters.

Parameters:

   $params   — 

[ Top ]

getUsername   [line 545]

void getUsername( )

  • Access: public

[ Top ]

messageStatus   [line 163]

array messageStatus( array $ids)

This function check message delivery status.
  • Return: An array with the success status and additional information.

Parameters:

array   $ids   —  The array containing message IDs.

[ Top ]

receive   [line 222]

array receive( array $last_retrieved_id)

This function retrieves incoming messages.
  • Return: An array with the success status and additional information.

Parameters:

array   $last_retrieved_id   —  The array containing message IDs.

[ Top ]

setPassword   [line 557]

void setPassword( $password)

  • Access: public

Parameters:

   $password   — 

[ Top ]

setRequest   [line 36]

void setRequest( HTTP_Request2 $request)

  • Access: public

Parameters:

HTTP_Request2   $request   — 

[ Top ]

setUsername   [line 553]

void setUsername( $username)

  • Access: public

Parameters:

   $username   — 

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:57:16 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.