Download the PHP package dealnews/data-mapper-api without Composer
On this page you can find all versions of the php package dealnews/data-mapper-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download dealnews/data-mapper-api
More information about dealnews/data-mapper-api
Files in dealnews/data-mapper-api
Package data-mapper-api
Short Description API wrapper around data-mapper library
License
Informations about the package data-mapper-api
Data Mapper API
A simple API that can be installed in other projects that exposes the Data Mapper library in said project to other services.
Table of Contents
- Requirements
- Installation
- Usage
- Contributing
Requirements
Installation
Usage
Before using this library, you will need a \DealNews\DataMapper\Repository object that maps your data mappers to object names if you
have not already created one.
You will also need a router of some sort to route API requests to the appropriate code/action. For most cases, you can use the PageMill Router. To help with building routes for the PageMill Router, this library comes with some pre-defined routes and a helper method to make sure input data is properly formatted for the API endpoint.
Routing for just one specific endpoint (if you're only interested in using a portion of the provided endpoints/actions from this library):
Routing for all provided endpoints:
By default, all endpoint paths have a prefix of /api. However, you can change this by passing a different prefix to
either getRoute() or getAllRoutes() methods. Example:
Contributing
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting merge requests for this project.
All versions of data-mapper-api with dependencies
dealnews/data-mapper Version ^3.3
dealnews/db Version ^4.0
moonspot/value-objects Version ^2.1