Documentation

AlarmInterface

Provides an interface for managing the alarms on the network.

Table of Contents

Constants

DAILY  : mixed = self::SUNDAY * 2 - 1
FRIDAY  : mixed = self::THURSDAY * 2
MONDAY  : mixed = 1
ONCE  : mixed = 0
SATURDAY  : mixed = self::FRIDAY * 2
SUNDAY  : mixed = self::SATURDAY * 2
THURSDAY  : mixed = self::WEDNESDAY * 2
TUESDAY  : mixed = self::MONDAY * 2
WEDNESDAY  : mixed = self::TUESDAY * 2

Methods

activate()  : AlarmInterface
Make the alarm active.
daily()  : $this|bool
Check or set whether this alarm runs every day or not.
deactivate()  : AlarmInterface
Make the alarm inactive.
delete()  : void
Delete this alarm.
getDuration()  : TimeInterface
Get the duration of the alarm.
getFrequency()  : int
Get the frequency of the alarm.
getFrequencyDescription()  : string
Get the frequency of the alarm as a human readable description.
getId()  : int
Get the id of the alarm.
getMusic()  : UriInterface
Get the music that will be played when this alarm goes off.
getRepeat()  : bool
Check if repeat is active.
getRoom()  : string
Get the room of the alarm.
getShuffle()  : bool
Check if shuffle is active.
getSpeaker()  : SpeakerInterface
Get the speaker of the alarm.
getTime()  : TimeInterface
Get the start time of the alarm.
getVolume()  : int
Get the volume of the alarm.
isActive()  : bool
Check if the alarm is active.
once()  : $this|bool
Check or set whether this alarm is a one time only alarm.
onFriday()  : $this|bool
Check or set whether this alarm is active on fridays.
onMonday()  : $this|bool
Check or set whether this alarm is active on mondays.
onSaturday()  : $this|bool
Check or set whether this alarm is active on saturdays.
onSunday()  : $this|bool
Check or set whether this alarm is active on sundays.
onThursday()  : $this|bool
Check or set whether this alarm is active on thursdays.
onTuesday()  : $this|bool
Check or set whether this alarm is active on tuesdays.
onWednesday()  : $this|bool
Check or set whether this alarm is active on wednesdays.
setDuration()  : AlarmInterface
Set the duration of the alarm.
setFrequency()  : AlarmInterface
Set the frequency of the alarm.
setMusic()  : AlarmInterface
Set the music that will be played when this alarm goes off.
setRepeat()  : AlarmInterface
Turn repeat mode on or off.
setRoom()  : AlarmInterface
Set the room of the alarm.
setShuffle()  : AlarmInterface
Turn shuffle mode on or off.
setSpeaker()  : AlarmInterface
Set the speaker of the alarm.
setTime()  : AlarmInterface
Set the start time of the alarm.
setVolume()  : AlarmInterface
Set the volume of the alarm.

Constants

Methods

daily()

Check or set whether this alarm runs every day or not.

public daily([bool|null $set = null ]) : $this|bool
Parameters
$set : bool|null = null

Set this alarm to be active every day

Return values
$this|bool

Returns true/false when checking, or itself when setting

getFrequency()

Get the frequency of the alarm.

public getFrequency() : int

The result is an integer which can be compared using the bitwise operators and the class constants for each day. If the alarm is a one time only alarm then it will only be equal to the class constant ONCE (none of the days).

Return values
int

getFrequencyDescription()

Get the frequency of the alarm as a human readable description.

public getFrequencyDescription() : string
Return values
string

getId()

Get the id of the alarm.

public getId() : int
Return values
int

getRepeat()

Check if repeat is active.

public getRepeat() : bool
Return values
bool

getRoom()

Get the room of the alarm.

public getRoom() : string
Return values
string

getShuffle()

Check if shuffle is active.

public getShuffle() : bool
Return values
bool

getVolume()

Get the volume of the alarm.

public getVolume() : int
Return values
int

isActive()

Check if the alarm is active.

public isActive() : bool
Return values
bool

once()

Check or set whether this alarm is a one time only alarm.

public once([bool|null $set = null ]) : $this|bool
Parameters
$set : bool|null = null

Set this alarm to be a one time only alarm

Return values
$this|bool

Returns true/false when checking, or itself when setting

onFriday()

Check or set whether this alarm is active on fridays.

public onFriday([bool|null $set = null ]) : $this|bool
Parameters
$set : bool|null = null

Set this alarm to be active or not on fridays

Return values
$this|bool

Returns true/false when checking, or itself when setting

onMonday()

Check or set whether this alarm is active on mondays.

public onMonday([bool|null $set = null ]) : $this|bool
Parameters
$set : bool|null = null

Set this alarm to be active or not on mondays

Return values
$this|bool

Returns true/false when checking, or itself when setting

onSaturday()

Check or set whether this alarm is active on saturdays.

public onSaturday([bool|null $set = null ]) : $this|bool
Parameters
$set : bool|null = null

Set this alarm to be active or not on saturdays

Return values
$this|bool

Returns true/false when checking, or itself when setting

onSunday()

Check or set whether this alarm is active on sundays.

public onSunday([bool|null $set = null ]) : $this|bool
Parameters
$set : bool|null = null

Set this alarm to be active or not on sundays

Return values
$this|bool

Returns true/false when checking, or itself when setting

onThursday()

Check or set whether this alarm is active on thursdays.

public onThursday([bool|null $set = null ]) : $this|bool
Parameters
$set : bool|null = null

Set this alarm to be active or not on thursdays

Return values
$this|bool

Returns true/false when checking, or itself when setting

onTuesday()

Check or set whether this alarm is active on tuesdays.

public onTuesday([bool|null $set = null ]) : $this|bool
Parameters
$set : bool|null = null

Set this alarm to be active or not on tuesdays

Return values
$this|bool

Returns true/false when checking, or itself when setting

onWednesday()

Check or set whether this alarm is active on wednesdays.

public onWednesday([bool|null $set = null ]) : $this|bool
Parameters
$set : bool|null = null

Set this alarm to be active or not on wednesdays

Return values
$this|bool

Returns true/false when checking, or itself when setting

setFrequency()

Set the frequency of the alarm.

public setFrequency(int $frequency) : AlarmInterface
Parameters
$frequency : int

The integer representing the frequency (using the bitwise class constants)

Return values
AlarmInterface
On this page

Search results