PHPackages                             aol/transformers - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. aol/transformers

AbandonedArchivedLibrary[Database &amp; ORM](/categories/database)

aol/transformers
================

A package for normalizing property names and types from an external data store.

3.1.4(10y ago)3612.8k4[1 issues](https://github.com/aol/transformers/issues)[1 PRs](https://github.com/aol/transformers/pulls)MITPHPPHP &gt;=5.4.0

Since Jun 10Pushed 9y ago1 watchersCompare

[ Source](https://github.com/aol/transformers)[ Packagist](https://packagist.org/packages/aol/transformers)[ Docs](http://github.com/aol/transformers)[ RSS](/packages/aol-transformers/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependencies (3)Versions (25)Used By (0)

Transformers, roll out!
=======================

[](#transformers-roll-out)

[![Build Status](https://camo.githubusercontent.com/66a4cf367ecfe8bbd906d2ff92a7233fb3d06465ed2f33a42d6b7fcb546c3ce5/68747470733a2f2f7472617669732d63692e6f72672f616f6c2f7472616e73666f726d6572732e706e67)](https://travis-ci.org/aol/transformers)[![Latest Stable Version](https://camo.githubusercontent.com/4c9e6a53aa62f86cc02d9d9906ddffe692717cc5e397185df7d21637944ca719/68747470733a2f2f706f7365722e707567782e6f72672f616f6c2f7472616e73666f726d6572732f762f737461626c652e706e67)](https://packagist.org/packages/aol/transformers)[![Latest Unstable Version](https://camo.githubusercontent.com/663790856b677b81a2d3a45afb910f553ab47c416f8048c857c2d0a36a83a412/68747470733a2f2f706f7365722e707567782e6f72672f616f6c2f7472616e73666f726d6572732f762f756e737461626c652e706e67)](https://packagist.org/packages/aol/transformers)[![Total Downloads](https://camo.githubusercontent.com/f372d9a0bc202f78db1304acd37c324b00c257ab80c1ad72c6512a6aee802a7b/68747470733a2f2f706f7365722e707567782e6f72672f616f6c2f7472616e73666f726d6572732f646f776e6c6f6164732e706e67)](https://packagist.org/packages/aol/transformers)[![Code Climate](https://camo.githubusercontent.com/784ba53242ec14e4e3b5246c8b6851a0af3622e55f502efcfaac9db794e82c67/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f616f6c2f7472616e73666f726d6572732f6261646765732f6770612e737667)](https://codeclimate.com/github/aol/transformers)

What is this?
-------------

[](#what-is-this)

Aol/Transformers provides a way to quickly handle two-way data transformations. This is useful for normalizing data from external or legacy systems in your application code or even for cleaning up and limiting responses from your external HTTP API.

**But why not just fix the data at the source?** If you can, do it! Often though, that's not an option, and that's when you need to "fix" the data at the application layer.

There are two terms you should know:

- **app** - Short for "application" and this is the format we want to use in our application.
- **ext** - Short for "external" and this is the format that is used externally.

Basic usage
-----------

[](#basic-usage)

In a very basic use case a new Transformer instance can be created and the transformation definitions can be defined on the fly. Take a look at the code and then we'll walk thru what's happening.

```
