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

Class: Net_SMPP_PDU

Source Location: /Net_SMPP-0.4.5/Net/SMPP/PDU.php

Class Overview


Net_SMPP PDU (Protocol Data Unit) class


Author(s):

Version:

  • CVS: $Revision: 298083 $

Copyright:

  • Portions of the documentation (c) Copyright 1999 SMPP Developers Forum.

Variables

Methods


Child classes:

Net_SMPP_Command
Base Net_SMPP PDU command class

Inherited Variables

Inherited Methods


Class Details

[line 123]
Net_SMPP PDU (Protocol Data Unit) class

This is the lowest-level class for handling PDUs, and it is responsible for generating the PDU header, among other things.

The design of this class is:

Net_SMPP_Command_foobar -> Net_SMPP_Command -> Net_SMPP_PDU

The Net_SMPP_Command_foobar class defines the paramaters which may be set for any given command. Net_SMPP_Command has methods which operate on the command definitions in Net_SMPP_Command_foobar, en/decode the binary protocol data, and so forth.

Simple example; send_sm command: require_once 'Net/SMPP.php'; $ssm =& Net_SMPP::PDU('submit_sm'); $ssm->short_message = 'Testing'; // Generate the binary protocol data $pdu = $ssm->generate();

  • Author: Ian Eure <ieure@php.net>
  • Version: Release: @package_version@
  • Version: CVS: $Revision: 298083 $
  • Copyright: (c) Copyright 2005 WebSprockets, LLC.
  • Copyright: Portions of the documentation (c) Copyright 1999 SMPP Developers Forum.
  • Link: http://pear.php.net/package/Net_SMPP
  • Since: Release: 0.0.1dev1
  • License: PHP License 3.0


[ Top ]


Class Variables

$command =  null

[line 139]

PDU command

Type:   int


[ Top ]

$sequence =  0

[line 156]

PDU sequence

Type:   int


[ Top ]

$status =  null

[line 148]

Status of the command

This is only relevant for response PDUs


Type:   int


[ Top ]

$_length =  0

[line 132]

Octal length of the total PDU
  • Access: protected

Type:   int


[ Top ]



Method Detail

extractCommand   [line 321]

string extractCommand( string $pdu)

Extract the command from a PDU
  • Return: PDU command string

Parameters:

string   $pdu     Binary PDU data

[ Top ]

factory   [line 166]

mixed factory( string $command, [array $args = array()])

Get an instance of a specific command class
  • Return: boolean false or Net_SMPP_Command instance

Parameters:

string   $command     Command class to instantiate
array   $args     Arguments to set in the instance

[ Top ]

generate   [line 334]

string generate( )

Generate the raw PDU to send to the remote system
  • Return: PDU data

[ Top ]

isError   [line 216]

boolean isError( )

Is this an error response?
  • Return: true if it is, false otherwise

[ Top ]

isRequest   [line 192]

boolean isRequest( )

Is this a request PDU?
  • Return: true if it is, false otherwise

[ Top ]

isResponse   [line 202]

boolean isResponse( )

Is this a response PDU?
  • Return: true if it is, false otherwise

[ Top ]

isVendor   [line 182]

boolean isVendor( )

Is this a vendor PDU?
  • Return: true if it is, false otherwise

[ Top ]

parse   [line 257]

void parse( string $pdudata)

Parse a raw PDU and populate this instance with it's data

This function only actually parses the (fixed-length) PDU header. parseParams() handles the PDU-specific parameter parsing.


Parameters:

string   $pdudata     PDU data to parse

[ Top ]

statusDesc   [line 230]

string statusDesc( [int $status = null])

Get status description
  • Return: Error message

Parameters:

int   $status     Optional status code to look up

[ Top ]


Documentation generated on Tue, 01 Jun 2010 10:30:06 +0000 by phpDocumentor 1.4.3. PEAR Logo Copyright © PHP Group 2004.