refactor: add class for crosstalk between Vegvisir and Reflect

This commit is contained in:
Victor Westerlund 2025-11-01 16:14:39 +01:00
parent e1d3a09966
commit 664c055495
Signed by: vlw
GPG key ID: D0AD730E1057DFC6

View file

@ -5,13 +5,14 @@
use VV; use VV;
use Reflect\Path; use Reflect\Path;
class Scaffold {
/** /**
* Include a source file from either Vegvisir or Reflect * Include a source file
* *
* @param string $pathname Relative path from project root to a source file * @param string $pathname Relative path from project root to a source file
*/ */
function load(string $pathname): void { public static function load(string $pathname): void {
// Load the Vegvisir VV clas from Reflect // Load the Vegvisir VV class from Reflect
if (!class_exists("VV")) { if (!class_exists("VV")) {
require_once Path::root("vegvisir/src/kernel/Init.php"); require_once Path::root("vegvisir/src/kernel/Init.php");
require_once Path::root("vegvisir/src/request/VV.php"); require_once Path::root("vegvisir/src/request/VV.php");
@ -19,3 +20,4 @@
require_once VV::root($pathname); require_once VV::root($pathname);
} }
}