Download the PHP package getmo/smartpush-php-connector without Composer

On this page you can find all versions of the php package getmo/smartpush-php-connector. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package smartpush-php-connector

Smartpush PHP connector

Php library to connect with Smartpush API services.

Installation

Platforms

Use one of the these platforms when you see on the docs above.

Usage

Import the Push class into your project.

Class: Push


Description: Create a new push instance.

Example:

The second and thirth parameters are optional. The second parameter can handle this entry models: 'now', '0000-00-00 00:00:00', '00/00/000 00:00:00', or a valida UNIX timestamp. The thirth paramenter sets a custom name for this Push Notification, so you can track it later on control panel.

Method: setEnvironment()


Description: (Optional) Set the environment you want to use to sent this Push Notification.

Example:

Return:

This method is optional. If you dont set the environment, the lib will guess you choose . If you want to use , use this method with $environment = '0'.

Method: addNotification()


Description: Add a notification to the Push payload.

Example:

Return:

The thirth parameter, $params, must be an or an (If you pass in an array the lib will turn it into an object). The content schema variates according the platform. Consult the REST API docs to obtain the correct schema for the platform that you want to target.

Method: getNotifications()


Description: (Optional) Return an array of Notifications that you have previously configured to send.

Example:

Return:

This method can be used to inspect the Notifications data inside the Push object before sending.

Method: setFilterRange()


Description: (Optional) Set the range days of which the filter will operate when the job is processed. The $range value can be one of there: 7, 15, 30, 60, 90, all, otherwise it will fallback to default: all.

Example:

Return:

Method: setFilterOperator()


Description: (Optional) Set the operator of which the filter will use to do comparisons. The $operator value can be one of there: AND, OR, otherwise it will fallback to default: AND.

Example:

Return:

Method: addTag()


Description: Add a Tag to filter the Push Notification devices.

Example:

Return:

The thirth parameter is optional. If you suppress the parameter the lib will guess you want to (=) this entry. The complete list of comparators you find out in the REST API docs.

Method: getTags()


Description: (Optional) Return an of Tags that you have previously configured to send.

Example:

Return:

This method can be used to inspect the Notifications data inside the Push object before sending.

Method: getPayload()


Description: (Optional) Return the complete payload that you have previously configured to send. If you pass in the first parameter, the method will return a JSON string, otherwise an array.

Example:

Return:

This method can be used to inspect the data inside every notification before sending it.

Method: send()


Description: Send the Push Notification previously configured. If the inputs dont validate this methos will return , otherwise .

Example:

Return:

If this method return probably you forgot to config a notification or a tag.

Method: getResult()


Description: Grab the server response after send a Push Notification. One of the most important information that returns in the JSON string is the pushid.

Example:

Return:

Method: getInfo()


Description: Consult server for the status (and more information) about a Push Notification.

Example:

Return:

Method: cancel().


Description: Cancel and Consult server for the status (and more information) about a Push Notification.

Example:

Return:

You can only cancel Push Notifications which were not sent.

Method: hide().


Description: Cancel and Consult server for the status (and more information) about a Push Notification.

Example:

Return:

Class: Notification


Description: Create a new notification instance.

Example:

Method: getLastNotifications()


Description: Get the last ten (10) notifications of a specific hwid.

Example:

Return:

The second parameter, $options, is optional. It must be an and can have the following keys: show, startingDate, dateFormat. Consult the REST API docs to get more information about there optional arguments.

Method: getLastUnreadNotifications()


Description: Get the last ten (10) unread notifications of a specific hwid (device).

Example:

Return:

The second parameter, $options, is optional. It must be an and can have the following keys: show, startingDate, dateFormat. Consult the REST API docs to get more information about there optional arguments.

Method: getExtraPayload()


Description: Get the extra payload for a specific pushid.

Example:

Return:

Method: readOneNotification()


Description: Mark one Push Notification as READ for a specific hwid (device).

Example:

Method: readAllNotifications()


Description: Mark all Push Notifications as READ for a specific hwid (device).

Example:

Method: hideHwidNotification()


Description: Hide one Push Notification for a specific hwid (device).

Example:

Support

Jonathan Martins, [email protected]

Developed by Getmo


All versions of smartpush-php-connector with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5.9
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package getmo/smartpush-php-connector contains the following files

Loading the files please wait ....