Created
June 18, 2013 18:45
-
-
Save freen/5808111 to your computer and use it in GitHub Desktop.
Slim Route closure is treated as Route Middleware when I include Route Middleware after my Route Closure.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$app->get('/collection/:id/', function($id) use ($app) { | |
// This is true: | |
if('Slim\Route' === get_class($id)) { | |
die('Oh no it thinks my route closure is route middleware :('); | |
} | |
}, 'Middleware::oneMiddlewareFunction'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment