Nextcloud PHP API (master)

INotification

Interface INotification

Tags
since
9.0.0

Table of Contents

Methods

addAction()  : $this
addParsedAction()  : $this
createAction()  : IAction
getActions()  : array<string|int, IAction>
getApp()  : string
getDateTime()  : DateTime
getIcon()  : string
Get the absolute url for the icon (should be colored black or not have a color)
getLink()  : string
getMessage()  : string
getMessageParameters()  : array<string|int, mixed>
getObjectId()  : string
getObjectType()  : string
getParsedActions()  : array<string|int, IAction>
getParsedMessage()  : string
getParsedSubject()  : string
getRichMessage()  : string
getRichMessageParameters()  : array<string|int, array<string|int, mixed>>
getRichSubject()  : string
getRichSubjectParameters()  : array<string|int, array<string|int, mixed>>
getSubject()  : string
getSubjectParameters()  : array<string|int, mixed>
getUser()  : string
isPriorityNotification()  : bool
isValid()  : bool
isValidParsed()  : bool
setApp()  : $this
setDateTime()  : $this
setIcon()  : $this
Set the absolute url for the icon (should be colored black or not have a color)
setLink()  : $this
setMessage()  : $this
setObject()  : $this
setParsedMessage()  : $this
Set a parsed message
setParsedSubject()  : $this
Set a parsed subject
setPriorityNotification()  : $this
setRichMessage()  : $this
Set a RichObjectString message
setRichSubject()  : $this
Set a RichObjectString subject
setSubject()  : $this
setUser()  : $this

Methods

getApp()

public getApp() : string
Tags
since
9.0.0
Return values
string

getDateTime()

public getDateTime() : DateTime
Tags
since
9.0.0
Return values
DateTime

getIcon()

Get the absolute url for the icon (should be colored black or not have a color)

public getIcon() : string

It's automatically color inverted by clients when needed

Tags
since
11.0.0
Return values
string
public getLink() : string
Tags
since
9.0.0
Return values
string

getMessage()

public getMessage() : string
Tags
since
9.0.0
Return values
string

getMessageParameters()

public getMessageParameters() : array<string|int, mixed>
Tags
since
9.0.0
Return values
array<string|int, mixed>

getObjectId()

public getObjectId() : string
Tags
since
9.0.0
Return values
string

getObjectType()

public getObjectType() : string
Tags
since
9.0.0
Return values
string

getParsedActions()

public getParsedActions() : array<string|int, IAction>
Tags
since
9.0.0
Return values
array<string|int, IAction>

getParsedMessage()

public getParsedMessage() : string
Tags
since
9.0.0
Return values
string

getParsedSubject()

public getParsedSubject() : string
Tags
since
9.0.0
Return values
string

getRichMessage()

public getRichMessage() : string
Tags
since
11.0.0
Return values
string

getRichMessageParameters()

public getRichMessageParameters() : array<string|int, array<string|int, mixed>>
Tags
since
11.0.0
Return values
array<string|int, array<string|int, mixed>>

getRichSubject()

public getRichSubject() : string
Tags
since
11.0.0
Return values
string

getRichSubjectParameters()

public getRichSubjectParameters() : array<string|int, array<string|int, mixed>>
Tags
since
11.0.0
Return values
array<string|int, array<string|int, mixed>>

getSubject()

public getSubject() : string
Tags
since
9.0.0
Return values
string

getSubjectParameters()

public getSubjectParameters() : array<string|int, mixed>
Tags
since
9.0.0
Return values
array<string|int, mixed>

getUser()

public getUser() : string
Tags
since
9.0.0
Return values
string

isPriorityNotification()

public isPriorityNotification() : bool
Tags
since
31.0.0
Return values
bool

isValid()

public isValid() : bool
Tags
since
9.0.0
Return values
bool

isValidParsed()

public isValidParsed() : bool
Tags
since
9.0.0
Return values
bool

setIcon()

