Download the PHP package hydrakit/throttle without Composer

On this page you can find all versions of the php package hydrakit/throttle. 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 throttle

Hydra Throttle

Part of the Hydra PHP framework. Documentation: hydra.williamhleucka.com/docs.

Read-only mirror. hydrakit/throttle is developed in hydra-foundation/hydra under packages/throttle, and republished here on every push. A commit pushed to this repository is overwritten by the next one; issues are disabled for that reason, and a pull request opened here cannot be merged. Both belong upstream.

Request rate limiting as PSR-15 middleware. A RateLimitPolicy is a budget (a name, a count and a window in seconds); RateLimiter spends one request against it and refuses with a TooManyRequestsException carrying Retry-After once it is gone. Counting happens in hydrakit/cache's StoreInterface, whose increment() opens the window on the first hit and never re-arms it, so a steady stream cannot hold a budget open past its limit.

RateLimitMiddleware is the application-wide budget, configured from RATE_LIMIT, RATE_LIMIT_WINDOW and RATE_LIMIT_ENABLED. Place it inside the error handler: an unreachable store raises, and the limiter refuses traffic it cannot meter rather than serving it unmetered, which only renders as a 500 if something is there to catch it. A tighter budget for one route is a middleware of its own, named in that route's #[Route(middleware: [...])], holding its own policy and calling the same RateLimiter.

Who the client is comes from hydrakit/http's ClientIpResolver, never from the forwarding header directly: a limiter that reads X-Forwarded-For itself is one a caller resets by prepending a hop.


All versions of throttle with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
hydrakit/core Version ^0.24
hydrakit/http Version ^0.24
hydrakit/cache Version ^0.24
psr/clock Version ^1.0
psr/http-message Version ^2.0
psr/http-server-handler Version ^1.0
psr/http-server-middleware Version ^1.0
psr/log Version ^3.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 hydrakit/throttle contains the following files

Loading the files please wait ...