Properties

$aDM

$aDM : \Gomoob\Pushwoosh\Model\Notification\ADM

An object which contains specific Pushwoosh notification informations for ADM (Amazon Device Messaging).

Type

\Gomoob\Pushwoosh\Model\Notification\ADM

$android

$android : \Gomoob\Pushwoosh\Model\Notification\Android

The object which contains specific Pushwoosh notification informations for Android (Google Cloud Messaging).

Type

\Gomoob\Pushwoosh\Model\Notification\Android

$conditions

$conditions : array

An array of tag conditions, an AND logical operator is applied between two tag conditions, for exemple to send push notifications to subscribers in Brazil that speaks Portuguese language you need to specify condition like this:

"conditions": [["Country", "EQ", "BR"],["Language", "EQ", "pt"]]

A Tag condition is an array like: [tagName, operator, operand], where

  • tagName : string
  • operator : “LTE”|”GTE”|”EQ”|”BETWEEN”|”IN”
  • operand : string|integer|array

Valid operators for String tags:

  • EQ : tag value equals to operand. Operand must be a string.

Valid operators for Integer tags:

  • GTE : tag value greater then or equals to operand. Operand must be an integer;
  • LTE : tag value less then or equals to operand. Operand must be an integer;
  • EQ : tag value equals to operand. Operand must be an integer;
  • BETWEEN : tag value greater then or equals to min_operand value and tag value less then or equals to max
           operand value. Operand must be an array like: [min_value, max_value].

Valid operators for List tags:

  • IN : Intersect user values and operand. Operand must be an array of strings like:
           ["value 1", "value 2", "value N"].

You cannot use 'filter' and 'conditions' parameters together.

Type

array

$content

$content : string

The text push message delivered to the application.

Type

string

$data

$data : array

Use this only if you want to pass custom data to the application (JSON format) or omit this parameter. Please note that iOS push is limited to 256 bytes.

This will be passed as a "u" parameter in the payload.

Type

array

$devices

$devices : string[]

(Optional) The list of device tokens used to identify the devices to send the notification to.

Not more than 1000 tokens in an array. If set, message will only be delivered to the devices in the list. Ignored if the applications group is used.

Type

string[]

$filter

$filter : string

The name of a filter used to select users to which one messages have to be sent.

This parameter is optional.

Type

string

$iOS

$iOS : \Gomoob\Pushwoosh\Model\Notification\IOS

The object which contains specific Pushwoosh notification informations for IOS (Apple Push Notification Service).

Type

\Gomoob\Pushwoosh\Model\Notification\IOS

$link

$link

$sendDate

$sendDate : \DateTime

The date when the message has to be sent, if a string is provided it must respect the following formats : - 'now' : To indicate the message has to be sent when "now".

  • 'YYYY-MM-DD HH:mm : Specify your own send date.

The value of this property is "now" by default.

Type

\DateTime — | string

$ignoreUserTimezone

$ignoreUserTimezone

$minimizeLink

$minimizeLink : int

Optional parameter, can have the following values : - 0 or false : not minimized - 1 : Google - 2 : Bitly - 3 : Baidu (China)

Default is 1.

Type

int

$pageId

$pageId : int

HTML page id (created from Application’s HTML Pages). Use this if you want to deliver additional HTML content to the application or omit this parameter.

Type

int

$platforms

$platforms : array

Sets the platforms to which ones to send messages, this attribute is an array of integer which can take the following values : - 1 : iOS - 2 : BlackBerry - 3 : Android - 4 : Nokia ASHA - 5 : Windows Phone 7 - 7 : Mac OS X - 8 : Windows 8 - 9 : Amazon - 10: Safari

Type

array

$wNS

$wNS : \Gomoob\Pushwoosh\Model\Notification\WNS

The object which contains specific Pushwoosh notification informations for WNS (Windows Notification Service).

Type

\Gomoob\Pushwoosh\Model\Notification\WNS

Methods

addDevice()

addDevice(string $device) : \Gomoob\Pushwoosh\Model\Notification\Notification

Adds a new device Token to the list of device tokens to identify the devices to send the notification to.

Parameters

string $device

the new device Token to add.

Returns

\Gomoob\Pushwoosh\Model\Notification\Notification

