Download the PHP package ride/lib-router without Composer

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

Ride: Router Library

Router library of the PHP Ride framework.

Routing is used to translate a incoming HTTP request to a callback.

What's In This Library

Route

A Route defines a request path with the callback.

The definition of a route provides 2 ways for passing arguments to the action:

You can optionally set an id to a route to make retrieval easy in your code. By using ids, you are able to override a path through your configuration without changing your code.

Keep your code clean by implementing only one action in a callback. Limiting a route to a specific, or multiple request methods (GET, POST, ...) can help you with this.

You can set a base URL to a route to limit your action to a certain domain.

A locale can also be set to a route. This is usable to act on localized paths later on the process.

You can help your security layer by adding permissions to your route. The router itself will not take these into account.

Alias

An Alias defines an aliased path for existing paths with query parameters.

It can be forced in order to redirect the original path to the alias.

RouteContainer

A RouteContainer is the collection of your routes. It offers an easy interface to manage the routes and aliases.

Use the route container to generate an URL in order for the aliases to be handled.

Router

The Router is what performes the actual translating of the incoming request to the route. It's a simple interface but a generic implementation is added to the library.

RouterResult

The result of a route action on the router is a RouterResult object.

This object has 3 possible states:

Url

An Url is a mutable object to update and manipulate a generated URL.

Code Sample

Check this code sample to see the possibilities of this library:

Implementations

For more examples, you can check the following implementation of this library:

Installation

You can use Composer to install this library.


All versions of lib-router with dependencies

PHP Build Version
Package Version
No informations.
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 ride/lib-router contains the following files

Loading the files please wait ....