2015-05-22 12:36:26 -04:00
|
|
|
<?php
|
|
|
|
|
|
|
|
return [
|
2015-09-16 12:25:35 -04:00
|
|
|
'convention' => [
|
|
|
|
'default_namespace' => '\\Aviat\\AnimeClient\\Controller',
|
|
|
|
'default_controller' => '\\Aviat\\AnimeClient\\Controller\\Anime',
|
|
|
|
'default_method' => 'index'
|
|
|
|
],
|
|
|
|
'configuration' => [
|
|
|
|
|
|
|
|
],
|
2015-06-24 16:01:35 -04:00
|
|
|
// 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']
|
|
|
|
],
|
2015-09-14 10:54:50 -04:00
|
|
|
],
|
|
|
|
// 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_]+'
|
|
|
|
]
|
|
|
|
],
|
2015-06-24 16:01:35 -04:00
|
|
|
],
|
|
|
|
// Routes on anime controller
|
2015-05-27 09:03:42 -04:00
|
|
|
'anime' => [
|
2015-06-16 11:11:35 -04:00
|
|
|
'index' => [
|
|
|
|
'path' => '/',
|
2015-06-24 16:01:35 -04:00
|
|
|
'action' => ['redirect'],
|
2015-06-16 11:11:35 -04:00
|
|
|
'params' => [
|
|
|
|
'url' => '', // Determined by config
|
|
|
|
'code' => '301'
|
|
|
|
]
|
|
|
|
],
|
2015-07-02 14:04:04 -04:00
|
|
|
'search' => [
|
2015-09-14 10:54:50 -04:00
|
|
|
'path' => '/anime/search',
|
2015-07-02 14:04:04 -04:00
|
|
|
'action' => ['search'],
|
|
|
|
],
|
2015-05-27 09:03:42 -04:00
|
|
|
'all' => [
|
2015-09-14 10:54:50 -04:00
|
|
|
'path' => '/anime/all{/view}',
|
2015-06-24 16:01:35 -04:00
|
|
|
'action' => ['anime_list'],
|
2015-06-11 16:44:52 -04:00
|
|
|
'params' => [
|
|
|
|
'type' => 'all',
|
2015-06-16 11:11:35 -04:00
|
|
|
],
|
|
|
|
'tokens' => [
|
|
|
|
'view' => '[a-z_]+'
|
2015-06-11 16:44:52 -04:00
|
|
|
]
|
|
|
|
],
|
2015-06-16 11:11:35 -04:00
|
|
|
'watching' => [
|
2015-09-14 10:54:50 -04:00
|
|
|
'path' => '/anime/watching{/view}',
|
2015-06-24 16:01:35 -04:00
|
|
|
'action' => ['anime_list'],
|
2015-06-11 16:44:52 -04:00
|
|
|
'params' => [
|
2015-09-16 12:25:35 -04:00
|
|
|
'type' => 'watching',
|
2015-06-16 11:11:35 -04:00
|
|
|
],
|
|
|
|
'tokens' => [
|
|
|
|
'view' => '[a-z_]+'
|
2015-06-11 16:44:52 -04:00
|
|
|
]
|
2015-05-27 09:03:42 -04:00
|
|
|
],
|
|
|
|
'plan_to_watch' => [
|
2015-09-14 10:54:50 -04:00
|
|
|
'path' => '/anime/plan_to_watch{/view}',
|
2015-06-24 16:01:35 -04:00
|
|
|
'action' => ['anime_list'],
|
2015-05-27 09:03:42 -04:00
|
|
|
'params' => [
|
2015-09-16 12:25:35 -04:00
|
|
|
'type' => 'plan_to_watch',
|
2015-06-16 11:11:35 -04:00
|
|
|
],
|
|
|
|
'tokens' => [
|
|
|
|
'view' => '[a-z_]+'
|
2015-05-27 09:03:42 -04:00
|
|
|
]
|
|
|
|
],
|
|
|
|
'on_hold' => [
|
2015-09-14 10:54:50 -04:00
|
|
|
'path' => '/anime/on_hold{/view}',
|
2015-06-24 16:01:35 -04:00
|
|
|
'action' => ['anime_list'],
|
2015-05-27 09:03:42 -04:00
|
|
|
'params' => [
|
2015-09-16 12:25:35 -04:00
|
|
|
'type' => 'on_hold',
|
2015-06-16 11:11:35 -04:00
|
|
|
],
|
|
|
|
'tokens' => [
|
|
|
|
'view' => '[a-z_]+'
|
2015-05-27 09:03:42 -04:00
|
|
|
]
|
|
|
|
],
|
|
|
|
'dropped' => [
|
2015-09-14 10:54:50 -04:00
|
|
|
'path' => '/anime/dropped{/view}',
|
2015-06-24 16:01:35 -04:00
|
|
|
'action' => ['anime_list'],
|
2015-05-27 09:03:42 -04:00
|
|
|
'params' => [
|
2015-06-11 16:44:52 -04:00
|
|
|
'type' => 'dropped',
|
2015-06-16 11:11:35 -04:00
|
|
|
],
|
|
|
|
'tokens' => [
|
|
|
|
'view' => '[a-z_]+'
|
2015-05-27 09:03:42 -04:00
|
|
|
]
|
|
|
|
],
|
|
|
|
'completed' => [
|
2015-09-14 10:54:50 -04:00
|
|
|
'path' => '/anime/completed{/view}',
|
2015-06-24 16:01:35 -04:00
|
|
|
'action' => ['anime_list'],
|
2015-05-27 09:03:42 -04:00
|
|
|
'params' => [
|
2015-06-11 16:44:52 -04:00
|
|
|
'type' => 'completed',
|
2015-06-16 11:11:35 -04:00
|
|
|
],
|
|
|
|
'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' => [
|
2015-06-16 11:11:35 -04:00
|
|
|
'index' => [
|
|
|
|
'path' => '/',
|
2015-06-24 16:01:35 -04:00
|
|
|
'action' => ['redirect'],
|
2015-06-16 11:11:35 -04:00
|
|
|
'params' => [
|
|
|
|
'url' => '', // Determined by config
|
|
|
|
'code' => '301',
|
|
|
|
'type' => 'manga'
|
|
|
|
]
|
|
|
|
],
|
2015-05-27 09:03:42 -04:00
|
|
|
'all' => [
|
2015-09-14 10:54:50 -04:00
|
|
|
'path' => '/manga/all{/view}',
|
2015-06-24 16:01:35 -04:00
|
|
|
'action' => ['manga_list'],
|
2015-06-11 16:44:52 -04:00
|
|
|
'params' => [
|
|
|
|
'type' => 'all',
|
2015-06-16 11:11:35 -04:00
|
|
|
],
|
|
|
|
'tokens' => [
|
|
|
|
'view' => '[a-z_]+'
|
2015-06-11 16:44:52 -04:00
|
|
|
]
|
|
|
|
],
|
2015-06-16 11:11:35 -04:00
|
|
|
'reading' => [
|
2015-09-14 10:54:50 -04:00
|
|
|
'path' => '/manga/reading{/view}',
|
2015-06-24 16:01:35 -04:00
|
|
|
'action' => ['manga_list'],
|
2015-06-11 16:44:52 -04:00
|
|
|
'params' => [
|
2015-09-16 12:25:35 -04:00
|
|
|
'type' => 'reading',
|
2015-06-16 11:11:35 -04:00
|
|
|
],
|
|
|
|
'tokens' => [
|
|
|
|
'view' => '[a-z_]+'
|
2015-06-11 16:44:52 -04:00
|
|
|
]
|
2015-05-27 09:03:42 -04:00
|
|
|
],
|
|
|
|
'plan_to_read' => [
|
2015-09-14 10:54:50 -04:00
|
|
|
'path' => '/manga/plan_to_read{/view}',
|
2015-06-24 16:01:35 -04:00
|
|
|
'action' => ['manga_list'],
|
2015-05-27 09:03:42 -04:00
|
|
|
'params' => [
|
2015-09-16 12:25:35 -04:00
|
|
|
'type' => 'plan_to_read',
|
2015-06-16 11:11:35 -04:00
|
|
|
],
|
|
|
|
'tokens' => [
|
|
|
|
'view' => '[a-z_]+'
|
2015-05-27 09:03:42 -04:00
|
|
|
]
|
|
|
|
],
|
|
|
|
'on_hold' => [
|
2015-09-14 10:54:50 -04:00
|
|
|
'path' => '/manga/on_hold{/view}',
|
2015-06-24 16:01:35 -04:00
|
|
|
'action' => ['manga_list'],
|
2015-05-27 09:03:42 -04:00
|
|
|
'params' => [
|
2015-09-16 12:25:35 -04:00
|
|
|
'type' => 'on_hold',
|
2015-06-16 11:11:35 -04:00
|
|
|
],
|
|
|
|
'tokens' => [
|
|
|
|
'view' => '[a-z_]+'
|
2015-05-27 09:03:42 -04:00
|
|
|
]
|
|
|
|
],
|
|
|
|
'dropped' => [
|
2015-09-14 10:54:50 -04:00
|
|
|
'path' => '/manga/dropped{/view}',
|
2015-06-24 16:01:35 -04:00
|
|
|
'action' => ['manga_list'],
|
2015-05-27 09:03:42 -04:00
|
|
|
'params' => [
|
2015-09-16 12:25:35 -04:00
|
|
|
'type' => 'dropped',
|
2015-06-16 11:11:35 -04:00
|
|
|
],
|
|
|
|
'tokens' => [
|
|
|
|
'view' => '[a-z_]+'
|
2015-05-27 09:03:42 -04:00
|
|
|
]
|
|
|
|
],
|
|
|
|
'completed' => [
|
2015-09-14 10:54:50 -04:00
|
|
|
'path' => '/manga/completed{/view}',
|
2015-06-24 16:01:35 -04:00
|
|
|
'action' => ['manga_list'],
|
2015-05-27 09:03:42 -04:00
|
|
|
'params' => [
|
2015-09-16 12:25:35 -04:00
|
|
|
'type' => 'completed',
|
2015-06-16 11:11:35 -04:00
|
|
|
],
|
|
|
|
'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
|
|
|
]
|
|
|
|
];
|