Свойство | Тип | Описание | |
---|---|---|---|
$isHHVM | boolean | Whether or not this object was created in HHVM |
Метод | Описание | |
---|---|---|
__call ( string $name, array $args ) : static | Allow fluent calls on the setters. | |
__callStatic ( string $name, array $args ) : static | Provide static helpers to create instances. Allows: | |
__construct ( integer | null $years = 1, integer | null $months = null, integer | null $weeks = null, integer | null $days = null, integer | null $hours = null, integer | null $minutes = null, integer | null $seconds = null ) | Create a new ChronosInterval instance. | |
__get ( string $name ) : integer | Get a part of the ChronosInterval object | |
__set ( string $name, integer $val ) : void | Set a part of the ChronosInterval object | |
__toString ( ) : string | Returns the ISO 8601 interval string. | |
add ( DateInterval $interval ) : static | Add the passed interval to the current instance | |
create ( integer | null $years = 1, integer | null $months = null, integer | null $weeks = null, integer | null $days = null, integer | null $hours = null, integer | null $minutes = null, integer | null $seconds = null ) : static | Create a new ChronosInterval instance from specific values. | |
instance ( DateInterval $di ) : static | Create a ChronosInterval instance from a DateInterval one. Can not instance DateInterval objects created from DateTime::diff() as you can't externally set the $days field. | |
weeksAndDays ( integer $weeks, integer $days ) : static | Allow setting of weeks and days to be cumulative. |
Метод | Описание | |
---|---|---|
wasCreatedFromDiff ( DateInterval $interval ) : boolean | Determine if the interval was created via DateTime:diff() or not. |
public static __callStatic ( string $name, array $args ) : static | ||
$name | string | The property to configure. Accepts singular and plural forms. |
$args | array | Contains the value to use. |
Результат | static |
public __construct ( integer | null $years = 1, integer | null $months = null, integer | null $weeks = null, integer | null $days = null, integer | null $hours = null, integer | null $minutes = null, integer | null $seconds = null ) | ||
$years | integer | null | The year to use. |
$months | integer | null | The month to use. |
$weeks | integer | null | The week to use. |
$days | integer | null | The day to use. |
$hours | integer | null | The hours to use. |
$minutes | integer | null | The minutes to use. |
$seconds | integer | null | The seconds to use. |
public __toString ( ) : string | ||
Результат | string | Interval as string representation |
public add ( DateInterval $interval ) : static | ||
$interval | DateInterval | The interval to add. |
Результат | static |
public static create ( integer | null $years = 1, integer | null $months = null, integer | null $weeks = null, integer | null $days = null, integer | null $hours = null, integer | null $minutes = null, integer | null $seconds = null ) : static | ||
$years | integer | null | The year to use. |
$months | integer | null | The month to use. |
$weeks | integer | null | The week to use. |
$days | integer | null | The day to use. |
$hours | integer | null | The hours to use. |
$minutes | integer | null | The minutes to use. |
$seconds | integer | null | The seconds to use. |
Результат | static |
public static instance ( DateInterval $di ) : static | ||
$di | DateInterval | The DateInterval instance to copy. |
Результат | static |
protected static wasCreatedFromDiff ( DateInterval $interval ) : boolean | ||
$interval | DateInterval | The interval to check. |
Результат | boolean |
public weeksAndDays ( integer $weeks, integer $days ) : static | ||
$weeks | integer | Number of weeks to set |
$days | integer | Number of days to set |
Результат | static |
protected bool $isHHVM | ||
Результат | boolean |