\Gomoob\Pushwoosh\Model\RequestSetTagsRequest

Class which represents Pushwoosh '/setTags' request.

Summary

Methods
Properties
Constants
create()
addTag()
getApplication()
getHwid()
getTags()
hasTag()
removeTag()
setApplication()
setHwid()
setTag()
setTags()
toJSON()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$application
$hwid
$tags
N/A

Properties

$application

$application : string

The Pushwoosh application ID for which one to set tags.

Type

string

$hwid

$hwid : string

The Unique string to identify the device (Please note that accessing UDID on iOS is deprecated and not allowed, one of the alternative ways now is to use MAC address).

Type

string

$tags

$tags : array

The Pushwoosh tags.

Type

array

Methods

create()

create() : \Gomoob\Pushwoosh\Model\Request\SetTagsRequest

Utility function used to create a new instance of the <tt>SetTagsRequest</tt>.

Returns

\Gomoob\Pushwoosh\Model\Request\SetTagsRequest

the new created instance.

addTag()

addTag(string $tagName, mixed $tagValue)

Add a new tag to the Pushwoosh tags.

NOTE: This function cannot be used to overwrite an existing tag, use the '#setTag($tagName, $tagValue)' function if you want to overwrite a tag.

Parameters

string $tagName

the name of the tag to add or update.

mixed $tagValue

the value of the tag to set.

Throws

\Gomoob\Pushwoosh\Exception\PushwooshException

if a tag having the specified name has already been added.

getApplication()

getApplication() : string

Gets the Pushwoosh application ID for which one to set tags.

Returns

string —

the Pushwoosh application ID for which one to set tags.

getHwid()

getHwid() : string

Gets the Unique string to identify the device (Please note that accessing UDID on iOS is deprecated and not allowed, one of the alternative ways now is to use MAC address).

Returns

string —

the Unique string to identify the device (Please note that accessing UDID on iOS is deprecated and

    not allowed, one of the alternative ways now is to use MAC address).

getTags()

getTags() : array

Gets the Pushwoosh tags.

Returns

array —

the Pushwoosh tags.

hasTag()

hasTag(string $tagName) : boolean

Function used to check if a tag having a specified name exists.

Parameters

string $tagName

the name of the tag.

Returns

boolean —

true if a tag having a name equal to $tagName exists, false otherwise.

removeTag()

removeTag(string $tagName)

Function used to remove a tag from the Pushwoosh tags.

NOTE: If you try to remove a tag which does not exists the function has not effect.

Parameters

string $tagName

the name of the tag to remove.

setApplication()

setApplication(string $application) : \Gomoob\Pushwoosh\Model\Request\SetTagsRequest

Sets the Pushwoosh application ID for which one to set tags.

Parameters

string $application

the the Pushwoosh application ID for which one to set tags.

Returns

\Gomoob\Pushwoosh\Model\Request\SetTagsRequest

this instance.

setHwid()

setHwid(string $hwid) : \Gomoob\Pushwoosh\Model\Request\SetTagsRequest

Sets the Unique string to identify the device (Please note that accessing UDID on iOS is deprecated and not allowed, one of the alternative ways now is to use MAC address).

Parameters

string $hwid

the Unique string to identify the device (Please note that accessing UDID on iOS is

   deprecated and not allowed, one of the alternative ways now is to use MAC address).

Returns

\Gomoob\Pushwoosh\Model\Request\SetTagsRequest

this instance.

setTag()

setTag(string $tagName, mixed $tagValue)

Add a new tag to the Pushwoosh tags or overwrites the value of an existing tag.

Parameters

string $tagName

the name of the tag to add or update.

mixed $tagValue

the value of the tag to set.

toJSON()

toJSON() : array

Creates a JSON representation of this request.

Returns

array —

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