Zend_Mobile_Push Introduction - Zend_Mobile_Push

Zend_Mobile_Push Introduction

Zend_Mobile_Push provides the ability for sending push notifications to the vendor specific notification servers. Currently this list includes APNS (iTouch/iPad/iPhone), GCM (Google Android) and MPNS (Windows Phone).

Since many of the underlying implementations vary; please see each specific notification class for usage details. Outlined below are details on the common functionality that exists between the implementations.

Common Functionality

While each individual push notification adapter contains specific functionality; there are commonalities that have been attempted to make implementation of the adapters easier.

Method Description
close Allows you to close an already open connection; if no connection is open will simply default the state.
connect Generally only utilized for APNS; however, assists in maintaining the connection state.
isConnected Allows you to see if you are already connected.
send Allows you to pass in a message to send. This will send the message to the corresponding system. Note that the send method for APNS will lazily connect if you are not already connected.
setOptions Allows you to set options in bulk for the adapters.

Each individual message varies in implementation; again like adapters there are some commonalities that have been addressed to ensure consistency between messages.

Method Description
(set|get)Token Allows you to set or get the token or device id / unique id that is for any specific device. For APNS this is the device ID, for GCM it is the registration id and for MPNS it equates to the push url.
(set|get)Id Sets the distict message id that you would give a message.
setOptions Allows you to set a messages options in bulk.
validate Does a very simple test on the message to ensure that it can be sent through the adapter.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.