Overview

Namespaces

  • None
  • PHP
  • tschiemer
    • Aspsms
      • Http
      • Soap
      • Xml

Classes

  • HttpClient
  • HttpSimpleClient
  • Overview
  • Namespace
  • Class
  • Tree

Class HttpClient

Driver for HTTP based services.

tschiemer\Aspsms\AbstractClient
Extended by tschiemer\Aspsms\Http\HttpClient
Namespace: tschiemer\Aspsms\Http
Package: aspsms
Copyright: 2013 Philip Tschiemer, <tschiemer@filou.se>
License: v3 http://www.gnu.org/licenses/lgpl-3.0.txt
Version: 1.1.0
Link: https://github.com/tschiemer/aspsms-php
Located at lib/tschiemer/Aspsms/Http/HttpClient.php
Methods summary
public
# __construct( array $options = array() )

Instantiate and configure HttpClient. Possible options (to be passed in assoc array):

Instantiate and configure HttpClient. Possible options (to be passed in assoc array):

"method" optional, default "GET" "GET" | "POST" "baseUrl" optional, default as defined service base URL to use for requests "curl" optional associative array with options to pass to CURL

Parameters

$options
array
$options Associative array

Throws

AspsmsException

See

tschiemer\Aspsms\Http\HttpClient::$method
tschiemer\Aspsms\Http\HttpClient::$baseUrl
tschiemer\Aspsms\Http\HttpClient::$curlOpt
public array
# send( Aspsms\Request $request )

Send given request.

Send given request.

Parameters

$request
Aspsms\Request
$request

Returns

array

Throws

AspsmsException

See

AbstractClient::getResponse()
public
# post_default( )

Default Post-Processor (applied if no specific PP to be used)

Default Post-Processor (applied if no specific PP to be used)

public
# post_CheckCredits( )

Post-Processing for CheckCredits

Post-Processing for CheckCredits

public
# post_GetStatusCodeDescription( )

Post-Processing for GetStatusCodeDescription

Post-Processing for GetStatusCodeDescription

If invalid status code given, returns status code as description

public
# post_CheckOriginatorAuthorization( )
public
# post_InquireDeliveryNotifications( )

Post-Processing for InquireDeliveryNotifications

Post-Processing for InquireDeliveryNotifications

public
# post_VersionInfo( )

Post-Processing for VersionInfo

Post-Processing for VersionInfo

Creates an associative array with complete response, service version and build number.

Methods inherited from tschiemer\Aspsms\AbstractClient
canProcess(), clear(), getResponse()
Properties summary
public string $baseUrl 'https://webservice.aspsms.com/aspsmsx2.asmx/'
#

Request base url

Request base url

public string $method 'POST'
#

HTTP method to use

HTTP method to use

public array $curlOpt array( CURLOPT_USERAGENT => 'aspsms-php v1 http:1', CURLOPT_SSL_VERIFYPEER => FALSE )
#

List of CURL options to use.

List of CURL options to use.

public array[] $requests array( 'getVersion' => array( 'service' => 'VersionInfo' ), 'getCredits' => array( 'service' => 'CheckCredits', 'param' => array( 'UserKey' => '', 'Password' => '' )), 'getStatusCodeDescription' => array( 'service' => 'GetStatusCodeDescription', 'param' => array( 'StatusCode' => '' )), 'sendText' => array( 'service' => 'SendUnicodeSMS', 'param' => array( 'UserKey' => '', 'Password' => '', 'Recipients'=> '', 'Originator'=> '', 'MessageText' => '', 'DeferredDeliveryTime' => '', 'FlashingSMS'=> '', 'TimeZone' => '', 'URLBufferedMessageNotification' => '', 'URLDeliveryNotification' => '', 'URLNonDeliveryNotification' => '', 'AffiliateId' => '' )), 'sendWapPush' => array( 'service' => 'SimpleWAPPush', 'param' => array( 'UserKey' => '', 'Password' => '', 'Recipients'=> '', 'Originator'=> '', 'WapDescription' => '', 'WapURL' => '', 'DeferredDeliveryTime' => '', 'FlashingSMS'=> '', 'TimeZone' => '', 'URLBufferedMessageNotification' => '', 'URLDeliveryNotification' => '', 'URLNonDeliveryNotification' => '', 'AffiliateId' => '' )), 'sendToken' => array( 'service' => 'SendTokenSMS', 'param' => array( 'UserKey' => '', 'Password' => '', 'Recipients'=> '', 'Originator'=> '', 'MessageData'=>'', 'TokenReference'=>'', 'TokenValidity'=>'5', 'TokenMask' => '', 'VerificationCode' => '', 'TokenCaseSensitive' => '0', 'URLBufferedMessageNotification' => '', 'URLDeliveryNotification' => '', 'URLNonDeliveryNotification' => '', 'AffiliateId' => '' )), 'verifyToken' => array( 'service' => 'VerifyToken', 'param' => array( 'UserKey' => '', 'Password' => '', 'PhoneNumber'=> '', 'TokenReference'=>'', 'VerificationCode' => '', )), 'getDeliveryStatus' => array( 'service' => 'InquireDeliveryNotifications', 'param' => array( 'UserKey' => '', 'Password' => '', 'TransactionReferenceNumbers'=> '' )), 'checkOriginator' => array( 'service' => 'CheckOriginatorAuthorization', 'param' => array( 'UserKey' => '', 'Password' => '', 'Originator'=> '' )), 'sendOriginatorCode' => array( 'service' => 'SendOriginatorUnlockCode', 'param' => array( 'UserKey' => '', 'Password' => '', 'Originator'=> '' )), 'unlockOriginator' => array( 'service' => 'UnlockOriginator', 'param' => array( 'UserKey' => '', 'Password' => '', 'Originator'=> '', 'OriginatorUnlockCode'=>'', 'AffiliateId'=> '' )) )
#

Request configuration

Request configuration

Foreach request: 'service' := actual service name to use 'param' := list of fields and default settings to use

Properties inherited from tschiemer\Aspsms\AbstractClient
$request, $response
aspsms-php API documentation generated by ApiGen 2.8.0