1. Go to this page and download the library: Download snicco/kernel library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
snicco / kernel example snippets
interface Bootstrapper
{
public function shouldRun(Environment $env): bool;
public function configure(WritableConfig $config, Kernel $kernel): void;
public function register(Kernel $kernel): void;
public function bootstrap(Kernel $kernel): void;
}
interface Bundle extends Bootstrapper
{
public function alias(): string;
}
// config/kernel.php
use Snicco\Component\Kernel\ValueObject\Environment;
return [
'bundles' => [
// These bundles will be used in all environments
Environment::ALL => [
RoutingBundle::class
],
// These bundles will only be used if the kernel environment is dev.
Environment::DEV => [
ProfilingBundle::class
],
],
// Bootstrappers are always used in all environments.
'bootstrappers' => [
BootstrapperA::class
]
]