Download the PHP package onnerby/doeroute without Composer

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

doeroute

A fast and intuitive PHP Router. Don't make things more complicated than they needs to be. But maybe a little more flexible than this awesome simple router

\Doe\Router

The Doe\Router is a (single file) router where you build your routes using subpaths and closures. The advantage is that the closures are only called if the subpath match which makes it SUPER FAST and easy to follow. It also makes it very easy to delegate specific paths to some kind of controller/action-pattern. After I wrote Doe\Router I found FastRoute that is really fast and very similar to this router and probably a bit more flexible when it comes to multiple variables embedded in the path. They are similar in many ways, but the pattern is slightly different with both pros and cons.

Installation

Basic example

Controller example

If you are building bigger webapps you may like to delegate routes to some kind of controller. The Doe\Router is not connected to any kind of pattern for this - but it's still super simple to delegate the route.

Controller:

Filters

You may also use filters to execute stuff before the routes.

Why another router?

Most routers I've used overcomplicate things. A router is used on the web for parsing the path of the URL to some kind of action. So lets just do that.

A URL is separated by a / and while most routers will define all routes for all paths at once, I decided to parse one segment at a time. I mean - you probably want to do something on each segment anyway in the end. For instance if I build the following routes:

etc, etc. You will not go directly to define /user/[0-9]+/project but will define the different segments down to the whole final path.

The upside with this is that we don't need to define all routes for each request. Instead we look for the first segments and once that's found, we parse the next segment. There is also the advantage that everything inside /user/[0-9]+ has its own callable where we can check access to the user before sending the route futher down the next segment.


All versions of doeroute 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 onnerby/doeroute contains the following files

Loading the files please wait ....