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
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.
This class redefines the way PHP applications handle routing and control. Unlike traditional routes, Div PHP Ways introduces the concept of "ways" to execute actions dynamically in a modular and flexible manner.
Key Features
-
Service-Oriented Architecture (SOA): Adapts SOA principles to PHP applications for enhanced modularity.
-
Hybrid System Integration: Seamlessly integrates components in a hybrid system, providing a cohesive architecture.
- HTTP and CLI Routing: Acts as a robust router for both HTTP and CLI interfaces, offering a unified approach.
Explore the possibilities with Div PHP Ways and elevate your PHP application architecture to new heights!
Examples
php <?php
ways::listen('sql://...', function($data, $args){
ways::listen('sql://query', function($data){
$pdo = new PDO();
$st = $pdo->prepare($data['query']);
$st->execute($data['params']);
$data['result'] = $st->fetchAll(PDO::FETCH_OBJ);
return $data;
});
});
ways::invoke('sql://query', [ 'query' => 'SELECT * FROM cats WHERE name = ?', 'params' => ['Tom'] ]);
bash composer require divengine/ways apacheconfig RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^((?s).*)$ index.php?_url=/$1 [QSA,L]
# CLI app
# Get controller properties
Enjoy!
--
@rafageist
Eng. Rafa Rodriguez
https://rafageist.com
All versions of ways with dependencies
ext-json Version *