this instance.

getADM()

getADM() : \Gomoob\Pushwoosh\Model\Notification\ADM

Gets the object which contains specific Pushwoosh notification informations for ADM (Amazon Device Messaging).

Returns

\Gomoob\Pushwoosh\Model\Notification\ADM

the object which contains specific Pushwoosh notification

    informations for ADM (Amazon Device Messaging).

getAndroid()

getAndroid() : \Gomoob\Pushwoosh\Model\Notification\Android

Gets the object which contains specific Pushwoosh notification informations for Android (Google Cloud Messaging).

Returns

\Gomoob\Pushwoosh\Model\Notification\Android

getConditions()

getConditions() : array

Gets the array of tag conditions, an AND logical operator is applied between two tag conditions, for exemple to sendpush notifications to subscribers in Brazil that speaks Portuguese language you need to specify condition like this:

"conditions": [["Country", "EQ", "BR"],["Language", "EQ", "pt"]]

A Tag condition is an array like: [tagName, operator, operand], where

  • tagName : string
  • operator : “LTE”|”GTE”|”EQ”|”BETWEEN”|”IN”
  • operand : string|integer|array

Valid operators for String tags:

  • EQ : tag value equals to operand. Operand must be a string.

Valid operators for Integer tags:

  • GTE : tag value greater then or equals to operand. Operand must be an integer;
  • LTE : tag value less then or equals to operand. Operand must be an integer;
  • EQ : tag value equals to operand. Operand must be an integer;
  • BETWEEN : tag value greater then or equals to min_operand value and tag value less then or equals to max
           operand value. Operand must be an array like: [min_value, max_value].

Valid operators for List tags:

  • IN : Intersect user values and operand. Operand must be an array of strings like:
           ["value 1", "value 2", "value N"].

You cannot use 'filter' and 'conditions' parameters together.

Returns

array —

the array of tag conditions.

getContent()

getContent() : string

Gets the text push message delivered to the application.

Returns

string —

the test push message delivered to the application.

getData()

getData() : array

Gets additional data to attach to the notification, use this only if you want to pass custom data to the application (JSON format) or omit this parameter. Please note that iOS push is limited to 256 bytes.

This will be passed as a "u" parameter in the payload.

Returns

array —

an array which represents a JSON object.

getDevices()

getDevices() : string[]

Gets the list of device tokens used to identify the devices to send the notification to, this parameter is optional.

Returns

string[] —

the list of device tokens used to identify the devices to send the notification to, this

    parameter is optional.

getFilter()

getFilter() : string

Gets the name of a filter used to select users to which one messages have to be sent.

This parameter is optional.

Returns

string —

the name of a filter.

isIgnoreUserTimezone()

isIgnoreUserTimezone()

getIOS()

getIOS() : \Gomoob\Pushwoosh\Model\Notification\IOS

Gets the object which contains specific Pushwoosh notification informations for IOS (Apple Push Notification Service).

Returns

\Gomoob\Pushwoosh\Model\Notification\IOS

the object which contains specific Pushwoosh notification

    informations for IOS (Apple Push Notification Service).

getLink()

getLink()

getMac()

getMac() : \Gomoob\Pushwoosh\Model\Notification\Mac

Gets the object which contains specific Pushwoosh notification informations for Mac OS X.

Returns

\Gomoob\Pushwoosh\Model\Notification\Mac

the object which contains specific Pushwoosh notification

    informations for Mac OS X.

getPageId()

getPageId() : int

Gets the HTML page id (created from Application’s HTML Pages). Use this if you want to deliver additional HTML content to the application or omit this parameter.

Returns

int —

the HTML page id.

getPlatforms()

getPlatforms() : array

Gets the platforms to which ones to send messages, this attribute is an array of integer which can take the following values : - 1 : iOS - 2 : BlackBerry - 3 : Android - 4 : Nokia ASHA - 5 : Windows Phone 7 - 7 : Mac OS X - 8 : Windows 8 - 9 : Amazon - 10: Safari

Returns

array —

the platforms where to send push notifications.

getSafari()

getSafari() : \Gomoob\Pushwoosh\Model\Notification\Safari

Gets the object which contains specific Pushwoosh notification informations for Safari.

