DateTimeInterface
interface DateTimeInterface (View source)
Interface for the ActiveRecord\DateTime class so that ActiveRecord\Model->assign_attribute() will know to call attribute_of() on passed values. This is so the DateTime object can flag the model as dirty via $model->flag_dirty() when one of its setters is called.
Methods
void
attribute_of(Model $model, string $attribute_name)
Indicates this object is an attribute of the specified model, with the given attribute name.
format($format = null)
Formats the DateTime to the specified format.
static
createFromFormat($format, $time, $tz = null)
See http://php.net/manual/en/datetime.createfromformat.php
Details
at line 24
void
attribute_of(Model $model, string $attribute_name)
Indicates this object is an attribute of the specified model, with the given attribute name.
at line 29
format($format = null)
Formats the DateTime to the specified format.
at line 34
static
createFromFormat($format, $time, $tz = null)
See http://php.net/manual/en/datetime.createfromformat.php