Download the PHP package scrawler/router without Composer

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

Scrawler Router

GitHub Workflow Status [![Codecov](https://img.shields.io/codecov/c/gh/scrawler-labs/router?style=flat-square)](https://app.codecov.io/gh/scrawler-labs/router) [![Packagist Version](https://img.shields.io/packagist/v/scrawler/router?style=flat-square)](https://packagist.org/packages/scrawler/router) [![Packagist Downloads](https://img.shields.io/packagist/dt/scrawler/router?style=flat-square)](https://packagist.org/packages/scrawler/router) [![Packagist License](https://img.shields.io/packagist/l/scrawler/router?style=flat-square)](https://packagist.org/packages/scrawler/router)

๐Ÿ”ฅAn Fully Automatic, Framework independent, RESTful PHP Router component๐Ÿ”ฅ
๐Ÿ‡ฎ๐Ÿ‡ณ Made in India ๐Ÿ‡ฎ๐Ÿ‡ณ

Demo

Complete docs can be found here

๐Ÿค” Why use Scrawler Router?

๐Ÿ’ป Installation

You can install Scrawler Router via Composer. If you don't have composer installed , you can download composer from here

โœจ Setup

Note 4.x release changes the way router handles request and response, if you still wanna continue using old way with symfony components goto 3.x branch

Done now whatever request occurs it will be automatically routed . You don't have define a single route

โœ๏ธ Manual routing

Information on manual routing can be found in docs

๐ŸฆŠ How it Works?

The automatic routing is possible by following some conventions. Lets take a example lets say a controller Hello

now calling localhost/hello/world from your browser you will see hello world on your screen.

๐Ÿ”ฅ How does it do it automatically?

Each request to the server is interpreted by Scrawler Router in following way:

METHOD /controller/function/arguments1/arguments2

The controller and function that would be invoked will be

For Example the following call:

GET /user/find/1

would invoke following controller and method

In above example 1 will be passed as argument $id

โ‰๏ธ How should I name my function for automatic routing?

The function name in the controller should be named according to following convention: methodFunctionname Note:The method should always be written in small and the first word of function name should always start with capital. Method is the method used while calling url. Valid methods are:

Some eg. of valid function names are:

Invalid function names are:


๐Ÿ  Website home page

Scrawler Router uses a special function name allIndex() and special controller name Main. So If you want to make a controller for your landing page \ the controller will be defines as follows


๐ŸŒŸ Main Controller

Class name with Main signifies special meaning in Scrawler Router , if you wanna define pages route URL you can use main controler


๐Ÿ‘‰ Index function

Just like Main controller allIndex(), getIndex(), postIndex() etc signifies a special meaning , urls with only controller name and no function name will try to resolve into this function.


๐Ÿ‘ Supporters

If you have reached here consider giving a star to help this project โค๏ธ Stargazers repo roster for @scrawler-labs/router

Thank You for your forks and contributions Forkers repo roster for @scrawler-labs/router

๐Ÿ–ฅ๏ธ Server Configuration

Apache

You may need to add the following snippet in your Apache HTTP server virtual host configuration or .htaccess file.

Alternatively, if youโ€™re lucky enough to be using a version of Apache greater than 2.2.15, then you can instead just use this one, single line:

IIS

For IIS you will need to install URL Rewrite for IIS and then add the following rule to your web.config:

Nginx

Under the server block of your virtual host configuration, you only need to add three lines.

๐Ÿ“„ License

Scrawler Router is created by Pranjal Pandey and released under the MIT License.


All versions of router with dependencies

PHP Build Version
Package Version
Requires psr/simple-cache Version ^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 scrawler/router contains the following files

Loading the files please wait ....