functions and classes added.

This commit is contained in:
2025-03-20 18:27:17 -07:00
parent 0c41ca9b65
commit 28513d367d
8 changed files with 250 additions and 72 deletions

View File

@@ -119,19 +119,16 @@ class Router {
}
public function debug() {
echo '<h1>Debugging Router</h1>';
echo '<h2>Url Path</h2>';
echo $this->path . '<br>';
echo '<h2>ControllerPath</h2>';
echo $this->controllerPath;
echo '<h2>Parameters</h2>';
echo '<pre>';
print_r($this->parameters);
echo '</pre>';
echo '<h2>Routes Variable</h2><pre>';
print_r($this->routes);
echo '</pre>';
echo '<div id="router-debug-container" class="debug">';
echo '<table border="1" cellpadding="10" cellspacing="0">';
echo '<tr><th>Url Path</th><td>' . htmlspecialchars($this->path) . '</td></tr>';
echo '<tr><th>Controller Path</th><td>' . htmlspecialchars($this->controllerPath) . '</td></tr>';
echo '<tr><th>Parameters</th><td><pre>' . print_r($this->parameters, true) . '</pre></td></tr>';
echo '<tr><th>Routes</th><td><pre>' . print_r($this->routes, true) . '</pre></td></tr>';
echo '</table></div>';
die();
}
}