2017 © Pedro Peláez
 

library inputs

Input helpers for WHSuite Framework

image

whsuite/inputs

Input helpers for WHSuite Framework

  • Tuesday, September 27, 2016
  • by turn24
  • Repository
  • 1 Watchers
  • 1 Stars
  • 104 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 3 Versions
  • 3 % Grown

The README.md

Input Helper

Input helper package for dealing with POST / GET / FILE vars., (*1)

Setup

To setup place the following code somewhere in your system start up. (For WHSuite this will be app/bootstrap.php)., (*2)

\Whsuite\Inputs\Inputs::init();

As default it will clean POST and GET variables from XSS bad things. You can turn this off by pass a boolean value of false in the 'init' function call., (*3)

Usage

There are three other classes which interface with the Inputs class to make life easier., (*4)

  • \Whsuite\Inputs\Post
  • \Whsuite\Inputs\Get
  • \Whsuite\Inputs\Files

Each of these classes have get / set functions. Access is via dot notation., (*5)

\Whsuite\Inputs\Post::get('data.Invoice.InvoiceItems.0.amount');, (*6)

This would retrieve, (*7)

$_POST['data']['Invoice']['InvoiceItems']['0']['amount'];, (*8)

You can then set data to it as well., (*9)

\Whsuite\Inputs\Post::set('data.Invoice.InvoiceItems.0.amount', 'foobar');, (*10)

Just swap Post out for any of the other classes., (*11)

\Whsuite\Inputs\Get::get(); \Whsuite\Inputs\Get::set();, (*12)

\Whsuite\Inputs\Files::get(); \Whsuite\Inputs\Files::set();, (*13)

Happy Inputting., (*14)

The Versions

27/09 2016

dev-master

9999999-dev

Input helpers for WHSuite Framework

  Sources   Download

Private

The Requires

 

by WHSuite

27/09 2016

1.2.0

1.2.0.0

Input helpers for WHSuite Framework

  Sources   Download

Private

The Requires

 

by WHSuite

27/09 2016

1.1.3

1.1.3.0

Input helpers for WHSuite Framework

  Sources   Download

Private

The Requires

 

by WHSuite