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

Class: Net_SMPP_Command

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

Class Overview

Net_SMPP_PDU
   |
   --Net_SMPP_Command

Base Net_SMPP PDU command class


Author(s):

Version:

  • CVS: $Revision: 298434 $

Copyright:

  • 2005 WebSprockets, LLC.

Variables

Methods


Child classes:

Net_SMPP_Command_Deliver_Sm
deliver_sm class
Net_SMPP_Command_Bind_Transceiver
bind_transceiver class
Net_SMPP_Command_Bind_Receiver
bind_receiver class
Net_SMPP_Command_Data_Sm
data_sm class
Net_SMPP_Command_Data_Sm_Resp
data_sm_resp class
Net_SMPP_Command_Bind_Transmitter_Resp
bind_transmitter_resp class
Net_SMPP_Command_Submit_Sm
submit_sm class
Net_SMPP_Command_Enquire_Link_Resp
enquire_link_resp class
Net_SMPP_Command_Enquire_Link
enquire_link class
Net_SMPP_Command_foo_bar
foo_bar class
Net_SMPP_Command_Unbind
unbind class
Net_SMPP_Command_Bind_Receiver_Resp
bind_receiver_resp class
Net_SMPP_Command_Unbind_Resp
unbind_resp class
Net_SMPP_Command_Bind_Transceiver_Resp
bind_transceiver_resp class
Net_SMPP_Command_Alert_Notification
alert_notification class
Net_SMPP_Command_Deliver_Sm_Resp
deliver_sm_resp class
Net_SMPP_Command_Submit_Sm_Resp
submit_sm_resp class
Net_SMPP_Command_Generic_Nack
generic_nack class
Net_SMPP_Command_Bind_Transmitter
bind_transmitter class

Inherited Variables

Inherited Methods

Class: Net_SMPP_PDU

Net_SMPP_PDU::extractCommand()
Extract the command from a PDU
Net_SMPP_PDU::factory()
Get an instance of a specific command class
Net_SMPP_PDU::generate()
Generate the raw PDU to send to the remote system
Net_SMPP_PDU::isError()
Is this an error response?
Net_SMPP_PDU::isRequest()
Is this a request PDU?
Net_SMPP_PDU::isResponse()
Is this a response PDU?
Net_SMPP_PDU::isVendor()
Is this a vendor PDU?
Net_SMPP_PDU::parse()
Parse a raw PDU and populate this instance with it's data
Net_SMPP_PDU::statusDesc()
Get status description

Class Details

[line 140]
Base Net_SMPP PDU command class

This class is the base from which the command-specific classes inherit. It contains functions common to the parsing and generation of the paramaters for all SMPP commands.



[ Top ]


Class Variables

$_defs = array()

[line 171]

Parameter defs for this command

*ORDER IS SIGNIFICANT!* Required paramaters *MUST* be listed in the order as defined by the protocol. Optional paramaters *MUST* come after all the required paramaters.

This should look like:

$_defs = array( 'field_name' => array( 'type' => 'field_type', 'size' => field_size, 'max' => field_max_size ) );

'type' is one of: int, string, ostring.

  • int: your basic integer. 'size' is the number of bytes the value will be packed into. 'max' is ignored.
  • string: a basic string. 'size' is the size of the string in bytes if the length of the string is less than 'size,' it will be null-padded. 'max' is the maximum length for variable-length strings. Only set one of 'max' or 'size.'
  • ostring: Non-null-terminated, variable length octet string.

  • Access: protected

Type:   array


[ Top ]



Method Detail

__construct (Constructor)   [line 193]

void __construct( $command, [array $args = array()])

5.x/main constructor

Parameters:

array   $args   —  Values to set
   $command   — 

[ Top ]

Net_SMPP_Command (Constructor)   [line 181]

void Net_SMPP_Command( $command, [array $args = array()])

4.x constructor

Parameters:

array   $args   —  Values to set
   $command   — 

[ Top ]

commandCode   [line 233]

mixed commandCode( int $cmdname)

Get the ID of a command from it's name
  • Return: Int command ID, or false

Parameters:

int   $cmdname   —  Command name

[ Top ]

commandName   [line 217]

mixed commandName( int $cmdcode)

Get the name of a command from it's ID
  • Return: String command name, or false

Parameters:

int   $cmdcode   —  Command ID

[ Top ]

fieldExists   [line 580]

boolean fieldExists( string $field)

Does this field exist?
  • Return: true if it exists, false otherwise
  • Access: protected

Parameters:

string   $field   —  Field to check

[ Top ]

fieldIsOptional   [line 591]

boolean fieldIsOptional( string $field)

Is this field optional?
  • Return: true if optional, false otherwise

Parameters:

string   $field   —  Field name

[ Top ]

generateParams   [line 254]

string generateParams( )

Generate the binary data from the object

This is the workhorse of this class (and all the other Net_SMPP_Command_* classes). It's responsible for generating the binary protocol data from the fields in the object, and is the opposite of parse().

  • See: _packFormat()

[ Top ]

isFixed   [line 469]

boolean isFixed( string $field)

Is this a fixed-length field?
  • Return: true if it is, false otherwise
  • Access: protected

Parameters:

string   $field   —  Field to test

[ Top ]

parseOptionalParams   [line 524]

void parseOptionalParams( string $data)

Parse optional paramaters
  • Access: protected

Parameters:

string   $data   —  Optional paramaters to parse

[ Top ]

parseParams   [line 483]

boolean parseParams( string $data)

Parse data into the object structure
  • Return: true on success, false otherwise

Parameters:

string   $data   —  Data to parse

[ Top ]

set   [line 613]

void set( [array $args = array()])

Set values in this object

Unknown values are ignored.


Parameters:

array   $args   —  Values to set

[ Top ]

_commandList   [line 629]

array &_commandList( )

Get the list of SMPP v3.4 commands
  • Access: protected

[ Top ]

_optionalParams   [line 671]

array &_optionalParams( )

Get list of optional paramaters
  • Access: protected

[ Top ]


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