eZPublishCommunityProject  2012.12
eZ\Publish\Core\FieldType\DateAndTime\Value Class Reference

Value for DateAndTime field type. More...

+ Inheritance diagram for eZ\Publish\Core\FieldType\DateAndTime\Value:
+ Collaboration diagram for eZ\Publish\Core\FieldType\DateAndTime\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

 $stringFormat = 'U'
 
 $value
 

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 DateAndTime field type.

Constructor & Destructor Documentation

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

Construct a new Value object and initialize with $dateTime.

Parameters
\DateTime | null$dateTimeDate/Time as a DateTime object or a string understood by the DateTime class
Exceptions
\eZ\Publish\API\Repository\Exceptions\InvalidArgumentExceptionIf $dateTime does not comply to a valid dateTime or string
\eZ\Publish\API\Repository\Exceptions\InvalidArgumentExceptionIf $dateTime does not comply to a valid date format string

Member Function Documentation

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

Creates a Value from the given $dateString.

Parameters
string$dateString
Returns

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

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

Creates a Value from the given $timestamp.

Parameters
int$timestamp
Returns

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

Member Data Documentation

eZ\Publish\Core\FieldType\DateAndTime\Value::$stringFormat = 'U'
eZ\Publish\Core\FieldType\DateAndTime\Value::$value

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