whsuite/inputs 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

whsuite/inputs

Composer 安装命令:

composer require whsuite/inputs

包简介

Input helpers for WHSuite Framework

README 文档

README

#Input Helper

Input helper package for dealing with POST / GET / FILE vars.

##Setup

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

\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.

##Usage

There are three other classes which interface with the Inputs class to make life easier.

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

Each of these classes have get / set functions. Access is via dot notation.

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

This would retrieve

$_POST['data']['Invoice']['InvoiceItems']['0']['amount'];

You can then set data to it as well.

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

Just swap Post out for any of the other classes.

\Whsuite\Inputs\Get::get(); \Whsuite\Inputs\Get::set();

\Whsuite\Inputs\Files::get(); \Whsuite\Inputs\Files::set();

Happy Inputting.

统计信息

  • 总下载量: 179
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 1
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: Private
  • 更新时间: 2016-09-28

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固