Download the PHP package kiryi/routyi without Composer

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

Kiryi's ROUTYI

A routing mechanism for web applications.

Installation

Usage

First set up the routing table. Then use:

All endpoint classes have to implement the Kiryi\Routyi\EndpointInterface and so must have a method run(array $params).

Constructor Definition

Parameters

namespace
Optional namespace your routing table endpoints start with. If no namespace is provided, endpoints have to be configured with their fully qualified namespace in routing table.

routingTableFilepath
Optional filepath to the routing table INI file. It is relative to your project's root directory. If no filepath is provided, default (config/routing.ini) is used (more information).

configFilepath
Optional filepath to a configuration INI file. It is relative to your project's root directory. If no filepath is provided, default (config/routyi.ini) is used. This filepath is only relevant if you are using a subdirectory (more information).

Method Definition route

The Routing Table

The routing table is an INI file consisting of routes (key) and corresponding endpoints (value). The default filepath is config/routing.ini. If you want to change this, see constructor parameter string $rountingTableFilepath.

Basic Structure

The single slash '/' is the default controller. It is used as home page and everytime no actual route is found.

If you want to configure a namespace for the endpoints, see constructor parameter string $namespace and the provided example.

Routes Parameters

The URL will be processed from the longest possible route to the shortest. As soon as a route from the routing table matches, everything after the route part is considered parameters and gets put into an array, which is passed to the run method.

Using a Subdirectory

If you are using a subdirectory for your web application, you have to specify a configuration INI file with the following content:

The default filepath is config/routyi.ini. If you want to change this, see constructor parameter string $configFilepath.

Example

configuration/routes.ini

src/Bootstrap.php

URL mydomain.com will route to MyProject\Controller\HomeController.
URL mydomain.com/about will route to MyProject\Controller\AboutController.
URL mydomain.com/wrong/route will route to MyProject\Controller\HomeController. Since /wrong/route is not a matching route, the part is interpreted as parameters and passed to the run method of the HomeController.


All versions of routyi with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4
kiryi/pathyi Version ^1.0
kiryi/inyi Version ^1.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 kiryi/routyi contains the following files

Loading the files please wait ....