1 | <?php |
||
21 | class AnimeClient { |
||
22 | |||
23 | use \Aviat\Ion\Di\ContainerAware; |
||
24 | |||
25 | const SESSION_SEGMENT = 'Aviat\AnimeClient\Auth'; |
||
26 | const DEFAULT_CONTROLLER_NAMESPACE = 'Aviat\AnimeClient\Controller'; |
||
27 | const DEFAULT_CONTROLLER = 'Aviat\AnimeClient\Controller\Anime'; |
||
28 | const DEFAULT_CONTROLLER_METHOD = 'index'; |
||
29 | const NOT_FOUND_METHOD = 'not_found'; |
||
30 | const ERROR_MESSAGE_METHOD = 'error_page'; |
||
31 | const SRC_DIR = SRC_DIR; |
||
32 | |||
33 | private static $form_pages = [ |
||
34 | 'edit', |
||
35 | 'add', |
||
36 | 'update', |
||
37 | 'update_form', |
||
38 | 'login', |
||
39 | 'logout' |
||
40 | ]; |
||
41 | |||
42 | /** |
||
43 | * HTML selection helper function |
||
44 | * |
||
45 | * @param string $a - First item to compare |
||
46 | * @param string $b - Second item to compare |
||
47 | * @return string |
||
48 | */ |
||
49 | public static function is_selected($a, $b) |
||
53 | |||
54 | /** |
||
55 | * Inverse of selected helper function |
||
56 | * |
||
57 | * @param string $a - First item to compare |
||
58 | * @param string $b - Second item to compare |
||
59 | * @return string |
||
60 | */ |
||
61 | public static function is_not_selected($a, $b) |
||
65 | |||
66 | /** |
||
67 | * Determine whether to show the sub-menu |
||
68 | * |
||
69 | * @return bool |
||
70 | */ |
||
71 | public function is_view_page() |
||
81 | |||
82 | /** |
||
83 | * Determine whether the page is a page with a form, and |
||
84 | * not suitable for redirection |
||
85 | * |
||
86 | * @return boolean |
||
87 | */ |
||
88 | public function is_form_page() |
||
92 | |||
93 | } |
||
94 | // End of anime_client.php |