1 <?php
defined('SYSPATH') or die('No direct script access.');
3 // Static file serving (CSS, JS, images)
4 Route
::set('docs/media', 'guide/media(/<file>)', array('file' => '.+'))
6 'controller' => 'userguide',
11 // API Browser, if enabled
12 if (Kohana
::$config->load('userguide.api_browser') === TRUE)
14 Route
::set('docs/api', 'guide/api(/<class>)', array('class' => '[a-zA-Z0-9_]+'))
16 'controller' => 'userguide',
22 // User guide pages, in modules
23 Route
::set('docs/guide', 'guide(/<module>(/<page>))', array(
27 'controller' => 'userguide',
32 // Simple autoloader used to encourage PHPUnit to behave itself.
33 class Markdown_Autoloader
{
34 public static function autoload($class)
36 if ($class == 'Markdown_Parser' OR $class == 'MarkdownExtra_Parser')
38 include_once Kohana
::find_file('vendor', 'markdown/markdown');
43 // Register the autoloader
44 spl_autoload_register(array('Markdown_Autoloader', 'autoload'));