PHP Classes

PHP Router Library JS: Get HTTP request route based on a hash parameter

Recommend this page to a friend!

  Author Author  
Picture of Sergey Kol'miller
Name: Sergey Kol'miller <contact>
Classes: 3 packages by
Country: Russian Federation Russian Federation
Innovation award
Innovation award
Nominee: 1x


  Detailed description   Download Download .zip .tar.gz   Install with Composer Install with Composer  
This package can get an HTTP request route based on a hash parameter.

It checks a hash parameter value sent via HTTP post and parses and YAML file with route configuration to extract the route definitions associated with the hash value.

The package returns a JSON structure with the definition of the hash routes.

Details

PHP and JavaScript route for hash module.

"require": {

    "symfony/yaml": "^4.0"
}  

"dependencies": {

"ajaxsim": "^1.0.0"

}

_Installation_

php: $~ composer require kolserdav/routejs

js: $~ npm i route-fhash

_Route settings_

file name: /config/route/routes.yaml

#Example routes.yaml
nameroutegroup1 :	#Require field custom name
      hash: #Require field and name
        nameroute1 : filename1::module1 #Custom fields with special format
        nameroure2 : filename2::module2
nameroutegroup2 :
      hash :
        nameroute3 : filename3::module3
        nameroute4 : filename4::module4
        nameroute4 : filename4::module5

_Using php_

script uri: /routejs-data

require_once '../vendor/autoload.php';
use Avir\Hash\Reader;
$s = new Reader();
$s->getRoutes();

_Using javascript_

let route = require('route-fhash');
route('dir/with/route/files');

  Classes of Sergey Kol'miller  >  PHP Router Library JS  >  Download Download .zip .tar.gz  >  Support forum Support forum  >  Blog Blog  >  RSS 1.0 feed RSS 2.0 feed Latest changes  
Name: PHP Router Library JS
Base name: routejs
Description: Get HTTP request route based on a hash parameter
Version: 1.0.0
PHP version: 5
License: MIT/X Consortium License
 
  Groups   Applications   Files Files  

  Groups  
Group folder image HTTP HTTP protocol clients, headers and cookies View top rated classes
Group folder image PHP 5 Classes using PHP 5 specific features View top rated classes


  Applications that use this package  
No pages of applications that use this class were specified.

Add link image If you know an application of this package, send a message to the author to add a link here.

  Files folder image Files  
File Role Description
Files folder imagesrc (1 file, 1 directory)
Plain text file composer.json Data Auxiliary data
Plain text file README.md Doc. Documentation

  Files folder image Files  /  src  
File Role Description
Files folder imageMain (1 file)
  Plain text file Reader.php Class Class source

  Files folder image Files  /  src  /  Main  
File Role Description
  Plain text file Factory.php Class Class source

Install with Composer Install with Composer - Download Download all files: routejs.tar.gz routejs.zip
NOTICE: if you are using a download manager program like 'GetRight', please Login before trying to download this archive.
For more information send a message to info at phpclasses dot org.