WizdomWeb/public/index.php

28 lines
838 B
PHP

<?php
// File: public/index.php
// Version: v1.1
// Purpose: Application entry point with Arsha one-pager routing
// Project: Wizdom Networks Website
require_once __DIR__ . '/../vendor/autoload.php';
use Wizdomnetworks\WizdomWeb\Core\Router;
use Wizdomnetworks\WizdomWeb\Utilities\Logger;
use Wizdomnetworks\WizdomWeb\Utilities\ErrorHandler;
use Wizdomnetworks\WizdomWeb\Controllers\LandingController;
Logger::info("Bootstrapping application");
$router = new Router();
// ✅ Register new Arsha landing route
$router->add('/', LandingController::class, 'index');
// 🛑 Optional: Disable old route to avoid conflict
// use WizdomNetworks\WizeWeb\Controllers\HomeController;
// $router->add('', HomeController::class, 'index');
$requestedPath = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
$router->dispatch($requestedPath);