Exponential 5.x Kernel 7.5.40 Exponential New Stack (Symfony-based) Kernel — PHP Class Reference

Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
eZ\Publish\Core\FieldType\Date\Value Class Reference

Value for Date field type. More...

Inheritance diagram for eZ\Publish\Core\FieldType\Date\Value:

## Public Member Functions
| __construct (DateTime $dateTime=null)
| Construct a new Value object and initialize with $dateTime. More...
| __toString ()
Public Member Functions inherited from eZ\Publish\API\Repository\Values\ValueObject
| __construct (array $properties=[])
| Construct object optionally with a set of properties. More...
| __set ($property, $value)
| Magic set function handling writes to non public properties. More...
| __get ($property)
| Magic get function handling read to non public properties. More...
| __isset ($property)
| Magic isset function handling isset() to non public properties. More...
| __unset ($property)
| Magic unset function handling unset() to non public properties. More...
| attribute ($property)
| Internal function for Legacy template engine compatibility to get property value. More...
| attributes ()
| Internal function for Legacy template engine compatibility to get properties. More...
| hasAttribute ($property)
| Internal function for Legacy template engine compatibility to check existence of property. More...

## Static Public Member Functions
static | fromString ($dateString)
| Creates a Value from the given $dateString. More...
static | fromTimestamp ($timestamp)
| Creates a Value from the given $timestamp. More...
Static Public Member Functions inherited from eZ\Publish\API\Repository\Values\ValueObject
static | __set_state (array $array)
| Returns a new instance of this class with the data specified by $array. More...

## Public Attributes
| $date
| $stringFormat = 'l d F Y'

## Additional Inherited Members
Protected Member Functions inherited from eZ\Publish\API\Repository\Values\ValueObject
| getProperties ($dynamicProperties=[])
| Function where list of properties are returned. More...

## Detailed Description

Value for Date field type.

Definition at line 17 of file Core/FieldType/Date/Value.php.

## Constructor & Destructor Documentation

## ◆ __construct()

eZ\Publish\Core\FieldType\Date\Value::__construct | ( | DateTime | $dateTime = `null` | ) |

Construct a new Value object and initialize with $dateTime.

Parameters

  \DateTime | null | $dateTime | Date as a DateTime object

Definition at line 38 of file Core/FieldType/Date/Value.php.

## Member Function Documentation

## ◆ __toString()

eZ\Publish\Core\FieldType\Date\Value::__toString | ( |  | ) |

See also
  \eZ\Publish\Core\FieldType\Value

Reimplemented from eZ\Publish\Core\FieldType\Value.

Definition at line 86 of file Core/FieldType/Date/Value.php.

## ◆ fromString()

static eZ\Publish\Core\FieldType\Date\Value::fromString | ( |  | $dateString | ) |
| static

Creates a Value from the given $dateString.

Exceptions

Definition at line 56 of file Core/FieldType/Date/Value.php.

## ◆ fromTimestamp()

static eZ\Publish\Core\FieldType\Date\Value::fromTimestamp | ( |  | $timestamp | ) |
| static

Creates a Value from the given $timestamp.

Exceptions

Definition at line 74 of file Core/FieldType/Date/Value.php.

## Member Data Documentation

## ◆ $date

eZ\Publish\Core\FieldType\Date\Value::$date

Definition at line 24 of file Core/FieldType/Date/Value.php.

## ◆ $stringFormat

eZ\Publish\Core\FieldType\Date\Value::$stringFormat = 'l d F Y'

Definition at line 31 of file Core/FieldType/Date/Value.php.

The documentation for this class was generated from the following file:

- Core/FieldType/Date/Value.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.