Skip to content

Instantly share code, notes, and snippets.

@rickharris
Created December 8, 2011 22:37
Show Gist options
  • Save rickharris/1449010 to your computer and use it in GitHub Desktop.
Save rickharris/1449010 to your computer and use it in GitHub Desktop.
Bam!
<?php
class Helper_View {
public static function render($template_suggestions, $data)
{
$last_exception = null;
foreach ($template_suggestions as $template)
{
try
{
return View::factory($template, $data);
}
catch(\Fuel_Exception $e) {
$last_exception = $e;
}
}
throw $e;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment