2017 © Pedro Peláez
 

symfony-bundle datatransformation-bundle

Provides mappers for generate complex JSON outputs from entities

image

rtxlabs/datatransformation-bundle

Provides mappers for generate complex JSON outputs from entities

  • Friday, May 16, 2014
  • by thaberkern
  • Repository
  • 5 Watchers
  • 14 Stars
  • 1,256 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 2 Open issues
  • 3 Versions
  • 1 % Grown

The README.md

DataTransformation Bundle

Symfony2 Bundle that can help building REST services., (*1)

Build Status, (*2)

Example

Providing a REST service that returns a list of contacts linked with companies. The service has to deliver something like that:, (*3)

[{
    "id": 1181,
    "address": null,
    "email": "max.mustermann@dtb.com",
    "firstname": "Max",
    "lastname": "Mustermann",
    "company": 7
} , {
    "id" : 1177,
    "address" : null,
    "email" : "uwe.klawitter@dtb.com",
    "firstname" : "Uwe",
    "lastname" : "Klawitter",
    "company": 298
}]

To generate this, some Doctrine entities have to be loaded from a repository and converted into json. Performing an json_encode() to on the entities won't work, because the entity contains proxy objects to the company. To solve this, the DoctrineBinder can be used:, (*4)

$result = $this->container->get('doctrinebinder')->bind($models)->execute();

// finally the result has to be converted into json to return it as an response
$json = Dencoder::decode($result);

Documentation

The Versions

16/05 2014

dev-master

9999999-dev

Provides mappers for generate complex JSON outputs from entities

  Sources   Download

MIT

The Requires

 

by Uwe Klawitter

json bundle doctrine entity

12/05 2014

dev-feature/ROC-758

dev-feature/ROC-758

Provides mappers for generate complex JSON outputs from entities

  Sources   Download

MIT

The Requires

 

by Uwe Klawitter

json bundle doctrine entity

13/09 2013

1.0.0

1.0.0.0

Provides mappers for generate complex JSON outputs from entities

  Sources   Download

MIT

The Requires

 

by Uwe Klawitter

json bundle doctrine entity