$days
$days : array
Provides an interface for managing the alarms on the network.
$network : \duncan3dc\Sonos\Interfaces\NetworkInterface
__construct(\duncan3dc\DomParser\XmlElement $xml, \duncan3dc\Sonos\Interfaces\NetworkInterface $network)
Create an instance of the Alarm class.
\duncan3dc\DomParser\XmlElement | $xml | The xml element with the relevant attributes |
\duncan3dc\Sonos\Interfaces\NetworkInterface | $network | A Network instance this alarm is from |
getSpeaker() : \duncan3dc\Sonos\Interfaces\SpeakerInterface
Get the speaker of the alarm.
setSpeaker(\duncan3dc\Sonos\Interfaces\SpeakerInterface $speaker) : $this
Set the speaker of the alarm.
\duncan3dc\Sonos\Interfaces\SpeakerInterface | $speaker | The speaker to attach this alarm to |
getTime() : \duncan3dc\Sonos\Interfaces\Utils\TimeInterface
Get the start time of the alarm.
setTime(\duncan3dc\Sonos\Interfaces\Utils\TimeInterface $time) : $this
Set the start time of the alarm.
\duncan3dc\Sonos\Interfaces\Utils\TimeInterface | $time | The time to set the alarm for |
getDuration() : \duncan3dc\Sonos\Interfaces\Utils\TimeInterface
Get the duration of the alarm.
setDuration(\duncan3dc\Sonos\Interfaces\Utils\TimeInterface $duration) : $this
Set the duration of the alarm.
\duncan3dc\Sonos\Interfaces\Utils\TimeInterface | $duration | The duration of the alarm |
getFrequency() : integer
Get the frequency of the alarm.
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 not match any of the day constants, but will be equal to the class constant ONCE.
onMonday(boolean $set = null) : boolean|\duncan3dc\Sonos\Interfaces\AlarmInterface
Check or set whether this alarm is active on mondays.
boolean | $set | Set this alarm to be active or not on mondays |
Returns true/false when checking, or AlarmInterface when setting
onTuesday(boolean $set = null) : boolean|\duncan3dc\Sonos\Interfaces\AlarmInterface
Check or set whether this alarm is active on tuesdays.
boolean | $set | Set this alarm to be active or not on tuesdays |
Returns true/false when checking, or AlarmInterface when setting
onWednesday(boolean $set = null) : boolean|\duncan3dc\Sonos\Interfaces\AlarmInterface
Check or set whether this alarm is active on wednesdays.
boolean | $set | Set this alarm to be active or not on wednesdays |
Returns true/false when checking, or AlarmInterface when setting
onThursday(boolean $set = null) : boolean|\duncan3dc\Sonos\Interfaces\AlarmInterface
Check or set whether this alarm is active on thursdays.
boolean | $set | Set this alarm to be active or not on thursdays |
Returns true/false when checking, or AlarmInterface when setting
onFriday(boolean $set = null) : boolean|\duncan3dc\Sonos\Interfaces\AlarmInterface
Check or set whether this alarm is active on fridays.
boolean | $set | Set this alarm to be active or not on fridays |
Returns true/false when checking, or AlarmInterface when setting
onSaturday(boolean $set = null) : boolean|\duncan3dc\Sonos\Interfaces\AlarmInterface
Check or set whether this alarm is active on saturdays.
boolean | $set | Set this alarm to be active or not on saturdays |
Returns true/false when checking, or AlarmInterface when setting
onSunday(boolean $set = null) : boolean|\duncan3dc\Sonos\Interfaces\AlarmInterface
Check or set whether this alarm is active on sundays.
boolean | $set | Set this alarm to be active or not on sundays |
Returns true/false when checking, or AlarmInterface when setting
once(boolean $set = null) : boolean|\duncan3dc\Sonos\Interfaces\AlarmInterface
Check or set whether this alarm is a one time only alarm.
boolean | $set | Set this alarm to be a one time only alarm |
Returns true/false when checking, or AlarmInterface when setting
daily(boolean $set = null) : boolean|\duncan3dc\Sonos\Interfaces\AlarmInterface
Check or set whether this alarm runs every day or not.
boolean | $set | Set this alarm to be active every day |
Returns true/false when checking, or AlarmInterface when setting
onHandler(integer $day, boolean $set = null) : boolean|\duncan3dc\Sonos\Interfaces\AlarmInterface
Check or set whether this alarm is active on a particular day.
integer | $day | Which day to check/set |
boolean | $set | Set this alarm to be active or not on the specified day |
Returns true/false when checking, or AlarmInterface when setting