Objects
All objects share a common interface and also overload to their corrosponding official Prismic PHP Kit objects. That means that, unless specifically documented, the fluent wrapper shares to the official Prismic PHP Kit API plus some extras. Any Prismic objects not listed below are not wrapped and are delivered as plain PHP kit objects.
All objects are arrayable and jsonable.
Wrappers
Name | Description |
---|---|
API | The main api client. |
Color | Color fields |
Composite Slice | A slice made up of fields. |
Document | A content type entry made up of fields. |
Embed | An embed field. |
File LInk | A link to a file. Resolves to the actual file. |
GeoPoint | A geographic location. |
Group Doc | A document that is part of a group of documents. |
Image Link | A link to an image. Resolves to the actual image. |
Image View | An image size view. e.g. main, retina, thumbnail... |
Image | An image field |
Response | An API call response |
API
Properties
Properties map to different things depending on the object. On documents, for example, they map to fields. On Images, they map to image views.
Methods
Name | Type | Description |
---|---|---|
getRaw | object | Returns the vanilla object for an attribute |
all | array | Get all the properties. |
has / exists | bool | Does the property exist on the object? |
toArray / asArray | array | Returns the object and it's child relationships as an array |
toJson / asJson | string | Retuns the object and it's child relationships as json |
getRaw: Object
Returns an attributes overloaded object.
all: Array
Get all the properties on an object.
has|exists: Bool
Does a property exist?
has: Bool
Does a property exist?