trait Cast

Trait Cast.

Utils to cast into an other class.

Methods

cast(string$className)

Cast the current instance into the given class.

Details

at line31
DateTimeInterface cast(string$className)

Cast the current instance into the given class.

Parameters

string $className The $className::instance() method will be called to cast the current object.

Return Value

DateTimeInterface