1 | <?php |
||
23 | class AnimeClient { |
||
24 | |||
25 | use \Aviat\Ion\Di\ContainerAware; |
||
26 | |||
27 | const SESSION_SEGMENT = 'Aviat\AnimeClient\Auth'; |
||
28 | const DEFAULT_CONTROLLER_NAMESPACE = 'Aviat\AnimeClient\Controller'; |
||
29 | const DEFAULT_CONTROLLER = 'Aviat\AnimeClient\Controller\Anime'; |
||
30 | const DEFAULT_CONTROLLER_METHOD = 'index'; |
||
31 | const NOT_FOUND_METHOD = 'not_found'; |
||
32 | const ERROR_MESSAGE_METHOD = 'error_page'; |
||
33 | const SRC_DIR = SRC_DIR; |
||
34 | |||
35 | private static $form_pages = [ |
||
36 | 'edit', |
||
37 | 'add', |
||
38 | 'update', |
||
39 | 'update_form', |
||
40 | 'login', |
||
41 | 'logout' |
||
42 | ]; |
||
43 | |||
44 | /** |
||
45 | * HTML selection helper function |
||
46 | * |
||
47 | * @param string $a - First item to compare |
||
48 | * @param string $b - Second item to compare |
||
49 | * @return string |
||
50 | */ |
||
51 | public static function is_selected($a, $b) |
||
55 | |||
56 | /** |
||
57 | * Inverse of selected helper function |
||
58 | * |
||
59 | * @param string $a - First item to compare |
||
60 | * @param string $b - Second item to compare |
||
61 | * @return string |
||
62 | */ |
||
63 | public static function is_not_selected($a, $b) |
||
67 | |||
68 | /** |
||
69 | * Determine whether to show the sub-menu |
||
70 | * |
||
71 | * @return bool |
||
72 | */ |
||
73 | public function is_view_page() |
||
83 | |||
84 | /** |
||
85 | * Determine whether the page is a page with a form, and |
||
86 | * not suitable for redirection |
||
87 | * |
||
88 | * @return boolean |
||
89 | */ |
||
90 | public function is_form_page() |
||
94 | |||
95 | /** |
||
96 | * Load configuration options from .toml files |
||
97 | * |
||
98 | * @param string $path - Path to load config |
||
99 | * @return array |
||
100 | */ |
||
101 | public static function load_toml($path) |
||
127 | } |
||
128 | // End of AnimeClient.php |