https://mamchenkov.net/wordpress/2015/04/23/stack-reusable-middleware-with-php/
Stack - reusable middleware with PHP