DateTimeValue example

public function getTriggers(): int
    {
        return Parser::TRIGGER_SUCCESS;
    }

    public function parse(&$var, Value &$o, int $trigger): void
    {
        if (!$var instanceof DateTime) {
            return;
        }

        $object = new DateTimeValue($var);
        $object->transplant($o);

        $o = $object;
    }
}
Home | Imprint | This part of the site doesn't use cookies.