Download the PHP package celema/router without Composer

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

Celema Router

ci code coverage type coverage psalm level

A PSR-7/PSR-15 compatible router and view dispatcher.

Using your PSR-7 request and response factory:

Routes

Define routes directly or inside callback groups. Configure groups only inside the group callback. Groups apply their prefix, name prefix, middleware, Before handlers, After handlers, and controller to every route in the group, even when those settings are declared after the route lines in the callback.

Preferred route actions are callables and controller method arrays:

Inside a controller group, use bare method names:

Dispatching

RoutingHandler implements PSR-15 RequestHandlerInterface. It matches the request through the router and dispatches the matched route through the dispatcher.

Routing exceptions bubble by default. Catch NotFoundException for 404 responses and MethodNotAllowedException for 405 responses.

Use the low-level match API when you need route inspection before dispatching:

Middleware and handlers run in this order:

  1. Dispatcher middleware
  2. Route middleware
  3. View middleware attributes
  4. Before handlers immediately before the view
  5. View execution
  6. After handlers for rendering or response changes

Use PSR middleware for cross-cutting request/response behavior. Use Before for final request changes before the view. Use After to render arbitrary view data or modify a response.

URL generation

Use named routes through the router. Generated URLs include the router prefix and fail fast when path params are missing, unknown, or do not match route constraints.

Static assets stay separate from named routes:

License

This project is licensed under the MIT license.


All versions of router with dependencies

PHP Build Version
Package Version
Requires php Version ^8.5
psr/container Version ^2.0
psr/http-message Version ^1.1 || ^2.0
psr/http-message-implementation Version ^1.0
psr/http-server-handler Version ^1.0
psr/http-server-middleware Version ^1.0
celema/wire Version ^0.7
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 celema/router contains the following files

Loading the files please wait ...