2017 © Pedro Peláez
 

library symfony-json-request-transformer

A Symfony event listener for decoding JSON encoded request content

image

qandidate/symfony-json-request-transformer

A Symfony event listener for decoding JSON encoded request content

  • Wednesday, January 10, 2018
  • by asm89
  • Repository
  • 10 Watchers
  • 111 Stars
  • 203,141 Installations
  • PHP
  • 3 Dependents
  • 0 Suggesters
  • 16 Forks
  • 0 Open issues
  • 7 Versions
  • 11 % Grown

The README.md

symfony-json-request-transformer

🚨 This repository is archived as it has served its purpose. Symfony has built-in support for this: https://symfony.com/doc/current/components/http_foundation.html#accessing-request-data, (*1)

$request->getPayload()->get('foo');, (*2)

A Symfony event listener for decoding JSON encoded request content., (*3)

build status, (*4)

About

Read the blog post about this repository at http://labs.qandidate.com/blog/2014/08/13/handling-angularjs-post-requests-in-symfony/, (*5)

Install

Install qandidate/symfony-json-request-transformer through composer., (*6)

composer require qandidate/symfony-json-request-transformer

Register the event listener as a service:, (*7)

<service id="kernel.event_listener.json_request_transformer" class="Qandidate\Common\Symfony\HttpKernel\EventListener\JsonRequestTransformerListener">
    <tag name="kernel.event_listener" event="kernel.request" method="onKernelRequest" priority="100" />
</service>
services:
  kernel.event_listener.json_request_transformer:
    class: Qandidate\Common\Symfony\HttpKernel\EventListener\JsonRequestTransformerListener
    tags:
      - { name: kernel.event_listener, event: kernel.request, method: onKernelRequest, priority: 100 }

Example

A request with JSON content like:, (*8)

{
  "foo": "bar"
}

will be decoded automatically so can access the foo property like:, (*9)

echo $request->request->get('foo');

License

MIT, see LICENSE., (*10)

The Versions

10/01 2018

dev-master

9999999-dev

A Symfony event listener for decoding JSON encoded request content

  Sources   Download

MIT

The Requires

 

The Development Requires

10/01 2018

1.3.0

1.3.0.0

A Symfony event listener for decoding JSON encoded request content

  Sources   Download

MIT

The Requires

 

The Development Requires

24/04 2017

1.2.2

1.2.2.0

A Symfony 2 event listener for decoding JSON encoded request content

  Sources   Download

MIT

The Requires

 

The Development Requires

03/05 2016

1.2.1

1.2.1.0

A Symfony 2 event listener for decoding JSON encoded request content

  Sources   Download

MIT

The Requires

 

28/12 2015

1.2.0

1.2.0.0

A Symfony 2 event listener for decoding JSON encoded request content

  Sources   Download

MIT

The Requires

 

01/04 2015

1.1.0

1.1.0.0

A Symfony 2 event listener for decoding JSON encoded request content

  Sources   Download

MIT

The Requires

 

12/08 2014

1.0

1.0.0.0

A Symfony 2 event listener for decoding JSON encoded request content

  Sources   Download

MIT

The Requires