PHP code example of mediagone / types-enums-doctrine
1. Go to this page and download the library: Download mediagone/types-enums-doctrine 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/ */
mediagone / types-enums-doctrine example snippets
use App\MyCustomEnum;
use App\MyOtherEnum;
use Symfony\Component\HttpKernel\Kernel as BaseKernel;
class Kernel extends BaseKernel
{
use MicroKernelTrait;
public function boot(): void
{
parent::boot();
(new DoctrineEnumTypesLoader())->registerEnumTypes([
MyCustomEnum::class,
MyOtherEnum::class,
// any other enum classes here
]);
}
...
}