45 lines
1.3 KiB
PHP
45 lines
1.3 KiB
PHP
<?php
|
|
|
|
namespace WizdomNetworks\WizeWeb\Controllers;
|
|
|
|
use WizdomNetworks\WizeWeb\Core\Controller;
|
|
use WizdomNetworks\WizeWeb\Utils\ErrorHandler;
|
|
use WizdomNetworks\WizeWeb\Utils\Logger;
|
|
|
|
/**
|
|
* Contact Controller
|
|
*
|
|
* This controller handles the logic for rendering the contact page of the application.
|
|
*/
|
|
class ContactController extends Controller
|
|
{
|
|
/**
|
|
* Index method for the ContactController.
|
|
*
|
|
* This method prepares the data for the contact page and renders the corresponding view.
|
|
*
|
|
* @throws \Exception If the view cannot be rendered or an error occurs.
|
|
*/
|
|
public function index(): void
|
|
{
|
|
try {
|
|
Logger::info("[DEBUG] Entering ContactController::index");
|
|
|
|
// Prepare data for the contact page
|
|
$data = [
|
|
'title' => 'Contact Us - Wizdom Networks',
|
|
'description' => 'Get in touch with our team for inquiries and support.',
|
|
];
|
|
|
|
// Render the contact page view
|
|
$this->render('pages/contact', $data);
|
|
|
|
Logger::info("[DEBUG] Successfully rendered contact page");
|
|
} catch (\Exception $e) {
|
|
// Log and handle any exceptions
|
|
ErrorHandler::exception($e);
|
|
throw $e; // Rethrow or handle as needed
|
|
}
|
|
}
|
|
}
|