The docs here: https://www.slimframework.com/docs/objects/router.html
… say that a route handler accepts 2 args, but the example code shows 3 (
$args). Then throughout the rest of that docs page, most of the time it retrieves the args via
$request->getAttribute('argname') – except for a few places where it retrieves it via
Is there an intentional architectural decision here as to why there are two different ways to achieve the same thing? Is one approach better than the other under certain circumstances? If it’s just an example of “there’s more than one way to do it”, what’s the idiomatic “Slim Way” that most people use?