eZPublishCommunityProject  2013.5
eZ\Publish\Core\FieldType\Date\Value Class Reference

Value for Date field type. More...

+ Inheritance diagram for eZ\Publish\Core\FieldType\Date\Value:
+ Collaboration 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\Core\FieldType\Value
 __toString ()
 Returns a string representation of the field value. More...
 
- Public Member Functions inherited from eZ\Publish\API\Repository\Values\ValueObject
 __construct (array $properties=array())
 Construct object optionally with a set of 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...
 
 __set ($property, $value)
 Magic set function handling writes 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=array())
 Function where list of properties are returned. More...
 

Detailed Description

Value for Date field type.

Constructor & Destructor Documentation

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

Construct a new Value object and initialize with $dateTime.

Parameters
\DateTime | null$dateTimeDate as a DateTime object

Member Function Documentation

eZ\Publish\Core\FieldType\Date\Value::__toString ( )
See Also
static eZ\Publish\Core\FieldType\Date\Value::fromString (   $dateString)
static

Creates a Value from the given $dateString.

Exceptions
\eZ\Publish\API\Repository\Exceptions\InvalidArgumentException
Parameters
string$dateString
Returns

Referenced by eZ\Publish\Core\FieldType\Date\Type\fromHash(), and eZ\Publish\Core\FieldType\Date\Type\internalAcceptValue().

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

Creates a Value from the given $timestamp.

Exceptions
\eZ\Publish\API\Repository\Exceptions\InvalidArgumentException
Parameters
int$timestamp
Returns

Referenced by eZ\Publish\Core\FieldType\Date\Type\fromHash(), and eZ\Publish\Core\FieldType\Date\Type\internalAcceptValue().

Member Data Documentation

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

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