xleliu / Slim-Skeleton

MIT License
5 stars 1 forks source link

How access to method without actions. #1

Closed ssheduardo closed 8 years ago

ssheduardo commented 8 years ago

Hi, In the routes used:

$app->any('/hello/{action}[/[{args}]]', 'App\Controllers\HelloController');

But how uses directly the method getWord

$app->any('/hello/myworld[/[{args}]]', 'App\Controllers\HelloController:getWorld');

I'm sorry for my bad english.

xleliu commented 8 years ago

@ssheduardo I just organize the skeleton with Slim instead of extend any features of it. In fact the second arguments of any must be callabled (https://github.com/slimphp/Slim/blob/3.x/Slim/App.php#L224), so you can not use : here without extend the any method.

My first language is not english too :).