Returns

\Gomoob\Pushwoosh\Model\Notification\Safari

the object which contains specific Pushwoosh notification

    informations for Safari.

getSendDate()

getSendDate() : \DateTime

Gets the date when the message has to be sent, if a string is provided it must respect the following formats : - 'now' : To indicate the message has to be sent when "now".

  • 'YYYY-MM-DD HH:mm : Specify your own send date.

Returns

\DateTime —

| string the date when the message has to be sent, the returned value is a PHP DateTime or the

    string "now".

getWNS()

getWNS() : \Gomoob\Pushwoosh\Model\Notification\WNS

Gets the object which contains specific Pushwoosh notification informations for WNS (Windows Notification Service).

Returns

\Gomoob\Pushwoosh\Model\Notification\WNS

the object which contains specific Pushwoosh notification

    informations for WNS (Windows Notification Service).

getWP()

getWP() : \Gomoob\Pushwoosh\Model\Notification\WP

Gets the object which contains specific Pushwoosh notification informations for WP (Windows Phone).

Returns

\Gomoob\Pushwoosh\Model\Notification\WP

the object which contains specific Pushwoosh notification

    informations for WP (Windows Phone).

setADM()

setADM(\Gomoob\Pushwoosh\Model\Notification\ADM $aDM) : \Gomoob\Pushwoosh\Model\Notification\Notification

Sets the object which contains specific Pushwoosh notification informations for ADM (Amazon Device Messaging).

Parameters

\Gomoob\Pushwoosh\Model\Notification\ADM $aDM

the object which contains specific Pushwoosh notification

   informations for ADM (Amazon Device Messaging).

Returns

\Gomoob\Pushwoosh\Model\Notification\Notification

this instance.

setAndroid()

setAndroid(\Gomoob\Pushwoosh\Model\Notification\Android $android) : \Gomoob\Pushwoosh\Model\Notification\Notification

Sets the object which contains specific Pushwoosh notification informations for Android (Google Cloud Messaging).

Parameters

\Gomoob\Pushwoosh\Model\Notification\Android $android

the object which contains specific Pushwoosh

   notification informations for Android (Google Cloud Messaging).

Returns

\Gomoob\Pushwoosh\Model\Notification\Notification

this instance.

setConditions()

setConditions(array $conditions) : \Gomoob\Pushwoosh\Model\Notification\Notification

Sets the array of tag conditions, an AND logical operator is applied between two tag conditions, for exemple to sendpush notifications to subscribers in Brazil that speaks Portuguese language you need to specify condition like this:

"conditions": [["Country", "EQ", "BR"],["Language", "EQ", "pt"]]

A Tag condition is an array like: [tagName, operator, operand], where

  • tagName : string
  • operator : “LTE”|”GTE”|”EQ”|”BETWEEN”|”IN”
  • operand : string|integer|array

Valid operators for String tags:

  • EQ : tag value equals to operand. Operand must be a string.

Valid operators for Integer tags:

  • GTE : tag value greater then or equals to operand. Operand must be an integer;
  • LTE : tag value less then or equals to operand. Operand must be an integer;
  • EQ : tag value equals to operand. Operand must be an integer;
  • BETWEEN : tag value greater then or equals to min_operand value and tag value less then or equals to max
           operand value. Operand must be an array like: [min_value, max_value].

Valid operators for List tags:

  • IN : Intersect user values and operand. Operand must be an array of strings like:
           ["value 1", "value 2", "value N"].

You cannot use 'filter' and 'conditions' parameters together.

Parameters

array $conditions

the array of tag conditions.

Returns

\Gomoob\Pushwoosh\Model\Notification\Notification

this instance.

setContent()

setContent(string $content) : \Gomoob\Pushwoosh\Model\Notification\Notification

Sets the text push message delivered to the application.

Parameters

string $content

the text push message delivered to the application.

Returns

\Gomoob\Pushwoosh\Model\Notification\Notification

this instance.

setData()

setData(array $data) : \Gomoob\Pushwoosh\Model\Notification\Notification

Sets the additional data to attach to the notification, use this only if you want to pass custom data to the application (JSON format) or omit this parameter. Please note that iOS push is limited to 256 bytes.

