PHP Class eZ\Publish\Core\FieldType\Time\Value

Inheritance: extends eZ\Publish\Core\FieldType\Value
Datei anzeigen Open project: ezsystems/ezpublish-kernel Class Usage Examples

Public Properties

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

Public Methods

Method Description
__construct ( mixed $seconds = null ) Construct a new Value object and initialize it with $seconds as number of seconds from beginning of day.
__toString ( )
fromDateTime ( DateTime $dateTime ) : Value Creates a Value from the given $dateTime.
fromString ( string $timeString ) : Value Creates a Value from the given $timeString.
fromTimestamp ( integer $timestamp ) : static Creates a Value from the given $timestamp.

Method Details

__construct() public method

Construct a new Value object and initialize it with $seconds as number of seconds from beginning of day.
public __construct ( mixed $seconds = null )
$seconds mixed

__toString() public method

See also: eZ\Publish\Core\FieldType\Value
public __toString ( )

fromDateTime() public static method

Creates a Value from the given $dateTime.
public static fromDateTime ( DateTime $dateTime ) : Value
$dateTime DateTime
return Value

fromString() public static method

Creates a Value from the given $timeString.
public static fromString ( string $timeString ) : Value
$timeString string
return Value

fromTimestamp() public static method

Creates a Value from the given $timestamp.
public static fromTimestamp ( integer $timestamp ) : static
$timestamp integer
return static

Property Details

$stringFormat public_oe property

Time format to be used by {@link __toString()}.
public string $stringFormat
return string

$time public_oe property

Time of day as number of seconds.
public int|null $time
return integer | null