business\TimeInterval::__construct PHP Méthode

__construct() public méthode

Creates a time interval.
public __construct ( Time $start, Time $end )
$start Time
$end Time
    public function __construct(Time $start, Time $end)
    {
        $this->start = $start;
        $this->end = $end;
        if ($start->isAfterOrEqual($end)) {
            throw new \InvalidArgumentException(sprintf('The opening time "%s" must be before the closing time "%s".', $start->toString(), $end->toString()));
        }
    }