trait Mutability
Trait Mutability.
Utils to know if the current object is mutable or immutable and convert it.
Traits
Trait Cast.
Methods
static bool
isMutable()
Returns true if the current class/instance is mutable.
static bool
isImmutable()
Returns true if the current class/instance is immutable.
toImmutable()
Return a immutable copy of the instance.
Details
inCastat line31
DateTimeInterface
cast(string$className)
Cast the current instance into the given class.
at line31
staticbool
isMutable()
Returns true if the current class/instance is mutable.
at line41
staticbool
isImmutable()
Returns true if the current class/instance is immutable.
at line51
Carbon
toMutable()
Return a mutable copy of the instance.
at line64
CarbonImmutable
toImmutable()
Return a immutable copy of the instance.