Skip to main content

2 posts tagged with "hateoas"

View All Tags

Using bitexpert/pathfinder with willdurand/hateoas

This blog post might be outdated!
This blog post was published more than one year ago and might be outdated!
· 2 min read
Stephan Hochdörfer
Head of IT Business Operations

When I began converting the unKonf API backend to make use of Adroit and Disco I wanted to give the willdurand/Hateoas a try to turn the API into a "real" HATEOAS REST web service. Since we use our Pathfinder component as a router it felt natural to use Pathfinder to generate the links for the relations between the different domain objects. Luckily the willdurand/hateoas is pretty flexible and allows to define custom Url Generators with a few lines of code:

Using Doctrine, ramsey/uuid-doctrine and willdurand/hateoas

This blog post might be outdated!
This blog post was published more than one year ago and might be outdated!
· 2 min read
Stephan Hochdörfer
Head of IT Business Operations

Recently I experimented a bit with Doctrine ORM and the willdurand/Hateoas library to expose my Doctrine objects via an HATEOAS api which luckily is a fairly trivial thing to do. All you need to do is set up the Hateoas serializer and call the respective serialize() method passing your Doctrine object as well the serialization type: