PHP Classes

Many Requested: Process HTTP request parameters according to rules

Recommend this page to a friend!

  Author Author  
Picture of Engin Ypsilon
Name: Engin Ypsilon <contact>
Classes: 5 packages by
Country: Germany Germany
Innovation award
Innovation award
Nominee: 1x


  Detailed description   Download Download .zip .tar.gz   Install with Composer Install with Composer  
This package can process HTTP request parameters according to rules.

It can take an array of options as a parameter and return another array with values extracted from the current HTTP request values.

Currently, it can:

- Return request parameter values like the HTTP URL parts

- Return the current locale setting according to the user browser settings

- Fix the HTTP request path removing the www. from the host and duplicated / characters

- The actual user IP address checking different HTTP request parameter values

- Get all request headers

Details

Many Requested

composer require eypsilon/many-requested

<?php
/
 * $ php -S localhost:8000
 * http://localhost:8000/?a&b
 */
use Many\Http\Requested;

require dirname(__DIR__) . '/vendor/autoload.php';

/@var Mixed Requested/
$print_pre('Requested',
    / 
     * @var Bool "$accept_locales" if true, Method returns an extended Locales array based on header("Accept-Language")
     * @var Bool "$fix_path" if true, clear the requesting path, repeatedly "/" and rediret from "www." to none "www."
     * @var Array "$locales" Optional locales settings, expected array
     * @var Array "$keep_parameter" Optional $_GET helper, expects already validated $_GET Key and value 
     */
    (new Requested)->get([
        'accept_locales' => true,
        'fix_path' => true,
        'locales'=> [
            'de' => [
                'id' => 1,
                'title' => 'Deutsch',
                'iso' => 'de',
                'is_default' => true,
            ],
        ],
        'keep_parameter' => [
            'get' => [
                'a' => 'test', 
                'b' => 'parameter'
            ],
            'separator' => '&',
        ]
    ])
);

  Classes of Engin Ypsilon  >  Many Requested  >  Download Download .zip .tar.gz  >  Support forum Support forum  >  Blog Blog  >  RSS 1.0 feed RSS 2.0 feed Latest changes  
Name: Many Requested
Base name: many-requested
Description: Process HTTP request parameters according to rules
Version: 1.0.0
PHP version: 7
License: MIT/X Consortium License
 
  Groups   Applications   Files Files  

  Groups  
Group folder image PHP 7 Classes using PHP 7 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 image.github (1 directory)
Files folder imagesrc (1 directory)
Files folder imagetest (4 files)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file composer.lock Data Auxiliary data
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file README.md Doc. Read me

  Files folder image Files  /  .github  
File Role Description
Files folder imageworkflows (1 file)

  Files folder image Files  /  .github  /  workflows  
File Role Description
  Accessible without login Plain text file php.yml Data Auxiliary data

  Files folder image Files  /  src  
File Role Description
Files folder imagemany (1 directory)

  Files folder image Files  /  src  /  many  
File Role Description
Files folder imageHttp (1 file)

  Files folder image Files  /  src  /  many  /  Http  
File Role Description
  Plain text file Requested.php Class Class source

  Files folder image Files  /  test  
File Role Description
  Accessible without login Plain text file .env Data Auxiliary data
  Accessible without login Plain text file .env.dev Data Auxiliary data
  Accessible without login Plain text file .env.dist Data Auxiliary data
  Accessible without login Plain text file index.php Example Example script

Install with Composer Install with Composer - Download Download all files: many-requested.tar.gz many-requested.zip
NOTICE: if you are using a download manager program like 'GetRight', please Login before trying to download this archive.
  Files folder image Files  
File Role Description
Files folder image.github (1 directory)
Files folder imagesrc (1 directory)
Files folder imagetest (4 files)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file composer.lock Data Auxiliary data
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file README.md Doc. Read me

  Files folder image Files  /  .github  
File Role Description
Files folder imageworkflows (1 file)

  Files folder image Files  /  .github  /  workflows  
File Role Description
  Accessible without login Plain text file php.yml Data Auxiliary data

  Files folder image Files  /  src  
File Role Description
Files folder imagemany (1 directory)

  Files folder image Files  /  src  /  many  
File Role Description
Files folder imageHttp (1 file)

  Files folder image Files  /  src  /  many  /  Http  
File Role Description
  Plain text file Requested.php Class Class source

  Files folder image Files  /  test  
File Role Description
  Accessible without login Plain text file .env Data Auxiliary data
  Accessible without login Plain text file .env.dev Data Auxiliary data
  Accessible without login Plain text file .env.dist Data Auxiliary data
  Accessible without login Plain text file index.php Example Example script

Install with Composer Install with Composer - Download Download all files: many-requested.tar.gz many-requested.zip
NOTICE: if you are using a download manager program like 'GetRight', please Login before trying to download this archive.