HummingBirdAnimeClient/app/config/routes.php

240 lines
4.8 KiB
PHP
Raw Normal View History

2015-05-22 12:36:26 -04:00
<?php
return [
// Routes on all controllers
'common' => [
'update' => [
'path' => '/update',
'action' => ['update'],
'verb' => 'post'
],
'login_form' => [
'path' => '/login',
'action' => ['login'],
'verb' => 'get'
],
'login_action' => [
'path' => '/login',
'action' => ['login_action'],
'verb' => 'post'
],
'logout' => [
'path' => '/logout',
'action' => ['logout']
],
],
// Routes on collection controller
'collection' => [
'collection_add_form' => [
'path' => '/collection/add',
'action' => ['form'],
'params' => [],
],
'collection_edit_form' => [
'path' => '/collection/edit/{id}',
'action' => ['form'],
'tokens' => [
'id' => '[0-9]+'
]
],
'collection_add' => [
'path' => '/collection/add',
'action' => ['add'],
'verb' => 'post'
],
'collection_edit' => [
'path' => '/collection/edit',
'action' => ['edit'],
'verb' => 'post'
],
'collection' => [
'path' => '/collection/view{/view}',
'action' => ['index'],
'params' => [],
'tokens' => [
'view' => '[a-z_]+'
]
],
],
// Routes on stats controller
'stats' => [
],
// Routes on anime controller
2015-05-27 09:03:42 -04:00
'anime' => [
'index' => [
'path' => '/',
'action' => ['redirect'],
'params' => [
'url' => '', // Determined by config
'code' => '301'
]
],
'login_form' => [
'path' => '/anime/login',
'action' => ['login'],
'verb' => 'get'
],
'login_action' => [
'path' => '/anime/login',
'action' => ['login_action'],
'verb' => 'post'
],
'logout' => [
'path' => '/anime/logout',
'action' => ['logout']
],
'update' => [
'path' => '/anime/update',
'action' => ['update'],
'verb' => 'post'
],
'search' => [
'path' => '/anime/search',
'action' => ['search'],
],
2015-05-27 09:03:42 -04:00
'all' => [
'path' => '/anime/all{/view}',
'action' => ['anime_list'],
'params' => [
'type' => 'all',
'title' => WHOSE . " Anime List &middot; All"
],
'tokens' => [
'view' => '[a-z_]+'
]
],
'watching' => [
'path' => '/anime/watching{/view}',
'action' => ['anime_list'],
'params' => [
'type' => 'currently-watching',
'title' => WHOSE . " Anime List &middot; Watching"
],
'tokens' => [
'view' => '[a-z_]+'
]
2015-05-27 09:03:42 -04:00
],
'plan_to_watch' => [
'path' => '/anime/plan_to_watch{/view}',
'action' => ['anime_list'],
2015-05-27 09:03:42 -04:00
'params' => [
'type' => 'plan-to-watch',
'title' => WHOSE . " Anime List &middot; Plan to Watch"
],
'tokens' => [
'view' => '[a-z_]+'
2015-05-27 09:03:42 -04:00
]
],
'on_hold' => [
'path' => '/anime/on_hold{/view}',
'action' => ['anime_list'],
2015-05-27 09:03:42 -04:00
'params' => [
'type' => 'on-hold',
'title' => WHOSE . " Anime List &middot; On Hold"
],
'tokens' => [
'view' => '[a-z_]+'
2015-05-27 09:03:42 -04:00
]
],
'dropped' => [
'path' => '/anime/dropped{/view}',
'action' => ['anime_list'],
2015-05-27 09:03:42 -04:00
'params' => [
'type' => 'dropped',
'title' => WHOSE . " Anime List &middot; Dropped"
],
'tokens' => [
'view' => '[a-z_]+'
2015-05-27 09:03:42 -04:00
]
],
'completed' => [
'path' => '/anime/completed{/view}',
'action' => ['anime_list'],
2015-05-27 09:03:42 -04:00
'params' => [
'type' => 'completed',
'title' => WHOSE . " Anime List &middot; Completed"
],
'tokens' => [
'view' => '[a-z_]+'
2015-05-27 09:03:42 -04:00
]
],
2015-05-22 12:36:26 -04:00
],
2015-05-27 09:03:42 -04:00
'manga' => [
'index' => [
'path' => '/',
'action' => ['redirect'],
'params' => [
'url' => '', // Determined by config
'code' => '301',
'type' => 'manga'
]
],
2015-05-27 09:03:42 -04:00
'all' => [
'path' => '/manga/all{/view}',
'action' => ['manga_list'],
'params' => [
'type' => 'all',
'title' => WHOSE . " Manga List &middot; All"
],
'tokens' => [
'view' => '[a-z_]+'
]
],
'reading' => [
'path' => '/manga/reading{/view}',
'action' => ['manga_list'],
'params' => [
'type' => 'Reading',
'title' => WHOSE . " Manga List &middot; Reading"
],
'tokens' => [
'view' => '[a-z_]+'
]
2015-05-27 09:03:42 -04:00
],
'plan_to_read' => [
'path' => '/manga/plan_to_read{/view}',
'action' => ['manga_list'],
2015-05-27 09:03:42 -04:00
'params' => [
'type' => 'Plan to Read',
'title' => WHOSE . " Manga List &middot; Plan to Read"
],
'tokens' => [
'view' => '[a-z_]+'
2015-05-27 09:03:42 -04:00
]
],
'on_hold' => [
'path' => '/manga/on_hold{/view}',
'action' => ['manga_list'],
2015-05-27 09:03:42 -04:00
'params' => [
'type' => 'On Hold',
'title' => WHOSE . " Manga List &middot; On Hold"
],
'tokens' => [
'view' => '[a-z_]+'
2015-05-27 09:03:42 -04:00
]
],
'dropped' => [
'path' => '/manga/dropped{/view}',
'action' => ['manga_list'],
2015-05-27 09:03:42 -04:00
'params' => [
'type' => 'Dropped',
'title' => WHOSE . " Manga List &middot; Dropped"
],
'tokens' => [
'view' => '[a-z_]+'
2015-05-27 09:03:42 -04:00
]
],
'completed' => [
'path' => '/manga/completed{/view}',
'action' => ['manga_list'],
2015-05-27 09:03:42 -04:00
'params' => [
'type' => 'Completed',
'title' => WHOSE . " Manga List &middot; Completed"
],
'tokens' => [
'view' => '[a-z_]+'
2015-05-27 09:03:42 -04:00
]
2015-06-17 08:50:01 -04:00
]
2015-05-22 12:36:26 -04:00
]
];