Download the PHP package webberwu/restful-php without Composer

On this page you can find all versions of the php package webberwu/restful-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package restful-php

PHP Restful Package

This package is forked from rainner/restful-php.

This is a small package for working with HTTP input data in PHP. When a POST request comes into PHP, the Content-Type and Content-Body (Raw input) of the request are handled and parsed into the _POST/_FILES arrays. This package parses the raw input body for all RESTful verbs (POST, PUT, DELETE, PATCH, etc.) into the _REQUEST/_FILES arrays and provides a better way for working with uploaded files.

HTTP Input Parser Usage

The Parser class will do the same thing PHP already does for GET/POST data, but for all other REQUEST_METHOD verbs and put the data into the $_REQUEST and $_FILES super globals (Without $_COOKIE).

This class looks at the Content-Type of the request to decide how it will parse the raw content body of the request. As long as the request is formatted properly it should work without any issues. Currently it is capable of parsing the following content types:

Multi-dimentional array type property names (multi[level][name]) are also supported and parsed into regular array by this class.

Restful\Parser public methods:

Name Args Return Description
resolveMethod() none null Resolve request method verb
resolveInput() none null Resolve content-type and other input data
setContentType() $ctype null Set the content-type to use
setBoundary() $boundary null Set the form-data boundary string to use
setRawInput() $input null Set the raw input string to parse
parse() none boolean Parse the input data for different content types

HTTP Files Manager

The Files class will take the $_FILES array and re-format the structure to make it much easier for working with multiple file uploads and nested multi-dimentional array keys, for example:

The form above would have two file dialogue buttons, one accepting a single file, and another accepting multiple files. Here is how we would access these files using the Files class:

Restful\Files public methods:

Name Args Retuen Description
blacklist() $ext1, $ext2, ... null Set a list of file extensions to skip when moving
parse() none null Parses a given FILES array
getParsed() none null Returns the new parsed files array structure
getFiles() $key array Returns a list of files for passed string key
moveFiles() $key, $dirname, $organize array Move list of files to a folder for given key
loopFiles() $key, $callback null Loops over list of files and calls a function on each

Installation & Setup

Manual: Clone this repo somewhere in your project and use the included autoloader to load the included classes:

``

``

Composer: Run the following composer commands to include this package and install the dependency for your project:

``

Author

Rainner Lins: @raintek_

License

Licensed under MIT.


All versions of restful-php with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package webberwu/restful-php contains the following files

Loading the files please wait ....