Created
November 23, 2011 13:01
-
-
Save augustohp/1388614 to your computer and use it in GitHub Desktop.
Data Mapper use case
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$map = array('id'=>'id', 'login'=>'login', 'passwd'=>'passwd'); | |
$origin = array('id'=>1, 'login'=>'foo', 'passwd'=>'bar'); | |
$mapper = new Respect\Data\Mapper($map); | |
$object = new StdClass; | |
$mapper->toInstance($origin, $object); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment