Example code for a sample Project...of PHP Code Hypdrater
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

33 lines
894 B

<?php
declare(strict_types=1);
/**
* @author Robert Strutts <Bob_586@Yahoo.com>
* @copyright (c) 2025, Robert Strutts
* @license MIT
*/
define("BaseDir", dirname(__DIR__)); // Project DIR
const CodeHydrater_PROJECT = BaseDir . "/protected/src/";
const CodeHydrater_FRAMEWORK = BaseDir . "/protected/FWCodeHydrater/src/";
$testing = false;
require_once CodeHydrater_FRAMEWORK . 'bootstrap/site_helper.php';
CodeHydrater\bootstrap\site_helper::init(CodeHydrater_PROJECT, $_SERVER['REQUEST_URI'], $_SERVER['REQUEST_METHOD'], $testing);
require_once CodeHydrater_FRAMEWORK . "bootstrap/main.php";
function dd($var = 'nothing', $end = true) {
\CodeHydrater\common::dump($var, $end);
}
// Boot kernel
$kernel = new \CodeHydrater\http\kernel();
// Register service providers
$kernel->register_service_provider(CodeHydrater\http\route_service_provider::class);
// Run
$kernel->run();