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

Class: Net_SMS

Source Location: /Net_SMS-0.0.1/SMS.php

Class Overview


Net_SMS Class


Author(s):

Version:

  • $Revision: 1.10 $

Methods


Child classes:

Net_SMS_sms2email_http
Net_SMS_sms2email_http Class implements the HTTP API for accessing the sms2email (www.sms2email.com) SMS gateway.
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).
Net_SMS_clickatell_http
Net_SMS_clickatell_http Class implements the HTTP API for accessing the Clickatell (www.clickatell.com) SMS gateway.

Inherited Variables

Inherited Methods


Class Details

[line 19]
Net_SMS Class

Copyright 2003-2004 Marko Djukic <marko@oblo.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.php,v 1.10 2004/05/04 21:54:11 mdjukic Exp $



[ Top ]


Method Detail

Net_SMS (Constructor)   [line 36]

Net_SMS Net_SMS( [optional $params = null])

Constructor

Parameters:

optional   $params   —  array $params Any parameters needed for this gateway driver.

[ Top ]

authenticate   [line 172]

mixed authenticate( )

Authenticates against the gateway if required.
  • Return: True on success or PEAR Error on failure.
  • Access: public

[ Top ]

factory   [line 304]

object Net_SMS &factory( string $driver, [optional $params = array()])

Attempts to return a concrete Gateway instance based on $driver.
  • Return: The newly created concrete Gateway instance or false on an error.

Parameters:

string   $driver   —  The type of concrete Gateway subclass to return. This is based on the gateway driver ($driver). The code is dynamically included.
optional   $params   —  array $params A hash containing any additional configuration or connection parameters a subclass might need.

[ Top ]

getBalance   [line 275]

int getBalance( )

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.
  • Access: public

[ Top ]

getDefaultSendParams   [line 132]

array getDefaultSendParams( string $gateway)

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.
  • Access: public

Overridden in child classes as:

Net_SMS_sms2email_http::getDefaultSendParams()
Returns the parameters that can be set as default for sending messages using this gateway driver and displayed when sending messages.
Net_SMS_vodafoneitaly_smtp::getDefaultSendParams()
Returns the parameters that can be set as default for sending messages using this gateway driver and displayed when sending messages.
Net_SMS_clickatell_http::getDefaultSendParams()
Returns the parameters that can be set as default for sending messages using this gateway driver and displayed when sending messages.

Parameters:

string   $gateway   —  The name of the gateway driver for which to return the send parameters.

[ Top ]

getDrivers   [line 48]

array getDrivers( )

Returns a list of available gateway drivers.
  • Return: An array of available drivers.
  • Access: public

[ Top ]

getGatewayInfo   [line 80]

array getGatewayInfo( $gateway)

Returns information on a gateway, such as name and a brief description, from the driver subclass getInfo() function.
  • Return: An array of extra information.
  • Access: public

Parameters:

   $gateway   — 

[ Top ]

getGatewayParams   [line 105]

array getGatewayParams( string $gateway)

Returns parameters for a gateway from the driver subclass getParams() function.
  • Return: An array of extra information.
  • Access: public

Parameters:

string   $gateway   —  The name of the gateway driver for which to return the parameters.

[ Top ]

hasCapability   [line 157]

mixed hasCapability( string $capability)

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.
  • Access: public

Parameters:

string   $capability   —  The capability to test for.

[ Top ]

send   [line 196]

mixed send( &$message, array $message)

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.
  • Access: public

Parameters:

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;
   &$message   — 

[ Top ]

singleton   [line 334]

mixed &singleton( string $driver, [optional $params = array()])

Attempts to return a reference to a concrete Net_SMS instance based on $driver. It wil 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.

Parameters:

string   $driver   —  The type of concrete Net_SMS subclass to return. The is based on the gateway driver ($driver). The code is dynamically included.
optional   $params   —  array $params A hash containing any additional configuration or connection parameters a subclass might need.

[ Top ]


Documentation generated on Mon, 11 Mar 2019 10:17:14 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.