HummingBirdAnimeClient/app/config/routes.php

70 lines
1.5 KiB
PHP
Raw Permalink Normal View History

2015-05-22 12:36:26 -04:00
<?php
2015-11-16 11:40:01 -05:00
/**
* Hummingbird Anime Client
*
* An API client for Hummingbird to manage anime and manga watch lists
*
* @package HummingbirdAnimeClient
* @author Timothy J. Warren
* @copyright Copyright (c) 2015
* @link https://github.com/timw4mail/HummingBirdAnimeClient
* @license MIT
*/
2015-05-22 12:36:26 -04:00
return [
'convention' => [
'default_namespace' => '\\Aviat\\AnimeClient\\Controller',
'default_controller' => '\\Aviat\\AnimeClient\\Controller\\Anime',
2015-11-13 11:34:30 -05:00
'default_method' => 'index',
'404_method' => 'not_found'
],
// Routes on all controllers
'common' => [
'update' => [
'path' => '/{controller}/update',
'action' => 'update',
'verb' => 'post',
'tokens' => [
'controller' => '[a-z_]+'
]
],
],
2015-12-08 14:52:59 -05:00
// Routes on anime collection controller
'collection' => [
2015-12-08 14:52:59 -05:00
'collection_search' => [
'path' => '/collection/search',
'action' => 'search'
],
'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-09-17 23:11:18 -04:00
];