Introduction
Last updated
Was this helpful?
Last updated
Was this helpful?
A simple way to manage data retrieval from APIs and other sources. This package is built using Symfony components and can be used with any PHP application, Symfony, Laravel or plain PHP.
You can use this with the package to help you build a frontend website.
You can:
Read data from REST and GraphQL APIs
Authenticate with APIs
Handle errors consistently
Cache requests to increase performance
Decode data from a variety of formats (e.g. JSON, Markdown)
Transform data (e.g. map a category name)
Work out if data has changed since the last request
All notable changes to strata/data are documented on .
Strata Data has a lightweight architecture.
Data is retrieved via a . This could be a REST API, GraphQL API, or other source. Data providers wrap up data reading functionality along with support for , decoding raw data, error handling and helpers to make development easier.
Single data is returned as either an object or array.
A collection of data is returned as a collection object, containing either objects or arrays.
You use to make running a data request easier. A can be used to manage multiple queries.
Returned data can be modified via or . Transformers change data, while mappers map data to an object or array.
can be automated when you return a collection of results.
You can to check it is valid. This is useful if you need to check data before you use it (e.g. a data import).
can be used to help determine if retrieved data has changed since last access.