Download the PHP package bradleyhodges/api-manager without Composer

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

APIManager ๐Ÿ“ฆ

APIManager is a robust PHP package that simplifies API development by providing compliant, secure utilities for handling CORS, managing API responses, implementing rate limiting, making HTTP requests, sanitizing input, and much more.

Features ๐ŸŽฏ

Installation ๐Ÿ› ๏ธ

This package is published to Packagist. Recommended installation is via Composer:

If you prefer to go cowboy and always have the latest version, you can also manually add it to your composer.json:

Usage ๐Ÿ“

Basic Setup

PHPDocs

Full documentation is available at https://bradleyhodges.github.io/api-manager. Alternatively, some common usage examples have been included below. I'll probably get around to uploading some examples at some point, but for now, this is the jazz.

HTTP Client Usage ๐ŸŒ

The HTTP class provides a powerful HTTP client built on top of Guzzle, with support for Happy Eyeballs, DNS caching, HTTP/1, 2, and 3, retry logic, and more.

Some really neat features and enhancements are enabled by default, including:

These features are highly configurable and can be enabled or disabled based on your specific needs, giving you full control over how your HTTP requests are handled.

Here's a basic usage example:

If you only need HTTP, you can initialise it with shorthand:

or, even simpler:

You can also configure advanced options such as retries, DNS caching, and HTTP version fallback:

Because the HTTP Class is built on top of Guzzle, you can optionally pass your custom Guzzle config:

If you'd prefer to access Guzzle's methods directly, you can use the getClient method to access the Guzzle client instance and call it's methods as usual:

CORS Configuration ๐ŸŒ

The CORS implementation is RFC 6454 compliant and "just works" with minimal configuration. Simply specify the allowed origins, and the rest is handled for you. If you need more control, you can optionally configure other aspects like allowed methods, headers, and credentials:

API Response Management ๐Ÿ“‹

APIManager implements the JSON:API (v1.1) specification for response formats, ensuring that your API responses follow a standardized format. This makes it easier to integrate with other services and clients that expect JSON:API-compliant responses:

Rate Limiting ๐Ÿ“Š

Rate limiting works out of the box with no configuration needed. Simply calling useRateLimiter() will automatically protect your pages from excessive requests. You can customize the configuration if needed, but the default settings are designed to work without any additional setup:

CSRF Protection ๐Ÿ›ก๏ธ

Automatic Security Headers and Header Customisation ๐Ÿ›ก๏ธ

Input Sanitization ๐Ÿงน

Public Methods Overview ๐Ÿ“–

APIManager

ApiResponseManager

ErrorLogger

HTTP

The following feature flags allow you to customize the behavior of the HTTP client. Some of these features are enabled by default:

License ๐Ÿ“„

This package is open-source and available under the Apache 2.0 License.

Contributions ๐Ÿค

Contributions are welcome! Feel free to submit issues and pull requests.

Contact ๐Ÿ’ฌ

For any questions or support, please raise an Issue.

Happy Coding! ๐Ÿ˜„


All versions of api-manager with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
sergeytsalkov/meekrodb Version ^3.0
guzzlehttp/guzzle Version ^7.9
monolog/monolog Version ^3.7
giggsey/libphonenumber-for-php Version ^8.13
robinvdvleuten/ulid Version ^5.0
vlucas/phpdotenv Version ^5.6
nesbot/carbon Version ^3.8
symfony/validator Version ^7.1
league/flysystem Version 3.0
lcobucci/jwt Version ^4.0
symfony/rate-limiter Version ^7.1
symfony/security-csrf Version ^7.1
phpseclib/phpseclib Version ^3.0
sentry/sentry Version ^4.9
symfony/cache Version ^7.1
spatie/guzzle-rate-limiter-middleware Version ^2.0
react/socket Version ^1.16
psr/simple-cache Version ^3.0
react/event-loop Version ^1.5
react/dns Version ^1.13
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 bradleyhodges/api-manager contains the following files

Loading the files please wait ...