Download the PHP package maduser/argon-routing without Composer

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

Argon Routing

PHP Build codecov Psalm Level Latest Version Downloads License: MIT

Argon Routing is the HTTP routing layer that powers the Argon ecosystem.
It is designed around the Argon container, the shared middleware pipeline, and the request-handler resolver. The library embraces those components to provide:

Because of those tight integrations, Argon Routing is not intended for use outside the Argon stack. It has hard runtime dependencies on:

If you need a framework-agnostic router, you should look at an alternative.

Installation

Make sure your project already pulls in maduser/argon-container and maduser/argon-middleware; they are required at runtime. When developing locally inside the Argon monorepo, the path repositories configured there will resolve the packages automatically.

Quick Start

Middleware passed to the router can be concrete middleware service IDs or group aliases from the container's middleware.http tag metadata. Route metadata stores the resolved container service IDs, not the original aliases, so the cached route stack can be handed directly to maduser/argon-middleware. Those service IDs may be concrete middleware classes or interfaces bound in the container.

Once you hand the RouteManager instance to Argon’s middleware pipeline and request-handler resolver (see the main Argon documentation), requests will flow through the registered middleware stacks and invoke your controllers through the container.

Handler Contract

Container-backed routes support these handler definitions:

Route placeholders are forwarded to the container invocation as named arguments. Controller methods should declare those placeholders directly:

Do not expect a single array $args parameter in container-backed handlers. The container prepares controller invocations through reflection, so route arguments are mapped by name.

Not Found Contract

When no route matches the incoming request, RouteMatcher throws Maduser\Argon\Routing\Exception\RouteNotFoundException. The exception carries code 404, which lets Argon runtime error handlers render the failure as an HTTP not-found response instead of an internal-server-error.

Model / DTO Bindings via Interceptors

Frameworks such as Laravel or Symfony implement “route model binding” inside the router. In Argon the router keeps things agnostic: it forwards the raw route arguments (['user' => '42']) into the container, and interceptors take care of loading any richer objects you expect in your controllers.

Instead of hard-coding a single binding strategy in the router, this approach lets you decide how arguments should be turned into rich objects: one interceptor may hydrate entities from IDs, another may validate and map JSON payloads into DTOs, others could parse XML or JSON-RPC requests. Because interceptors are just classes registered with the container, you can combine and layer them however you like. See the Argon container README for more patterns and advanced usage.

Notes


All versions of argon-routing with dependencies

PHP Build Version
Package Version
Requires maduser/argon-container Version ^1.3
maduser/argon-middleware Version ^1.0
maduser/argon-support 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 maduser/argon-routing contains the following files

Loading the files please wait ...