Download the PHP package hybridlogic/router without Composer

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

Router

A drop dead simple URI routing library for PHP, with support for optional parameters and regular expressions.

Build Status

0.0 Table of Contents

1.0 Introduction

Router is a very simple URI request routing library, designed for providing a simple front controller for applications. A request is run against a dictionary of routes, and the first one to match is executed.

It supports expansions for common expressions (numeric, slugs etc), along with full regexes and optional parameter support.

Can be used in front of a full MVC stack, or with simple in-place closures.

2.0 Examples

3.0 Format

Each route you wish to match should have a rule. The rule shouldn't include a beginning or ending slash, except for the homepage, which is just /.

When defining a route, you can specify which HTTP methods it should respond to (GET, POST etc). For example, to only allow GET requests, use ->get(...). A utility method for quickly adding GET and POST is provided via ->any(...).

A route pattern matches a request exactly, that means sub- directories are not included, for example "about" would match /about, but not /about-us or /about/john-smith.

There are three default regex expressions provided:

You can also provide your own regex, e.g.

/about/:[a-z][a-z0-9]+

To make a section optional, simply put a question mark (?) at the end, e.g.

/about/:any?

Example patterns:

Pattern Matches Description
/ / Homepage
about /about Matches optional trailing slash
about/:any? /about/john Match optional directories
archive/:num/:num? /archive/2012/06 Match archive pattern
:all /matches/anything Catch-all handler (404s)

4.0 Running Tests

phpunit tests

5.0 Troubleshooting

Nothing here yet.

6.0 Changelog


All versions of router with dependencies

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

Loading the files please wait ....