Class Net_SMS

Description

Net_SMS Class

Copyright 2003-2009 The Horde Project (http://www.horde.org/)

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.php,v 1.10.10.15 2009/01/06 15:23:28 jan Exp $

Located in /Net_SMS/SMS.php (line 18)


	
			
Direct descendents
Class Description
 class Net_SMS_clickatell_http Net_SMS_clickatell_http Class implements the HTTP API for accessing the Clickatell (www.clickatell.com) SMS gateway.
 class Net_SMS_generic_smpp SMPP based SMS driver.
 class Net_SMS_generic_smtp Generic e-mail based SMS driver
 class Net_SMS_sms2email_http Net_SMS_sms2email_http Class implements the HTTP API for accessing the sms2email (www.sms2email.com) SMS gateway.
 class Net_SMS_vodafoneitaly_smtp Net_SMS_vodafoneitaly_smtp Class implements the SMTP API for accessing the Vodafone Italy SMS gateway. Use of this gateway requires an email account with Vodafone Italy (www.190.it).
 class Net_SMS_win_http Net_SMS_win_http Class implements the HTTP API for accessing the WIN (www.winplc.com) SMS gateway.
Variable Summary
 mixed $_auth
 array $_params
Method Summary
 Net_SMS Net_SMS ([array $params = null])
 mixed authenticate ()
 Net_SMS &factory (string $driver, [array $params = array()])
 integer getBalance ()
 array getDefaultSendParams (string $gateway)
 array getDrivers ()
 array getGatewayInfo ( $gateway)
 array getGatewayParams (string $gateway)
 mixed hasCapability (string $capability)
 mixed send (array $message)
 mixed &singleton (string $driver, [array $params = array()])
Variables
mixed $_auth = null (line 27)
array $_params = array() (line 25)

A hash containing any parameters for the current gateway driver.

Methods
Constructor Net_SMS (line 34)

Constructor

Net_SMS Net_SMS ([array $params = null])
  • array $params: Any parameters needed for this gateway driver.
authenticate (line 158)

Authenticates against the gateway if required.

  • return: True on success or PEAR Error on failure.
mixed authenticate ()
factory (line 287)

Attempts to return a concrete Gateway instance based on $driver.

  • return: The newly created concrete Gateway instance or false on an error.
Net_SMS &factory (string $driver, [array $params = array()])
  • string $driver: The type of concrete Gateway subclass to return. This is based on the gateway driver ($driver). The code is dynamically included.
  • array $params: A hash containing any additional configuration or connection parameters a subclass might need.
getBalance (line 260)

If the current driver has a credit capability, queries the gateway for a credit balance and returns the value.

  • return: Value indicating available credit or null if not supported.
integer getBalance ()
getDefaultSendParams (line 122)

Returns send parameters for a gateway from the driver subclass getDefaultSendParams()function. These are parameters which are available to the user during sending, such as setting a time for delivery, or type of SMS (normal text or flash), or source address, etc.

  • return: An array of available send parameters.
array getDefaultSendParams (string $gateway)
  • string $gateway: The name of the gateway driver for which to return the send parameters.

Redefined in descendants as:
getDrivers (line 44)

Returns a list of available gateway drivers.

  • return: An array of available drivers.
array getDrivers ()
getGatewayInfo (line 74)

Returns information on a gateway, such as name and a brief description, from the driver subclass getInfo() function.

  • return: An array of extra information.
array getGatewayInfo ( $gateway)
  • $gateway
getGatewayParams (line 97)

Returns parameters for a gateway from the driver subclass getParams() function.

  • return: An array of extra information.
array getGatewayParams (string $gateway)
  • string $gateway: The name of the gateway driver for which to return the parameters.
hasCapability (line 145)

Query the current Gateway object to find out if it supports the given capability.

  • return: Whether or not the capability is supported or any other value that the capability wishes to report.
mixed hasCapability (string $capability)
  • string $capability: The capability to test for.
send (line 182)

Sends a message to one or more recipients. Hands off the actual sending to the gateway driver.

  • return: True on success or PEAR Error on failure.
mixed send (array $message)
  • array $message: The message to be sent, which is composed of:
                              id   - A unique ID for the message;
                              to   - An array of recipients;
                              text - The text of the message;
singleton (line 318)

Attempts to return a reference to a concrete Net_SMS instance based on $driver.

It will only create a new instance if no Net_SMS instance with the same parameters currently exists.

This method must be invoked as: $var = &Net_SMS::singleton()

  • return: The created concrete Net_SMS instance, or false on error.
mixed &singleton (string $driver, [array $params = array()])
  • string $driver: The type of concrete Net_SMS subclass to return. The is based on the gateway driver ($driver). The code is dynamically included.
  • array $params: A hash containing any additional configuration or connection parameters a subclass might need.

Documentation generated on Sun, 30 Jan 2011 05:21:35 +0000 by phpDocumentor 1.4.3