Zend Framework  1.12
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
Zend_Mobile_Push_Apns Class Reference

Public Member Functions

 getCertificate ()
 Get Certficiate.
 
 setCertificate ($cert)
 Set Certificate.
 
 getCertificatePassphrase ()
 Get Certificate Passphrase.
 
 setCertificatePassphrase ($passphrase)
 Set Certificate Passphrase.
 
 connect ($env=self::SERVER_PRODUCTION_URI)
 Connect to the Push Server.
 
 feedback ()
 Feedback.
 
 send (Zend_Mobile_Push_Message_Abstract $message)
 Send Message.
 
 close ()
 Close Connection.
 
- Public Member Functions inherited from Zend_Mobile_Push_Abstract
 connect ()
 Connect to the Push Server.
 
 send (Zend_Mobile_Push_Message_Abstract $message)
 Send a Push Message.
 
 close ()
 Close the Connection to the Push Server.
 
 isConnected ()
 Is Connected.
 
 setOptions (array $options)
 Set Options.
 

Public Attributes

const SERVER_SANDBOX_URI = 0
 int apple server uri constants
 
const SERVER_PRODUCTION_URI = 1
 
const SERVER_FEEDBACK_SANDBOX_URI = 2
 
const SERVER_FEEDBACK_PRODUCTION_URI = 3
 

Protected Member Functions

 _connect ($uri)
 Connect to Socket.
 
 _read ($length)
 Read from the Socket Server.
 
 _write ($payload)
 Write to the Socket Server.
 

Protected Attributes

 $_serverUriList
 
 $_currentEnv
 
 $_socket
 
 $_certificate
 
 $_certificatePassphrase
 
- Protected Attributes inherited from Zend_Mobile_Push_Abstract
 $_isConnected = false
 

Member Function Documentation

_connect (   $uri)
protected

Connect to Socket.

Parameters
string$uri
Returns
bool
Exceptions
Zend_Mobile_Push_Exception_ServerUnavailable
_read (   $length)
protected

Read from the Socket Server.

Parameters
int$length
Returns
string
_write (   $payload)
protected

Write to the Socket Server.

Parameters
string$payload
Returns
int
close ( )

Close Connection.

Returns
void

Implements Zend_Mobile_Push_Interface.

connect (   $env = self::SERVER_PRODUCTION_URI)

Connect to the Push Server.

Parameters
string$env
Returns
Zend_Mobile_Push_Abstract
Exceptions
Zend_Mobile_Push_Exception
Zend_Mobile_Push_Exception_ServerUnavailable
feedback ( )

Feedback.

Returns
array array w/ key = token and value = time
Exceptions
Zend_Mobile_Push_Exception
Zend_Mobile_Push_Exception_ServerUnavailable
getCertificate ( )

Get Certficiate.

Returns
string
getCertificatePassphrase ( )

Get Certificate Passphrase.

Returns
string
setCertificate (   $cert)

Set Certificate.

Parameters
string$cert
Returns
Zend_Mobile_Push_Apns
Exceptions
Zend_Mobile_Push_Exception
setCertificatePassphrase (   $passphrase)

Set Certificate Passphrase.

Parameters
string$passphrase
Returns
Zend_Mobile_Push_Apns
Exceptions
Zend_Mobile_Push_Exception

Member Data Documentation

$_certificate
protected
$_certificatePassphrase
protected
$_currentEnv
protected
$_serverUriList
protected
Initial value:
= array(
'ssl://gateway.sandbox.push.apple.com:2195',
'ssl://gateway.push.apple.com:2195',
'ssl://feedback.sandbox.push.apple.com:2196',
'ssl://feedback.push.apple.com:2196'
)
$_socket
protected
const SERVER_FEEDBACK_PRODUCTION_URI = 3
const SERVER_FEEDBACK_SANDBOX_URI = 2
const SERVER_PRODUCTION_URI = 1
const SERVER_SANDBOX_URI = 0

int apple server uri constants