ServiceHours
in package
Time range when orders are being processed.
Hours are timezone-unaware, meaning the ProviderInterface should return them correctly converter, if necessary.
Tags
Table of Contents
Properties
- $end : int
- End of order processing (seconds since midnight).
- $start : int
- Start of order processing (seconds since midnight).
Methods
- __construct() : mixed
- ServiceHours constructor.
- getEnd() : int
- Returns when orders stop being processed.
- getStart() : int
- Returns when orders start being processed.
- setEnd() : $this
- Sets order processing end time.
- setStart() : $this
- Sets order processing start time.
- validateTimestamp() : bool
- Checks whether the given timestamp is valid.
Properties
$end
End of order processing (seconds since midnight).
private
int
$end
$start
Start of order processing (seconds since midnight).
private
int
$start
Methods
__construct()
ServiceHours constructor.
public
__construct(int $start, int $end) : mixed
Parameters
- $start : int
-
processing start time (seconds since midnight)
- $end : int
-
processing end time (seconds since midnight)
Tags
getEnd()
Returns when orders stop being processed.
public
getEnd() : int
Return values
int —processing end time (seconds since midnight)
getStart()
Returns when orders start being processed.
public
getStart() : int
Return values
int —processing start time (seconds since midnight)
setEnd()
Sets order processing end time.
private
setEnd(int $end) : $this
Parameters
- $end : int
-
processing end time (seconds since midnight)
Tags
Return values
$thissetStart()
Sets order processing start time.
private
setStart(int $start) : $this
Parameters
- $start : int
-
processing start time (seconds since midnight)
Tags
Return values
$thisvalidateTimestamp()
Checks whether the given timestamp is valid.
private
validateTimestamp(int $timestamp) : bool
Parameters
- $timestamp : int
-
timestamp
Return values
bool —true
if valid, false
otherwise