Mobile/Push/Apns.php
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
Properties


array $_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 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')
Details- Type
- array
Methods


_connect(string $uri) : bool
Connect to Socket
Parameters
Returns
Throws
Name | Type | Description |
---|---|---|
$uri | string |
Type | Description |
---|---|
bool |
Exception | Description |
---|---|
\Zend_Mobile_Push_Exception_ServerUnavailable |


_read(int $length) : string
Read from the Socket Server
Parameters
Returns
Name | Type | Description |
---|---|---|
$length | int |
Type | Description |
---|---|
string |


_write(string $payload) : int
Write to the Socket Server
Parameters
Returns
Name | Type | Description |
---|---|---|
$payload | string |
Type | Description |
---|---|
int |


connect(string $env = self::SERVER_PRODUCTION_URI) : \Zend_Mobile_Push_Abstract
Connect to the Push Server
Parameters
Returns
Throws
Name | Type | Description |
---|---|---|
$env | string |
Type | Description |
---|---|
\Zend_Mobile_Push_Abstract |
Exception | Description |
---|---|
\Zend_Mobile_Push_Exception | |
\Zend_Mobile_Push_Exception_ServerUnavailable |


feedback() : array
Feedback
Returns
Throws
Type | Description |
---|---|
array | array w/ key = token and value = time |
Exception | Description |
---|---|
\Zend_Mobile_Push_Exception | |
\Zend_Mobile_Push_Exception_ServerUnavailable |


send(\Zend_Mobile_Push_Message_Apns $message) : boolean
Send Message
Parameters
Returns
Throws
Name | Type | Description |
---|---|---|
$message | \Zend_Mobile_Push_Message_Apns |
Type | Description |
---|---|
boolean |


setCertificate(string $cert) : \Zend_Mobile_Push_Apns
Set Certificate
Parameters
Returns
Throws
Name | Type | Description |
---|---|---|
$cert | string |
Type | Description |
---|---|
\Zend_Mobile_Push_Apns |
Exception | Description |
---|---|
\Zend_Mobile_Push_Exception |


setCertificatePassphrase(string $passphrase) : \Zend_Mobile_Push_Apns
Set Certificate Passphrase
Parameters
Returns
Throws
Name | Type | Description |
---|---|---|
$passphrase | string |
Type | Description |
---|---|
\Zend_Mobile_Push_Apns |
Exception | Description |
---|---|
\Zend_Mobile_Push_Exception |