|
Prismic.io PHP kit
3.0.0
|
Public Member Functions | |
| __construct ($value) | |
| asHtml ($linkResolver=null) | |
| asText () | |
| asDateTime () | |
| formatted ($pattern) | |
| asEpoch () | |
| getValue () | |
This class embodies a date fragment.
| Prismic\Fragment\Date::__construct | ( | $value | ) |
Constructs a Date fragment.
| string | $value | the date's value |
| Prismic\Fragment\Date::asDateTime | ( | ) |
Builds a DateTime from the Timestamp fragment, for further manipulation in native PHP.
| Prismic\Fragment\Date::asEpoch | ( | ) |
Returns the date as an epoch date.
| Prismic\Fragment\Date::asHtml | ( | $linkResolver = null | ) |
Builds a HTML version of the date.
| \Prismic\LinkResolver | $linkResolver | the link resolver |
Implements Prismic\Fragment\FragmentInterface.
| Prismic\Fragment\Date::asText | ( | ) |
Builds a text version of the date.
Implements Prismic\Fragment\FragmentInterface.
| Prismic\Fragment\Date::formatted | ( | $pattern | ) |
Returns the date following a certain pattern.
| string | $pattern | the pattern, as expected by the date function in PHP |
| Prismic\Fragment\Date::getValue | ( | ) |
Returns the date's value.
1.8.12