<?php

require dirname(__FILE__) . '/src/import.php';
/**
 * Depending on the platform used to deploy this solution, it may be required
 * to account for static files within php. If .htaccess is available then it is
 * should be used insted of the following:
 */
import::routes();
if (preg_match('~^/(public|images|javascript|stylesheets)/~', ROUTES_CURRENTURI)) {
    import::src('static.php');
    exit;
}
import::app('routes.php');
<?php

import::src('h2o.php');
h2o::load('i18n');
class template
{
    public static function render($file, &$vars = array())
    {
        $template = new H2o($file, array('cache' => 'file', 'cache_dir' => dirname($file) . '/cache'));
        echo $template->render($vars);
    }
}