承接 notihnio/php-multipart-form-data-parser 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

notihnio/php-multipart-form-data-parser

最新稳定版本:2.1.0

Composer 安装命令:

composer require notihnio/php-multipart-form-data-parser

包简介

The missing php functionality to support put, patch, delete, put FORM and MULTIPART requests handling

README 文档

README

The missing php functionality to support put, patch, delete, put, FORM and MULTIPART requests handling

this package is part of notihnio/php-request-parser (https://github.com/notihnio/php-request-parser) which provides full support to PUT PATCH DELETE OPTIONS HEAD TRACE requests

Latest Stable Version Total Downloads License Version PHP Version Require example workflow

Install

composer require notihnio/php-multipart-form-data-parser:^2.0

Usage

use Notihnio\MultipartFormDataParser;

$request = MultipartFormDataParser::parse();

//to access params use
$params = $request->params;

//to access uploaded files
$files = $request->files;

//to access headers use
$headers = $request->headers;

//to access cookies use
$cookies = $request->cookies;

Support for Symfony, Laravel in combination with Swoole, Roadrunner

If you want to use New Era application servers like Roadrunner or Swoole it's highly recommended passing Laravel or Symfony request instance, as parameter, in order to avoid memory leaks

//laravel
use \Illuminate\Http\Request;

//$request found from controller
$parsedRequest = RequestParser::parse($request);
//symfony
use \Symfony\Component\HttpFoundation\Request

//$request found from controller
$parsedRequest = RequestParser::parse($request);

Atlernative Usage

use Notihnio\MultipartFormDataParser;

MultipartFormDataParser::parse();

//to access params
$params = $_PUT or ($_DELETE, $_PATCH etc.. according to the request type)

//to access uploaded files
$files = $_FILES

Authors

  • Notis Mastrandrikos

License

This project is licensed under the MIT License

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-03-08