Prismic.io PHP kit  3.0.0
Public Member Functions | List of all members
Prismic\Fragment\Timestamp Class Reference
Inheritance diagram for Prismic\Fragment\Timestamp:
Prismic\Fragment\FragmentInterface

Public Member Functions

 __construct ($value)
 
 asDateTime ()
 
 asHtml ($linkResolver=null)
 
 asText ()
 
 getValue ()
 

Detailed Description

This class embodies a Timestamp fragment.

Constructor & Destructor Documentation

§ __construct()

Prismic\Fragment\Timestamp::__construct (   $value)

Constructs a Timestamp fragment.

Parameters
string$valuethe timestamp's value

Member Function Documentation

§ asDateTime()

Prismic\Fragment\Timestamp::asDateTime ( )

Builds a DateTime from the Timestamp fragment, for further manipulation in native PHP.

Returns
string a DateTime for the fragment

§ asHtml()

Prismic\Fragment\Timestamp::asHtml (   $linkResolver = null)

Builds a HTML version of the timestamp.

Parameters
\Prismic\LinkResolver$linkResolverthe link resolver
Returns
string the HTML version of the timestamp

Implements Prismic\Fragment\FragmentInterface.

§ asText()

Prismic\Fragment\Timestamp::asText ( )

Builds a text version of the timestamp.

Returns
string the text version of the timestamp

Implements Prismic\Fragment\FragmentInterface.

§ getValue()

Prismic\Fragment\Timestamp::getValue ( )

Returns the timestamp's value.

Returns
string the timestamp's value

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