‘PSR-7’ Videos

  • Thorsten Frommen: Using PSR-7 Middleware In Your RESTful WordPress Projects

    Thorsten Frommen: Using PSR-7 Middleware In Your RESTful WordPress Projects

    WordCamp Nijmegen 2017Speaker: Thorsten Frommen

    October 14, 2017 — In the PHP world in general, there is a standard (recommendation) when it comes to HTTP messages: PSR-7. Despite things like Calypso, Gutenberg and the growing JavaScript codebase in general, WordPress is written in PHP. Thus, wouldn’t it be nice to do what the rest of the PHP world is doing? Isn’t there some way to leverage all the existing PSR-7 middleware and incorporate them into the WordPress REST API? Well, there is.

    In this talk, Thorsten will give an overview of the PSR-7 HTTP message interfaces. After that, he will compare these with the structures of WordPress Core, and analyze whether or not they match with the PSR-7 interfaces. Finally, Thorsten will provide a closer look into an example implementation of PSR-7-compliant WordPress REST requests and responses, respectively, and explain their inner workings.