Set the absolute url for the icon (should be colored black or not have a color)

public setIcon(string $icon) : $this

It's automatically color inverted by clients when needed

Parameters
$icon : string
Tags
throws
InvalidValueException

if the icon is invalid

since
11.0.0
since
30.0.0

throws InvalidValueException instead of \InvalidArgumentException

Return values
$this

setMessage()

public setMessage(string $message[, array<string|int, mixed> $parameters = [] ]) : $this
Parameters
$message : string
$parameters : array<string|int, mixed> = []
Tags
throws
InvalidValueException

if the message or parameters are invalid

since
9.0.0
since
30.0.0

throws InvalidValueException instead of \InvalidArgumentException

Return values
$this

setObject()

public setObject(string $type, string $id) : $this
Parameters
$type : string
$id : string
Tags
throws
InvalidValueException

if the object type or id is invalid

since
9.0.0
since
30.0.0

throws InvalidValueException instead of \InvalidArgumentException

Return values
$this

setParsedMessage()

Set a parsed message

public setParsedMessage(string $message) : $this

HTML is not allowed in the parsed message and will be escaped automatically by the clients. You can use the RichObjectString system provided by the Nextcloud server to highlight important parameters via the setRichMessage method.

See https://github.com/nextcloud/server/issues/1706 for more information.

Parameters
$message : string
Tags
throws
InvalidValueException

if the message is invalid

since
9.0.0
since
30.0.0

throws InvalidValueException instead of \InvalidArgumentException

Return values
$this

setParsedSubject()

Set a parsed subject

public setParsedSubject(string $subject) : $this

HTML is not allowed in the parsed subject and will be escaped automatically by the clients. You can use the RichObjectString system provided by the Nextcloud server to highlight important parameters via the setRichSubject method.

See https://github.com/nextcloud/server/issues/1706 for more information.

Parameters
$subject : string
Tags
throws
InvalidValueException

if the subject is invalid

since
9.0.0
since
30.0.0

throws InvalidValueException instead of \InvalidArgumentException

Return values
$this

setPriorityNotification()

public setPriorityNotification(bool $priorityNotification) : $this
Parameters
$priorityNotification : bool
Tags
throws
InvalidValueException

if the app is not allowed to send priority notifications

since
31.0.0
Return values
$this

setRichMessage()

Set a RichObjectString message

public setRichMessage(string $message[, array<string, array<string, string>> $parameters = [] ]) : $this

HTML is not allowed in the rich message and will be escaped automatically by the clients, but you can use the RichObjectString system provided by the Nextcloud server to highlight important parameters.

See https://github.com/nextcloud/server/issues/1706 for more information.

Parameters
$message : string
$parameters : array<string, array<string, string>> = []
Tags
throws
InvalidValueException

if the message or parameters are invalid

since
11.0.0
since
30.0.0

throws InvalidValueException instead of \InvalidArgumentException

Return values
$this

setRichSubject()

Set a RichObjectString subject

public setRichSubject(string $subject[, array<string, array<string, string>> $parameters = [] ]) : $this

HTML is not allowed in the rich subject and will be escaped automatically by the clients, but you can use the RichObjectString system provided by the Nextcloud server to highlight important parameters.

See https://github.com/nextcloud/server/issues/1706 for more information.

Parameters
$subject : string
$parameters : array<string, array<string, string>> = []
Tags
throws
InvalidValueException

if the subject or parameters are invalid

since
11.0.0
since
30.0.0

throws InvalidValueException instead of \InvalidArgumentException

Return values
$this

setSubject()

public setSubject(string $subject[, array<string|int, mixed> $parameters = [] ]) : $this
Parameters
$subject : string
$parameters : array<string|int, mixed> = []
Tags
throws
InvalidValueException

if the subject or parameters are invalid

since
9.0.0
since
30.0.0

throws InvalidValueException instead of \InvalidArgumentException

Return values
$this

        
On this page

Search results