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

Class: Net_Monitor_Alert_SMS

Source Location: /Net_Monitor-0.3.0/Net/Monitor/Alert/SMS.php

Class Overview

Net_Monitor_Alert
   |
   --Net_Monitor_Alert_SMS

Net_Monitor_Alert_SMS


Author(s):

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 54]
Net_Monitor_Alert_SMS

It uses the global Net_Monitor options (default):

  • sms_debug - send debugging output to STDOUT for the SMS alert (false)
  • sms_from - who is the sender for the SMS alert, ('Net_Monitor')
  • SMS_default - array of options for Net_SMS used for normal adressees (array())



[ Top ]


Class Variables

$_alert =  null

[line 70]

The alert object to be used
  • Access: protected

Type:   object
Overrides:   Array


[ Top ]

$_service =  'SMS'

[line 62]

Defines the name of the service
  • Access: protected

Type:   string
Overrides:   Array


[ Top ]



Method Detail

__construct (Constructor)   [line 77]

Net_Monitor_Alert_SMS __construct( )

function Net_Monitor_Alert_SMS
  • Access: public

[ Top ]

alert   [line 107]

mixed alert( mixed $server, array $result_array, [array $options = array()])

function alert

Sends the alerts thru the specified SMS servers and accounts

    • SMS_provider - The server to connect. Mandatory.
    • username - The username to use for SMS authentication. Mandatory.
    • password - The password to use for SMS authentication.
    • $results is the array of results to send
    Returns true on success, PEAR_Error object on failure

    • Return: true or PEAR_Error
    • Access: public

    Overrides Net_Monitor_Alert::alert() (function alert)

    Parameters:

    mixed   $server   —  Server
    array   $result_array   —  Results
    array   $options   —  Options

    [ Top ]

    bufferSMS   [line 246]

    void bufferSMS( $out, $max, &$SMS_message, &$SMS_array)

    • Todo: Refactor this to be 1 method, 1 purpose
    • Access: protected

    Parameters:

       $out   — 
       $max   — 
       &$SMS_message   — 
       &$SMS_array   — 

    [ Top ]

    buildToSendList   [line 204]

    void buildToSendList( $items)

    • Access: protected

    Parameters:

       $items   — 

    [ Top ]

    determineAlertLine   [line 190]

    void determineAlertLine( $options)

    • Access: protected

    Parameters:

       $options   — 

    [ Top ]

    factory   [line 268]

    void factory( $SMS_provider, $username)

    A quick and dirty way to allow testability.
    • Access: protected

    Parameters:

       $SMS_provider   — 
       $username   — 

    [ Top ]

    parseResult   [line 198]

    void parseResult( $host, $service, $result, $alert_line)

    • Access: protected

    Parameters:

       $host   — 
       $service   — 
       $result   — 
       $alert_line   — 

    [ Top ]


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