public function loadRoutingTable()
    {
        if (empty($this->routeFiles) || !is_array($this->routeFiles)) {
            if (!empty($this->log))
            {
                $this->log->error("Missing configuration option routeFiles, or route file list in improper format.");
            }

            return false;
        }

        $routeTable = array();
        foreach ($this->routeFiles as $route) {
            foreach ($this->configurationPaths as $dir) {
                $fileName = $dir . '/' . $route;
                if (file_exists($fileName)) {
                    $this->loadRouteFile($routeTable, $fileName);
                    $this->addDebugMessage("Loaded route file: " . $fileName);
                } else {
                    $this->addDebugMessage("Failed to load route file: " . $fileName);
                }
            }
        }

        return $routeTable;
    }
public function loadRoutingTable()
    {
        if (empty($this->routeFiles) || !is_array($this->routeFiles)) {
            if (!empty($this->log))
            {
                $this->log->error("Missing configuration option routeFiles, or route file list in improper format.");
            }

            return false;
        }

        $routeTable = array();
        foreach ($this->routeFiles as $route) {
            foreach ($this->configurationPaths as $dir) {
                $fileName = $dir . '/' . $route;
                if (file_exists($fileName)) {
                    $this->loadRouteFile($routeTable, $fileName);
                    $this->addDebugMessage("Loaded route file: " . $fileName);
                } else {
                    $this->addDebugMessage("Failed to load route file: " . $fileName);
                }
            }
        }

        return $routeTable;
    }
public function loadRoutingTable ( ) { if ( empty ( $ this -> routeFiles ) || ! is_array ( $ this -> routeFiles ) ) { if ( ! empty ( $ this -> log ) ) { $ this -> log -> error ( "Missing configuration option routeFiles, or route file list in improper format." ) ; } return false ; } $ routeTable = array ( ) ; foreach ( $ this -> routeFiles as $ route ) { foreach ( $ this -> configurationPaths as $ dir ) { $ fileName = $ dir . '/' . $ route ; if ( file_exists ( $ fileName ) ) { $ this -> loadRouteFile ( $ routeTable , $ fileName ) ; $ this -> addDebugMessage ( "Loaded route file: " . $ fileName ) ; } else { $ this -> addDebugMessage ( "Failed to load route file: " . $ fileName ) ; } } } return $ routeTable ; }
Load routing table from files
Load routing table from files