Download the PHP package romeoz/rock-route without Composer

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

Simple router for PHP

Latest Stable Version Total Downloads Build Status HHVM Status Coverage Status License

Features

Table of Contents

Installation

From the Command Line:

or in your composer.json:

Quick Start

Pattern

You can use string or array as pattern.

'query' => true indicates that the URL-param query was mandatory.

Pattern as string /items/{id:\d+}/ is equivalent to [ Route::FILTER_PATH => '/items/{id:\d+}/' ].

Configurable

Set a rules you can as configurable. Can be useful for using inside your framework.

For groups:

Filters

For using filters you must be installed Rock Filters: composer require romeoz/rock-filters.

An example of disallow by IP (uses $_SERVER['REMOTE_ADDR']):

Custom filter (as callable)

Must returns true/false (boolean).

REST

You can specify what actions to use (only or exclude):

Also you can specify custom REST scenario:

Using groups

Route prefixing

Here, the 'path' => '/api/' is the prefix for the rules of this group.

Sub-Domain routing

Alias for route

Using the as index of our route array you can assign a alias to a route:

Extended example:

Also you can set a alias to group:

All rules belonging to this group will inherit this alias.

For configurable approach you can use the index:

Using response

For using response you must be installed Rock Response: composer require romeoz/rock-response.

More details see docs

Inject arguments

More flexible use is possible using the library Rock DI: composer require romeoz/rock-di.

HMVC (Hierarchical model–view–controller)

For using you must be installed Rock Response: composer require romeoz/rock-response.

Local

Remote

For using you must be installed Guzzle: composer require guzzlehttp/guzzle:6.1.*.

Required PHP 5.5+

Caching rules

For caching rules/groups you must be installed Rock Cache: composer require romeoz/rock-cache.

For reset the cache using flushCache():

Requirements

All unbolded dependencies is optional.

License

Router is open-sourced software licensed under the MIT license.


All versions of rock-route with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
romeoz/rock-components Version 0.14.*
romeoz/rock-request Version 0.14.*
romeoz/rock-sanitize Version 0.11.*
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 romeoz/rock-route contains the following files

Loading the files please wait ....