phpbb\routing\router::find_routing_files PHP Method

find_routing_files() public method

Find the list of routing files
public find_routing_files ( array $paths ) : router
$paths array Array of paths where to look for routing files (they must be relative to the phpBB root path).
return router
    public function find_routing_files(array $paths)
    {
        $this->routing_files = array('config/' . $this->environment . '/routing/environment.yml');
        foreach ($paths as $path) {
            if (file_exists($this->phpbb_root_path . $path . 'config/' . $this->environment . '/routing/environment.yml')) {
                $this->routing_files[] = $path . 'config/' . $this->environment . '/routing/environment.yml';
            } else {
                if (!is_dir($this->phpbb_root_path . $path . 'config/' . $this->environment)) {
                    if (file_exists($this->phpbb_root_path . $path . 'config/default/routing/environment.yml')) {
                        $this->routing_files[] = $path . 'config/default/routing/environment.yml';
                    } else {
                        if (!is_dir($this->phpbb_root_path . $path . 'config/default/routing') && file_exists($this->phpbb_root_path . $path . 'config/routing.yml')) {
                            $this->routing_files[] = $path . 'config/routing.yml';
                        }
                    }
                }
            }
        }
        return $this;
    }