\duncan3dc\Sonos\Interfaces\UtilsTimeInterface

A class to represent amounts of time.

Summary

Methods
Constants
asInt()
asString()
__toString()
getSeconds()
getMinutes()
getHours()
format()
No constants found
No protected methods found
N/A
No private methods found
N/A

Methods

asInt()

asInt() : integer

Get the number of seconds this instance represents.

Returns

integer

asString()

asString() : string

Get the time in the format hh:mm:ss.

Returns

string

__toString()

__toString() : string

Get the time in the format hh:mm:ss.

Returns

string

getSeconds()

getSeconds() : integer

Get the seconds portion of the time.

Returns

integer

getMinutes()

getMinutes() : integer

Get the minutes portion of the time.

Returns

integer

getHours()

getHours() : integer

Get the hours portion of the time.

Returns

integer

format()

format(string  $format) : string

Format the time in a custom way.

Parameters

string $format

The custom format to use. %h, %m, %s are available, and uppercase versions (%H, %M, %S) ensure a leading zero is present for single digit values

Returns

string