On 17 August 2014 00:47, Park Framework <[email protected]> wrote:
> Variable $_PUT is already a popular name.
> Many for yourself already so it was called, at the bottom link.
> http://stackoverflow.com/search?q=PHP+%24_PUT
>
> But I like the name $_DATA - it is universal for any request method.
IMO $_BODY would make more sense, $_DATA is very ambiguous.
> For frontend developers, this name is very clear:
> $.ajax({
> type: "PUT",
> contentType: "application/json",
> data: {"name": "value"}
> });
>
> Except multipart form data, needed and native support for application/json.
>
> In many languages (Java, Python, ASP), it has long been there.
> It is a pity that the PHP in 2014, it has not yet implemented.
For the record, IMHO what is required here is a *bundled* OO request
abstraction extension, which would expose the underlying parser
routines in such a way that conversions of the input to a data
structure can be done with a single call. but *not* make any
assumptions about what is being done in the application. It has never
sat well with me that multipart inputs cannot be accessed as a raw
string.
I haven't actually given any though to what this API would look like though...
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php