Class

eZ\Publish\Core\FieldType\Time\Value

class Value extends Value

Value for Time field type.

Properties

int|null $time Time of day as number of seconds.
string $stringFormat Time format to be used by {@link __toString()}.

Methods

string __toString()

__construct(mixed $seconds = null)

Construct a new Value object and initialize it with $seconds as number of seconds from beginning of day.

static Value fromDateTime(DateTime $dateTime)

Creates a Value from the given $dateTime.

static Value fromString(string $timeString)

Creates a Value from the given $timeString.

static Value fromTimestamp(int $timestamp)

Creates a Value from the given $timestamp.

Details

at line 100
public string __toString()

Return Value

string

See also

\eZ\Publish\Core\FieldType\Value

at line 40
public __construct(mixed $seconds = null)

Construct a new Value object and initialize it with $seconds as number of seconds from beginning of day.

Parameters

mixed $seconds

at line 52
static public Value fromDateTime(DateTime $dateTime)

Creates a Value from the given $dateTime.

Parameters

DateTime $dateTime

Return Value

Value

at line 68
static public Value fromString(string $timeString)

Creates a Value from the given $timeString.

Parameters

string $timeString

Return Value

Value

Exceptions

InvalidArgumentException

at line 86
static public Value fromTimestamp(int $timestamp)

Creates a Value from the given $timestamp.

Parameters

int $timestamp

Return Value

Value

Exceptions

InvalidArgumentException