Mobile/Push/Test/ApnsProxy.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-2011 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Mobile
- Subpackage
- Push
- Version
- $Id $
\Zend_Mobile_Push_Test_ApnsProxy
Package: Zend\Mobile\Push


















Apns Test Proxy
This class is utilized for unit testing purposes
- Parent(s)
- \Zend_Mobile_Push_Apns < \Zend_Mobile_Push_Abstract
- Category
- Zend
- Copyright
- Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
- Version
- $Id$
Constants
SERVER_SANDBOX_URI
= 0inheritedInherited from:
\Zend_Mobile_Push_Apns::SERVER_SANDBOX_URI
- Const
- int apple server uri constants
- Inherited_from
- \Zend_Mobile_Push_Apns::SERVER_SANDBOX_URI
SERVER_PRODUCTION_URI
= 1inheritedInherited from:
\Zend_Mobile_Push_Apns::SERVER_PRODUCTION_URI
- Inherited_from
- \Zend_Mobile_Push_Apns::SERVER_PRODUCTION_URI
SERVER_FEEDBACK_SANDBOX_URI
= 2inheritedInherited from:
\Zend_Mobile_Push_Apns::SERVER_FEEDBACK_SANDBOX_URI
- Inherited_from
- \Zend_Mobile_Push_Apns::SERVER_FEEDBACK_SANDBOX_URI
SERVER_FEEDBACK_PRODUCTION_URI
= 3inheritedInherited from:
\Zend_Mobile_Push_Apns::SERVER_FEEDBACK_PRODUCTION_URI
- Inherited_from
- \Zend_Mobile_Push_Apns::SERVER_FEEDBACK_PRODUCTION_URI
Properties

string $_certificatePassphraseDetails
- Type
- string
- Inherited_from
- \Zend_Mobile_Push_Apns::$$_certificatePassphrase

boolean $_isConnected = falseinherited
Is Connected
Inherited from:
\Zend_Mobile_Push_Abstract::$$_isConnected\Zend_Mobile_Push_Apns::$$_isConnectedDefault value
falseDetails- Type
- boolean
- Inherited_from
- \Zend_Mobile_Push_Abstract::$$_isConnected
- Inherited_from
- \Zend_Mobile_Push_Apns::$$_isConnected

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')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
- Inherited_from
- \Zend_Mobile_Push_Apns::$$_serverUriList
Methods

_connect(string $uri) : trueConnect
Parameters
Returns
Throws
| Name | Type | Description |
|---|---|---|
| $uri | string |
| Type | Description |
|---|---|
| true |
| Exception | Description |
|---|---|
| \Zend_Mobile_Push_Exception_ServerUnavailable |

_read(string $length) : stringReturn Response
Parameters
Returns
| Name | Type | Description |
|---|---|---|
| $length | string |
| Type | Description |
|---|---|
| string |

_write(string $payload) : intWrite and Return Length
Parameters
Returns
| Name | Type | Description |
|---|---|---|
| $payload | string |
| Type | Description |
|---|---|
| int |

connect(string $env = self::SERVER_PRODUCTION_URI) : \Zend_Mobile_Push_AbstractParameters
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() : arrayReturns
Throws
| Type | Description |
|---|---|
| array | array w/ key = token and value = time |
| Exception | Description |
|---|---|
| \Zend_Mobile_Push_Exception | |
| \Zend_Mobile_Push_Exception_ServerUnavailable |

getCertificatePassphrase() : stringinherited
Get Certificate Passphrase
Inherited from: \Zend_Mobile_Push_Apns::getCertificatePassphrase()Returns
| Type | Description |
|---|---|
| string |

isConnected() : booleaninherited
Is Connected
Inherited from: \Zend_Mobile_Push_Abstract::isConnected()\Zend_Mobile_Push_Apns::isConnected()Returns
| Type | Description |
|---|---|
| boolean |

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

setCertificate(string $cert) : \Zend_Mobile_Push_ApnsParameters
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_Apnsinherited
Set Certificate Passphrase
Inherited from: \Zend_Mobile_Push_Apns::setCertificatePassphrase()Parameters
Returns
Throws
| Name | Type | Description |
|---|---|---|
| $passphrase | string |
| Type | Description |
|---|---|
| \Zend_Mobile_Push_Apns |
| Exception | Description |
|---|---|
| \Zend_Mobile_Push_Exception |

setOptions(array $options) : \Zend_Mobile_Push_Abstractinherited
Set Options
Inherited from: \Zend_Mobile_Push_Abstract::setOptions()\Zend_Mobile_Push_Apns::setOptions()Parameters
Returns
Throws
| Name | Type | Description |
|---|---|---|
| $options | array |
| Type | Description |
|---|---|
| \Zend_Mobile_Push_Abstract |
| Exception | Description |
|---|---|
| \Zend_Mobile_Push_Exception |

setReadResponse(string $str) : \Zend_Mobile_Push_ApnsProxySet the Response
Parameters
Returns
| Name | Type | Description |
|---|---|---|
| $str | string |
| Type | Description |
|---|---|
| \Zend_Mobile_Push_ApnsProxy |