PHP Classes

WayMaker PHP Get Route Parameters: Parse request route path to extract its parameters

Recommend this page to a friend!
  Info   View files Documentation   View files View files (3)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2022-01-25 (5 months ago) RSS 2.0 feedNot yet rated by the usersTotal: 4 All time: 10,702 This week: 153Up
Version License PHP version Categories
waymaker 1.0GNU General Publi...5HTTP, PHP 5, Parsers
Description Author

This class can parse the request route path to extract its parameters.

It can take a string with an HTTP route specification as a parameter and parses it to extract its parameters.

Currently, it can extract the route controller name and a list of parameter names that may define the actions that a controller may execute.

Picture of Ali YILMAZ
Name: Ali YILMAZ <contact>
Classes: 14 packages by
Country: Turkey Turkey
Age: ???
All time rank: 276143 in Turkey Turkey
Week rank: 54 Up1 in Turkey Turkey Up
Innovation award
Innovation award
Nominee: 6x

Details

What is wayMaker ?

It is used to separate the way and parameters.

data:

$str = 'app/controller:insert@redirect';
// $str = 'app/controller:insert';
// $str = 'app/controller';

Out-of-class use:

code:

require_once('Mind.php');
$m = new Mind();
print_r($m::aliyilmaz('wayMaker')->wayMaker($str));

When using it in the class:

code:

print_r(self::aliyilmaz('wayMaker')->wayMaker($str));

output:

Array
(
    [way] => app/controller
    [params] => Array
        (
            [0] => insert
            [1] => redirect
        )

)

Dependencies

This package has no dependencies.

License

Instructions and files in this directory are shared under the GPL3 license.

  Files folder image Files  
File Role Description
Files folder imagesrc (1 file)
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file README.md Doc. Documentation

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

 Version Control Unique User Downloads Download Rankings  
 100%
Total:4
This week:0
All time:10,702
This week:153Up
For more information send a message to info at phpclasses dot org.