public function partial($file, array $variables = array())
    {
        extract($variables);

        if (substr($file, -4) !== '.php') {
            $file .= '.php';
        }

        $view = '';

        if ($tmpl = locate_template($file)) {
            ob_start();
            include($tmpl);
            $view = ob_get_contents();
            ob_end_clean();
        }

        return $view;
    }