Download the PHP package needinfo/router without Composer

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

Needinfo Router

Small, simple and uncomplicated. The router is a PHP route components with abstraction for MVC. Prepared with RESTfull verbs (GET, POST, PUT, PATCH and DELETE), works on its own layer in isolation and can be integrated without secrets to your application.

Pequeno, simples e descomplicado. O router é um componentes de rotas PHP com abstração para MVC. Preparado com verbos RESTfull (GET, POST, PUT, PATCH e DELETE), trabalha em sua própria camada de forma isolada e pode ser integrado sem segredos a sua aplicação.

Needinfo is a set of small and optimized PHP components for common tasks. With them you perform routine tasks with fewer lines, writing less and doing much more.

Needinfo é um conjunto de pequenos e otimizados componentes PHP para tarefas comuns. Com eles você executa tarefas rotineiras com poucas linhas, escrevendo menos e fazendo muito mais.

Installation

Router is available via Composer:

Documentation

For details on how to use the router, see the sample folder with details in the component directory. To use the router you need to redirect your route routing navigation (index.php) where all traffic must be handled. The example below shows how:

Para mais detalhes sobre como usar o router, veja a pasta de exemplo com detalhes no diretório do componente. Para usar o router é preciso redirecionar sua navegação para o arquivo raiz de rotas (index.php) onde todo o tráfego deve ser tratado.

Apache (.htaccess)

Nginx

1. Basic usage and MVC Pattern

2. Route Decorators (v2.0+)

Agora toda chamada de rota retorna o objeto Needinfo\Router\Route, que permite você injetar dados avançados usados pelo seu sistema MVC:

3. Framework Integrations e Dependency Injection (v2.0+)

Injeção Container Simples

Se seu index for impulsionado por um container, basta setá-lo no Roteador antes do dispatcher. Se houver métodos como has e get (PSR-11), o Router fará ->get('App\Controllers\Web') garantindo autowiring!

Passagem de Contexto (Context Injection)

Muitos frameworks enviam o Request para o Controller ou Callable. Agora você pode passar na chamada de $router->dispatch($context) e recuperar lá dentro:

Matcher Desacoplado

Não quer rodar a lógica new Controller direto do core do Router? Quer varrer e ver se algo casou apenas? O comando match() responde uma Query estruturada!

Contributing

Please see CONTRIBUTING for details.

Support

Security: If you discover any security related issues, please email [email protected] instead of using the issue tracker.

License

The MIT License (MIT).


All versions of router with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
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 needinfo/router contains the following files

Loading the files please wait ...