PHPackages                             inetprocess/transformation - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. inetprocess/transformation

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

inetprocess/transformation
==========================

This library is a wrapper to transforms a string to another string (date format to another format, strings, regexp....

1.2.6(8y ago)63042GPL-2.0PHPPHP &gt;=5.3

Since Aug 27Pushed 8y ago7 watchersCompare

[ Source](https://github.com/inetprocess/transformation)[ Packagist](https://packagist.org/packages/inetprocess/transformation)[ RSS](/packages/inetprocess-transformation/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (7)Dependencies (4)Versions (16)Used By (0)

[![Build Status](https://camo.githubusercontent.com/a7f4ba0b9493e4ea54486b4b35a0906496827813b6b702a87a46d2fd42627232/68747470733a2f2f7472617669732d63692e6f72672f696e657470726f636573732f7472616e73666f726d6174696f6e2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/inetprocess/transformation)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/c09ab34d8a124939f3ebfbebbae33a37f50199ebef585d37c93224aa2d0b0fe7/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f696e657470726f636573732f7472616e73666f726d6174696f6e2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/inetprocess/transformation/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/9c6a8d58481064d996e58f45e055035b1565e7df6876781ed2179ea514b80bd6/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f696e657470726f636573732f7472616e73666f726d6174696f6e2f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/inetprocess/transformation/?branch=master)[![Build Status](https://camo.githubusercontent.com/126fb0beed72d36a41b08b9103fa80804a58ecb2f6b19429289275a73b042863/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f696e657470726f636573732f7472616e73666f726d6174696f6e2f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/inetprocess/transformation/build-status/master)[![SensioLabsInsight](https://camo.githubusercontent.com/0291fa4391d2c15a94969473ef44bfffecda1279d3b16b6be2ecff8876004705/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f63303465313561622d666666322d346161642d396338652d3764336434656261376130342f6d696e692e706e67)](https://insight.sensiolabs.com/projects/c04e15ab-fff2-4aad-9c8e-7d3d4eba7a04)

inetprocess/transformation
==========================

[](#inetprocesstransformation)

Inspired by [Respect/Validation](https://github.com/Respect/Validation), that library transforms an input string (or float / int / bool) to an output string, after applying rules.

The benefit using it is that it a generic wrapper for any kind of transformation. Also it throws Exceptions and allows to chain the transformations.

Usage
=====

[](#usage)

It's pretty simple to use. suppose you need to transform a date "31-12-2012" to another format such as "2012-12-31". Just do:

```