This will be passed as a "u" parameter in the payload.

Parameters

array $data

the additional data to be passed to the notification.

Returns

\Gomoob\Pushwoosh\Model\Notification\Notification

this instance.

setDataParameter()

setDataParameter(string $parameterName, mixed $parameterValue) : \Gomoob\Pushwoosh\Model\Notification\Notification

Sets an additional data parameter or overwrites an existing one.

Parameters

string $parameterName

the name of the additional data parameter to set.

mixed $parameterValue

the value of the additional data parameter to set. This parameter must be compliant

   with JSON primitive types or must be an array.

Returns

\Gomoob\Pushwoosh\Model\Notification\Notification

this instance.

setDevices()

setDevices(string[] $devices) : \Gomoob\Pushwoosh\Model\Notification\Notification

Sets the list of device tokens used to identify the devices to send the notification to, this parameter is optional.

Parameters

string[] $devices

the list of device tokens used to identify the devices to send the notification to, this

   parameter is optional.

Returns

\Gomoob\Pushwoosh\Model\Notification\Notification

this instance.

setFilter()

setFilter(string $filter) : \Gomoob\Pushwoosh\Model\Notification\Notification

Sets the name of a filter used to select users to which one messages have to be sent.

This parameter is optional.

Parameters

string $filter

the name of a filter.

Returns

\Gomoob\Pushwoosh\Model\Notification\Notification

this instance.

setIgnoreUserTimezone()

setIgnoreUserTimezone( $ignoreUserTimezone)

Parameters

$ignoreUserTimezone

setIOS()

setIOS(\Gomoob\Pushwoosh\Model\Notification\IOS $iOS) : \Gomoob\Pushwoosh\Model\Notification\Notification

Sets the object which contains specific Pushwoosh notification informations for IOS (Apple Push Notification Service).

Parameters

\Gomoob\Pushwoosh\Model\Notification\IOS $iOS

the object which contains specific Pushwoosh notification

   informations for IOS (Apple Push Notification Service).

Returns

\Gomoob\Pushwoosh\Model\Notification\Notification

this instance.

setLink()

setLink( $link)

Parameters

$link

setPageId()

setPageId(int $pageId) : \Gomoob\Pushwoosh\Model\Notification\Notification

Sets the HTML page id (created from Application’s HTML Pages). Use this if you want to deliver additional HTML content to the application or omit this parameter.

Parameters

int $pageId

the HTML page id to set1.

Returns

\Gomoob\Pushwoosh\Model\Notification\Notification

this instance.

setPlatforms()

setPlatforms(array $platforms) : \Gomoob\Pushwoosh\Model\Notification\Notification

Sets the platforms to which ones to send messages, this attribute is an array of integer which can take the following values : - 1 : iOS - 2 : BlackBerry - 3 : Android - 4 : Nokia ASHA - 5 : Windows Phone 7 - 7 : Mac OS X - 8 : Windows 8 - 9 : Amazon - 10: Safari

Parameters

array $platforms

the platforms where to send the push notifications.

Returns

\Gomoob\Pushwoosh\Model\Notification\Notification

this instance.

setSendDate()

setSendDate( $sendDate) : \Gomoob\Pushwoosh\Model\Notification\Notification

Sets the date when the message has to be sent, if a string is provided it must respect the following formats : - 'now' : To indicate the message has to be sent when "now".

  • 'YYYY-MM-DD HH:mm : Specify your own send date.

Parameters

$sendDate

Returns

\Gomoob\Pushwoosh\Model\Notification\Notification

this instance.

setWNS()

setWNS(\Gomoob\Pushwoosh\Model\Notification\WNS $wNS) : \Gomoob\Pushwoosh\Model\Notification\Notification

Sets the object which contains specific Pushwoosh notification informations for WNS (Windows Notification Service).

Parameters

\Gomoob\Pushwoosh\Model\Notification\WNS $wNS

the object which contains specific Pushwoosh notification

   informations for WNS (Windows Notification Service).

Returns

\Gomoob\Pushwoosh\Model\Notification\Notification

this instance.

toJSON()

toJSON() : array

Creates a JSON representation of this request.

Returns

array —

a PHP which can be passed to the 'json_encode' PHP method.