RetailCRM API Client

TimeInterval

Class TimeInterval

Tags
category

TimeInterval

Table of Contents

Properties

$custom  : string
$from  : DateTime
$to  : DateTime

Methods

__construct()  : mixed
TimeInterval constructor.
withCustomInterval()  : TimeInterval
Returns TimeInterval with provided custom interval.
withTextInterval()  : TimeInterval
Creates a new instance of TimeInterval with provided time boundaries.

Properties

$custom

public string $custom
Tags
JMS\Type

("string")

JMS\SerializedName

("custom")

$from

public DateTime $from
Tags
JMS\Type

("DateTime<'H:i'>")

JMS\SerializedName

("from")

$to

public DateTime $to
Tags
JMS\Type

("DateTime<'H:i'>")

JMS\SerializedName

("to")

Methods

__construct()

TimeInterval constructor.

public __construct([DateTime|null $from = null ][, DateTime|null $to = null ]) : mixed
Parameters
$from : DateTime|null = null
$to : DateTime|null = null

withCustomInterval()

Returns TimeInterval with provided custom interval.

public static withCustomInterval(string $customInterval) : TimeInterval
Parameters
$customInterval : string
Return values
TimeInterval

withTextInterval()

Creates a new instance of TimeInterval with provided time boundaries.

public static withTextInterval(string $from, string $to) : TimeInterval

Time must be in "H:i" format. If time cannot be parsed, then RuntimeException will be thrown.

Parameters
$from : string
$to : string
Return values
TimeInterval

        
On this page

Search results