Skip to content

Silex service provider that adds query vars to Request from path

Notifications You must be signed in to change notification settings

pmaxs/silex-path2query

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Silex-path2query

Silex service provider that adds query vars to Request from path.

Installation

composer require pmaxs/silex-path2query "^1.0" # for silex v1.x
composer require pmaxs/silex-path2query "^2.0" # for silex v2.x

Usage

Provedier appends parameter to all routes. Than this parameter is parsed and all vars are added to Request query.

Ex.:
route: /blogs/{year}/
url: /blogs/2015/order/rating/page/5
query vars: $request->get('order') - 'rating', $request->get('page') - 5

$app->register(new \Pmaxs\Silex\Path2Query\Provider\Path2QueryServiceProvider(), []);

About

Silex service provider that adds query vars to Request from path

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages