Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Collection of PSR-15 middlewares officially developed by Middlewares organization

License

NotificationsYou must be signed in to change notification settings

middlewares/psr15-middlewares

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

logo

PSR-15 Middlewares

Collection ofPSR-15 middlewares

Requirements

Usage example

useLaminas\Diactoros\ServerRequestFactory;useMiddlewares\Utils\Dispatcher;useMiddlewares;$dispatcher =newDispatcher([//Handle errors    (newMiddlewares\ErrorHandler())    ->catchExceptions(true),//Log the requestnewMiddlewares\AccessLog($app->get('logger')),//Calculate the response timenewMiddlewares\ResponseTime(),//Removes the trailing slashnewMiddlewares\TrailingSlash(false),//Insert the UUIDnewMiddlewares\Uuid(),//Disable the search engine robotsnewMiddlewares\Robots(false),//Compress the response to gzipnewMiddlewares\GzipEncoder(),//Minify the htmlnewMiddlewares\HtmlMinifier(),//Override the method using X-Http-Method-Override headernewMiddlewares\MethodOverride(),//Parse the json payloadnewMiddlewares\JsonPayload(),//Parse the urlencoded payloadnewMiddlewares\UrlEncodePayload(),//Save the client ip in the '_ip' attribute    (newMiddlewares\ClientIp())    ->attribute('_ip'),//Allow only some ips    (newMiddlewares\Firewall(['127.0.0.*']))        ->ipAttribute('_ip'),//Add cache expiration headersnewMiddlewares\Expires(),//Add the php debugbarnewMiddlewares\Debugbar(),//Negotiate the content-typenewMiddlewares\ContentType(),//Negotiate the languagenewMiddlewares\ContentLanguage(['gl','es','en']),//Handle the routes with fast-routenewMiddlewares\FastRoute($app->get('dispatcher')),//Create and save a session in '_session' attribute    (newMiddlewares\AuraSession())        ->attribute('_session'),//Handle the routenewMiddlewares\RequestHandler(),]);$response =$dispatcher->dispatch(ServerRequestFactory::fromGlobals());

List of all available middlewares

Authentication

Client info

Develop utils

Optimization

Routers

Security

Session

URLs

Others

Links of interest

Contributing

Use the package repository of each component to notify any issue or pull request related with it, and use this repository for generical questions, new middlewares discussions, etc.

If you want to contribute with new middlewares, you can take a look tothese ideas. There's also askeleton that you can use for quick start.

SeeCONTRIBUTING for contributing details.

Logo

Download the logo fromthe art directory.


The MIT License (MIT). Please seeLICENSE for more information.

About

Collection of PSR-15 middlewares officially developed by Middlewares organization

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors6


[8]ページ先頭

©2009-2025 Movatter.jp