|
Prismic.io PHP kit
3.0.0
|
Public Member Functions | |
| __construct ($id, $ref, $label, $isMasterRef, $maybeScheduledAt=null) | |
| getId () | |
| getRef () | |
| getLabel () | |
| isMasterRef () | |
| getScheduledAt () | |
| getScheduledAtTimestamp () | |
| getScheduledDate () | |
| __toString () | |
Static Public Member Functions | |
| static | parse ($json) |
Embodies a ref to be called on the prismic.io repository. The ref is a prismic.io concept that represents a time on which you wish to query the repository, in the present (the content that is live now, we call this ref the master ref) or in the future (the content that is planned for a future content release).
This is meant to be built during the unmarshaling of the /api document, and is not meant to be used externally except for testing.
| Prismic\Ref::__construct | ( | $id, | |
| $ref, | |||
| $label, | |||
| $isMasterRef, | |||
$maybeScheduledAt = null |
|||
| ) |
Constructs a Ref object.
| string | $id | the ID of the release |
| string | $ref | the ID of the ref |
| string | $label | the display label of the ref |
| bool | $isMasterRef | is the ref the master ref? |
| int | $maybeScheduledAt | If scheduled, a javascript timestamp in milliseconds otherwise null |
| Prismic\Ref::__toString | ( | ) |
Returns the ref as a displayable information: the ref's ID.
| Prismic\Ref::getId | ( | ) |
Returns the ID of the ref
| Prismic\Ref::getLabel | ( | ) |
Returns the display label of the ref
| Prismic\Ref::getRef | ( | ) |
Returns the reference of the ref
| Prismic\Ref::getScheduledAt | ( | ) |
Returns the time at which the ref is scheduled, if it is
| Prismic\Ref::getScheduledAtTimestamp | ( | ) |
Return the scheduled time as a unix timestamp
| Prismic\Ref::getScheduledDate | ( | ) |
Return the DateTime of the scheduled release if any
| Prismic\Ref::isMasterRef | ( | ) |
Checks if the ref is the master ref
|
static |
Parses a ref.
| $json | the json bit retrieved from the API that represents a ref. |
1.8.12