Mixin
Trait Boundaries.
startOf, endOf and derived method for each unit.
Depends on the following properties:
Table of Contents
- $daysInMonth : int
- $month : int
- $quarter : int
- $year : int
- $macroContextStack : array<string|int, mixed>
- Stack of macro instance contexts.
- addMonths() : $this
- mixin() : void
- Mix another object into the class.
- setDate() : $this
- setTime() : $this
- bindMacroContext() : mixed
- Stack a Carbon context from inside calls of self::this() and execute a given action.
- this() : static
- Return the current context from inside a macro callee or a new one if static.
- loadMixinClass() : mixed
- loadMixinTrait() : mixed
Properties
$daysInMonth
public
int
$daysInMonth
$month
public
int
$month
$quarter
public
int
$quarter
Depends on the following methods:
$year
public
int
$year
$macroContextStack
Stack of macro instance contexts.
protected
static array<string|int, mixed>
$macroContextStack
= []
Methods
addMonths()
public
addMonths(int $value = 1) : $this
Parameters
- $value = 1 : int
Return values
$this —mixin()
Mix another object into the class.
public
static mixin(object|string $mixin) : void
Parameters
- $mixin : object|string
Tags
Return values
void —setDate()
public
setDate(int $year, int $month, int $day) : $this
Parameters
- $year : int
- $month : int
- $day : int
Return values
$this —setTime()
public
setTime(int $hour, int $minute, int $second = 0, int $microseconds = 0) : $this
Parameters
- $hour : int
- $minute : int
- $second = 0 : int
- $microseconds = 0 : int
Return values
$this —bindMacroContext()
Stack a Carbon context from inside calls of self::this() and execute a given action.
protected
static bindMacroContext(static|null $context, callable $callable) : mixed
Parameters
- $context : static|null
- $callable : callable
Tags
Return values
mixed —this()
Return the current context from inside a macro callee or a new one if static.
protected
static this() : static
Return values
static —loadMixinClass()
private
static loadMixinClass(string $mixin) : mixed
Parameters
- $mixin : string
Tags
Return values
mixed —loadMixinTrait()
private
static loadMixinTrait(string $trait) : mixed
Parameters
- $trait : string