2017 © Pedro Peláez
 

library flex-input

Flexible input handler for request inputs (POST, GET, PUT, DELETE, REQUEST, FILES, COOKIE) using filter_var()

image

innobrig/flex-input

Flexible input handler for request inputs (POST, GET, PUT, DELETE, REQUEST, FILES, COOKIE) using filter_var()

  • Friday, May 11, 2018
  • by InnoBrig
  • Repository
  • 1 Watchers
  • 2 Stars
  • 58 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 16 % Grown

The README.md

flex-input

Flexible input handler for request inputs (POST, GET, PUT, DELETE, REQUEST, FILES, COOKIE) using filter_var(). It's safe to use with recursive array (ie: will filter each item in sub-arrays)., (*1)

Install

Via composer, (*2)

{ "require": { "innobrig/flex-input": "^1.0" } }, (*3)

Example Use

<?php, (*4)

use InnoBrig\FlexInput\Input;, (*5)

Retrieving the entire GET array:, (*6)

$value = Input::fromGet ();, (*7)

Retrieving a specific item from GET:, (*8)

$value = Input::fromGet ('key');, (*9)

Retrieving a specific item from GET while specifying a default value to be returned if the requested item is not found:, (*10)

$value = Input::fromGet ('key', $defaultValue);, (*11)

Retrieving a specific item from POST while specifying default, filter and args, (*12)

$value = Input::fromPost ('key', $defaultValue, FILTER_SANITIZE_STRING, array(FILTER_FLAG_STRIP_LOW | FILTER_FLAG_STRIP_HIGH));, (*13)

Internally the PHP function filter_var() is used; consult the PHP docs for the various options which are supported., (*14)

Note: per default, values retrieved from input have trim() applied to them., (*15)

The Versions

11/05 2018

dev-master

9999999-dev

Flexible input handler for request inputs (POST, GET, PUT, DELETE, REQUEST, FILES, COOKIE) using filter_var()

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Innovation Brigade

filter cookie request files delete input put post get

11/05 2018

1.0.3

1.0.3.0

Flexible input handler for request inputs (POST, GET, PUT, DELETE, REQUEST, FILES, COOKIE) using filter_var()

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Innovation Brigade

filter cookie request files delete input put post get

20/06 2016

1.0.0

1.0.0.0

Flexible input handler for request inputs (POST, GET, PUT, DELETE, REQUEST, FILES, COOKIE) using filter_var()

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Innovation Brigade

filter cookie request files delete input put post get