for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Hyde\Foundation\Concerns;
use Hyde\Foundation\FileCollection;
use Hyde\Foundation\HydeKernel;
use Hyde\Foundation\PageCollection;
use Hyde\Foundation\RouteCollection;
/**
* @internal Single-use trait for the HydeKernel class.
*
* @see \Hyde\Foundation\HydeKernel
*/
trait ManagesHydeKernel
{
public function boot(): void
$this->booted = true;
booted
$this->files = FileCollection::boot($this);
files
$this->pages = PageCollection::boot($this);
pages
$this->routes = RouteCollection::boot($this);
routes
}
public static function getInstance(): HydeKernel
return static::$instance;
public static function setInstance(HydeKernel $instance): void
static::$instance = $instance;
instance
public function setBasePath(string $basePath): void
$this->basePath = rtrim($basePath, '/\\');
basePath
public function getBasePath(): string
return $this->basePath;
public function setSourceRoot(string $sourceRoot): void
$this->sourceRoot = rtrim($sourceRoot, '/\\');
sourceRoot
public function getSourceRoot(): string
return $this->sourceRoot;