Download the PHP package benycode/slim-middleware without Composer

On this page you can find all versions of the php package benycode/slim-middleware. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package slim-middleware

Slim Middleware bundle

A Slim 4 Framework useful middlewares.

Features

Table of contents

Install

Via Composer

Requires Slim 4.

Health check endpoint usage

Use DI to inject the library Middleware classes:

add the Middleware to any route at the end of the routes:

welcome, your app is within new path:

create health check.

Info endpoint usage

Use DI to inject the library Middleware classes:

add the Middleware to any route at the end of the routes:

welcome, your app is within new path:

Settings setup usage

add the Middleware to a global list:

get the settings:

Exception handler usage

add the Middleware to a global list:

welcome, your app is within new error handler.

APISIX auto route register usage

Idea: Auto create service and routes on the health check procedure.

You can use it with:

Requires curl and docker/k8s health check mechanism.

Balanced with LeaderElectionMiddleware, bring more stability and activate one instance registration functionality.

Use DI to inject the library Middleware classes:

add the Middleware to any route at the end of the routes:

create health check /_health or your defined.

welcome, your app will be auto (re)registered in the APISIX on the every health check.

Leader election usage

Idea: in the microservice world can be more then one instance who can execute the relevant commands and there is a need for those commands to be executed only by one. Vote for the leader using health check mechanizm!

Balanced with the APISIXRegisterMiddleware.

You can use it with:

Requires curl, docker/k8s health check mechanism and ETCD v3.

Use DI to inject the library Middleware classes:

add the Middleware to any route at the end of the routes:

get the leader status:

Endpoint protection with X-Api-Token usage

Idea: Protect you endpoints like health check with Api token.

Use DI to inject the library Middleware classes:

add the Middleware to any route at the end of the routes:


All versions of slim-middleware with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package benycode/slim-middleware contains the following files

Loading the files please wait ....