PHP code example of sbooker / enumerable-doctrine
1. Go to this page and download the library: Download sbooker/enumerable-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/ */
sbooker / enumerable-doctrine example snippets
class ConcreteEnum extends \LitGroup\Enumerable\Enumerable
{
// See LitGroup/enumerable
}
class ConcreteEnumType extends \Sbooker\DoctrineEnumerableType\EnumerableType
{
protected function getEnumClass() : string {
return ConcreteEnum::class;
}
public function getName() {
return 'concrete_enum';
}
}
php
\Doctrine\DBAL\Types\Type::addType('concrete_enum', ConcreteEnumType::class);