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

Class: Services_Apns_Client

Source Location: /Services_Apns-0.1.0/Services/Apns/Client.php

Class Overview


Short description for class


Author(s):

Version:

  • Release: 0.1.0

Copyright:

  • 2013 Yahav Gindi Bar

Variables

Methods


Child classes:

Services_Apns_Client_Message
Client class used to query Apple Push Notifications Service with messages.
Services_Apns_Client_Feedback
Client class used to query Apple Push Notifications Service feedback gateway.

Inherited Variables

Inherited Methods


Class Details

[line 85]
Short description for class

This class provides an abstraction layer implementation used to query Apple Push Notifications Service.

Each class extended from this abstract class should implement a specific APNS gateway.

As I'm writing this class, there're two available gateways: The messaging gateway and the feedback gateway.



[ Top ]


Class Variables

$defaultEnvironment =  self::ENV_PRODUCTION

[line 124]

The default environment
  • Access: protected

Type:   int


[ Top ]

$isConnected =  false

[line 130]

Is the stream socket connected
  • Access: protected

Type:   boolean


[ Top ]

$passPhrase =  null

[line 148]

The password pharse
  • Access: protected

Type:   string


[ Top ]

$socketHandler =  null

[line 136]

The stream socket handler
  • Access: protected

Type:   resource


[ Top ]

$sslCertFilePath =  ''

[line 142]

The file path to the authorized SSL certificate provided by Apple
  • Access: protected

Type:   string


[ Top ]



Method Detail

__destruct (Destructor)   [line 178]

void __destruct( )

Class destructor: used to dispose the connection, in case it was opened
  • Access: public

[ Top ]

close   [line 250]

Services_ApnsAbstractGateway close( )

Close the connection to the APNS gateway
  • Access: public

[ Top ]

connect   [line 194]

Services_Apns_Client connect( [int $environment = null])

Open the connection to Apple Push Notifications service
  • Access: public

Parameters:

int   $environment   —  The environment value

[ Top ]

getApnsProductionUri   [line 159]

string getApnsProductionUri( )

Get the APNS sandbox uri to query
  • Abstract:
  • Access: protected

Overridden in child classes as:

Services_Apns_Client_Message::getApnsProductionUri()
(non-PHPdoc)
Services_Apns_Client_Feedback::getApnsProductionUri()
(non-PHPdoc)

[ Top ]

getApnsSandboxUri   [line 166]

string getApnsSandboxUri( )

Get the APNS sandbox uri to query
  • Abstract:
  • Access: protected

Overridden in child classes as:

Services_Apns_Client_Message::getApnsSandboxUri()
(non-PHPdoc)
Services_Apns_Client_Feedback::getApnsSandboxUri()
(non-PHPdoc)

[ Top ]

getDefaultEnvironment   [line 464]

string getDefaultEnvironment( )

Gets the default environment
  • Access: public

[ Top ]

getPasswordPhrase   [line 425]

string getPasswordPhrase( )

Gets the password phrase
  • Access: public

[ Top ]

getSslCertificateFilePath   [line 396]

string getSslCertificateFilePath( )

Get the file path to the authorized SSL certificate provided by Apple
  • Access: public

[ Top ]

initConnection   [line 272]

Services_ApnsAbstractGateway initConnection( string $gatewayAddress, array $sslData)

Initialize the connection to the APNS gateway
  • Access: protected

Parameters:

string   $gatewayAddress   —  The gateway URI address
array   $sslData   —  Additional SSL data to assign to the stream

[ Top ]

isConnected   [line 475]

boolean isConnected( )

Gets the value that indicates if the stream currently connected to the APNS gateway.
  • Access: public

[ Top ]

read   [line 314]

string|null read( )

Read bytes from the APNS gateway stream
  • Access: protected

[ Top ]

setDefaultEnvironment   [line 437]

Services_ApnsAbstractGateway setDefaultEnvironment( int $value)

Set the default environment
  • Access: public

Parameters:

int   $value   —  The default environment value

[ Top ]

setPasswordPhrase   [line 408]

Services_ApnsAbstractGateway setPasswordPhrase( string $phrase)

Set the password phrase
  • Access: public

Parameters:

string   $phrase   —  The password phrase

[ Top ]

setSslCertificateFilePath   [line 361]

Services_ApnsAbstractGateway setSslCertificateFilePath( string $filePath)

Set the file path to the authorized SSL certificate provided by Apple
  • Access: public

Parameters:

string   $filePath   —  The SSL certificate file path

[ Top ]

write   [line 340]

int write( string $data)

Writes the given data to the socket stream
  • Access: protected

Parameters:

string   $data   —  The data (payload) to write to the stream

[ Top ]


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