container->get('request') ->url->get(); $page_segments = explode("/", $url); $intersect = array_intersect($page_segments, self::$form_pages); return empty($intersect); } /** * Determine whether the page is a page with a form, and * not suitable for redirection * * @return boolean */ public function is_form_page() { return ! $this->is_view_page(); } /** * Load configuration options from .toml files * * @param string $path - Path to load config * @return array */ public static function load_toml($path) { $output = []; $files = glob("{$path}/*.toml"); foreach ($files as $file) { $key = str_replace('.toml', '', basename($file)); $toml = file_get_contents($file); $config = Toml::Parse($toml); if ($key === 'config') { foreach($config as $name => $value) { $output[$name] = $value; } continue; } $output[$key] = $config; } return $output; } } // End of AnimeClient.php