Mobile/Push/Apns.php

Show: PublicProtectedPrivateinherited
Table of Contents
Zend Framework
LICENSE This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.
Category
Zend  
Copyright
Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Mobile  
Subpackage
Zend_Mobile_Push  
Version
$Id$  

\Zend_Mobile_Push_Apns

Package: Zend_Mobile\Zend_Mobile_Push
APNS Push
Parent(s)
\Zend_Mobile_Push_Abstract
Children
\Zend_Mobile_Push_Test_ApnsProxy
Category
Zend  
Copyright
Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Version
$Id$  

Constants

>VConstant  SERVER_SANDBOX_URI = 0
Const
int apple server uri constants  
>VConstant  SERVER_PRODUCTION_URI = 1
>VConstant  SERVER_FEEDBACK_SANDBOX_URI = 2
>VConstant  SERVER_FEEDBACK_PRODUCTION_URI = 3

Properties

>VPropertyprotectedstring $_certificate
Certificate
Details
Type
string
>VPropertyprotectedstring $_certificatePassphrase
Certificate Passphrase
Details
Type
string
>VPropertyprotectedint $_currentEnv
Current Environment
Details
Type
int
>VPropertyprotectedarray $_serverUriList = 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')
Apple Server URI's
Default valuearray('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')Details
Type
array
>VPropertyprotectedresource $_socket
Socket
Details
Type
resource

Methods

methodprotected_connect(string $uri) : bool

Connect to Socket

Parameters
NameTypeDescription
$uristring
Returns
TypeDescription
bool
Throws
ExceptionDescription
\Zend_Mobile_Push_Exception_ServerUnavailable
methodprotected_read(int $length) : string

Read from the Socket Server

Parameters
NameTypeDescription
$lengthint
Returns
TypeDescription
string
methodprotected_write(string $payload) : int

Write to the Socket Server

Parameters
NameTypeDescription
$payloadstring
Returns
TypeDescription
int
methodpublicclose() : void

Close Connection

methodpublicconnect(string $env = self::SERVER_PRODUCTION_URI) : \Zend_Mobile_Push_Abstract

Connect to the Push Server

Parameters
NameTypeDescription
$envstring
Returns
TypeDescription
\Zend_Mobile_Push_Abstract
Throws
ExceptionDescription
\Zend_Mobile_Push_Exception
\Zend_Mobile_Push_Exception_ServerUnavailable
methodpublicfeedback() : array

Feedback

Returns
TypeDescription
arrayarray w/ key = token and value = time
Throws
ExceptionDescription
\Zend_Mobile_Push_Exception
\Zend_Mobile_Push_Exception_ServerUnavailable
methodpublicgetCertificate() : string

Get Certficiate

Returns
TypeDescription
string
methodpublicgetCertificatePassphrase() : string

Get Certificate Passphrase

Returns
TypeDescription
string
methodpublicsetCertificate(string $cert) : \Zend_Mobile_Push_Apns

Set Certificate

Parameters
NameTypeDescription
$certstring
Returns
TypeDescription
\Zend_Mobile_Push_Apns
Throws
ExceptionDescription
\Zend_Mobile_Push_Exception
methodpublicsetCertificatePassphrase(string $passphrase) : \Zend_Mobile_Push_Apns

Set Certificate Passphrase

Parameters
NameTypeDescription
$passphrasestring
Returns
TypeDescription
\Zend_Mobile_Push_Apns
Throws
ExceptionDescription
\Zend_Mobile_Push_Exception
Documentation was generated by phpDocumentor 2.2.0 .