Download the PHP package divengine/ways without Composer
On this page you can find all versions of the php package divengine/ways. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download divengine/ways
More information about divengine/ways
Files in divengine/ways
Package ways
Short Description Div PHP Ways
License GPL-3.0-or-later
Homepage https://divengine.com/ways
Informations about the package ways
Div PHP Ways 2.4.0
A "way" is different to a "route". We need a path for found a specific resource, but we need a way for do something. This library follow this concept when implements the routing and control of PHP application.
Ways is a class that adapts the concept of SOA to the architecture of a PHP application, and tries to integrate the parts of a hybrid system.
With Ways you should think more about "control points" than on controllers of an MVC pattern. Control points are activated when they are needed, ie on demand, depending on the definition you have made.
On other platforms it is common to define all routes to the drivers in the same file and once. In Ways this is not an obligation. You can have an initial control point and depending on the URI invoked go to another control point X where routes are defined, so that the path is formed on demand, thus improving performance of its application. The structure of a URI may suggest that Ways allows a hierarchical structure of control points, but it does not, it can create a whole graph structure.
A first URI is invoked, from HTTP or CLI. But inside your code you can invoke any URIs
In addition to this, a control point may require the previous execution of another control point. You can also implement events or hooks, so you can execute one control point before or after another, without the latter knowing the existence of the first. These flexibilities are valid for example in a plugins architecture.
The control points can interact, and this means, redirect the flow to another, call control points directly, exchange data and url arguments, handle the output on screen, etc.
In addition, you can establish rules for the execution of control points.
Ways is not only intended for the web but also for command line applications. Ways is implemented in a single class, in a single file. This allows quick start-up and easy adaptation with other platforms.
Documentation
https://github.com/divengine/ways/wiki
Installation
With composer...
Without composer, download the class and...
Basic usage
Call a static method
app/control/Home.php
index.php
.htaccess
CLI app
Get controller properties
Enjoy!
--
@rafageist
Eng. Rafa Rodriguez
All versions of ways with dependencies
ext-json Version *