Skip to content

Commit

Permalink
revert back toArray logic
Browse files Browse the repository at this point in the history
reverted back the toArray logic
  • Loading branch information
Conar Welsh committed Jun 24, 2013
1 parent b035a1a commit e147909
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Conarwelsh/MustacheL4/MustacheEngine.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ public function get($path, array $data = array())
$app = app();
$m = new Mustache_Engine( $app['config']->get('mustache-l4::config') );

$data = array_map(function($item){
return method_exists($item, 'toArray') ? $item->toArray() : $item;
}, $data);

return $m->render($view, $data);
}

Expand Down

0 comments on commit e147909

Please sign in to comment.