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

Class: Net_Growl_Response

Source Location: /Net_Growl-2.7.0/Net/Growl/Response.php

Class Overview


Class representing a Growl response using GNTP protocol


Author(s):

Version:

  • Release: 2.7.0

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 74]
Class representing a Growl response using GNTP protocol

The class is designed to be used to get additionnal information on the response received.

  1.   $growl Net_Growl::singleton($appName$notifications$password$options);
  2.  
  3.   $response $growl->register();
  4.  
  5.   if ($response->getStatus(!= 'OK'{
  6.       echo $response->getStatus(' ' .
  7.            $response->getErrorCode(' ' .
  8.            $response->getErrorDescription();
  9.   }



[ Top ]


Class Variables

$action =

[line 95]

Request action

Type:   string


[ Top ]

$body =

[line 151]

Response body

Type:   string


[ Top ]

$code =

[line 88]

Status code

Type:   string


[ Top ]

$errorCode =

[line 102]

Error code

Type:   integer


[ Top ]

$errorDescription =

[line 109]

Error description

Type:   string


[ Top ]

$machineName =

[line 116]

The machine name/host name of the sending computer

Type:   string


[ Top ]

$platformName =

[line 137]

The identify of the sending computer OS/platform

Type:   string


[ Top ]

$platformVersion =

[line 144]

The version of the the sending computer OS/platform

Type:   string


[ Top ]

$softwareName =

[line 123]

The identity of the sending framework

Type:   string


[ Top ]

$softwareVersion =

[line 130]

The version of the sending framework

Type:   string


[ Top ]

$version =

[line 81]

GNTP protocol version

Type:   string


[ Top ]



Method Detail

__construct (Constructor)   [line 161]

Net_Growl_Response __construct( string $statusLine)

Constructor, parses the response status line

Parameters:

string   $statusLine   —  Response status line (e.g. "GNTP/1.0 -OK NONE")

[ Top ]

appendBody   [line 183]

void appendBody( string $bodyChunk)

Appends a string to the response body excluding the protocol identifier, version, message type, and encryption algorithm id

Should be used only by Mock adapter intended for testing


Parameters:

string   $bodyChunk   —  Part or full body response

[ Top ]

getErrorCode   [line 285]

integer getErrorCode( )

Returns the error code

200 - TIMED_OUT The server timed out waiting for the request to complete 201 - NETWORK_FAILURE The server was unavailable or the client could not reach the server for any reason 300 - INVALID_REQUEST The request contained an unsupported directive, invalid headers or values, or was otherwise malformed 301 - UNKNOWN_PROTOCOL The request was not a GNTP request 302 - UNKNOWN_PROTOCOL_VERSION The request specified an unknown or unsupported GNTP version 303 - REQUIRED_HEADER_MISSING The request was missing required information 400 - NOT_AUTHORIZED The request supplied a missing or wrong password/key or was otherwise not authorized 401 - UNKNOWN_APPLICATION Application is not registered to send notifications 402 - UNKNOWN_NOTIFICATION Notification type is not registered by the application 500 - INTERNAL_SERVER_ERROR An internal server error occurred while processing the request

  • Access: public

[ Top ]

getErrorDescription   [line 296]

string getErrorDescription( )

Returns the error description

[ Top ]

getOriginMachineName   [line 306]

string getOriginMachineName( )

Returns the machine name/host name of the sending computer
  • Access: public

[ Top ]

getOriginPlatformName   [line 342]

string getOriginPlatformName( )

Returns the identify of the sending computer OS/platform Example1: Microsoft Windows NT 5.1.2600 Service Pack 3 Example2: Mac OS X
  • Access: public

[ Top ]

getOriginPlatformVersion   [line 354]

string getOriginPlatformVersion( )

Returns the version of the sending computer OS/platform Example1: 5.1.2600.196608 Example2: 10.6
  • Access: public

[ Top ]

getOriginSoftwareName   [line 318]

string getOriginSoftwareName( )

Returns the identity of the sending framework Example1: Growl/Win Example2: GrowlAIRConnector
  • Access: public

[ Top ]

getOriginSoftwareVersion   [line 330]

string getOriginSoftwareVersion( )

Returns the version of the sending framework.

Example1: 2.0.0.28 Example2: 1.2

  • Access: public

[ Top ]

getResponseAction   [line 251]

string getResponseAction( )

Returns the request action (REGITER | NOTIFY)
  • Access: public

[ Top ]

getStatus   [line 241]

string getStatus( )

Returns the status code (OK | ERROR)
  • Access: public

[ Top ]

getVersion   [line 231]

string getVersion( )

Returns GNTP protocol version (e.g. 1.0, 1.1)
  • Access: public

[ Top ]

__toString   [line 366]

string __toString( )

Returns the String representation of the Growl response Example1: Response REGISTER OK (Growl/Win 2.0.0.28) Example2: Response ERROR 402 No notifications registered (Growl/Win 2.0.0.28)
  • Access: public

[ Top ]


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