Merge branch 'master' of git://github.com/kohana/userguide
[kohana-userguide.git] / init.php
blobe55f947c74c7a5f59f30aee872efe94e9cf2eaf4
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' => '.+'))
5 ->defaults(array(
6 'controller' => 'userguide',
7 'action' => 'media',
8 'file' => NULL,
9 ));
11 if (Kohana::config('userguide.api_browser') === TRUE)
13 // API Browser
14 Route::set('docs/api', 'guide/api(/<class>)', array('class' => '[a-zA-Z0-9_]+'))
15 ->defaults(array(
16 'controller' => 'userguide',
17 'action' => 'api',
18 'class' => NULL,
19 ));
22 // Translated user guide
23 Route::set('docs/guide', 'guide(/<page>)', array(
24 'page' => '.+',
26 ->defaults(array(
27 'controller' => 'userguide',
28 'action' => 'docs',
29 ));