PHP code example of tuscanicz / doctrine-enum-oracle

1. Go to this page and download the library: Download tuscanicz/doctrine-enum-oracle 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/ */

    

tuscanicz / doctrine-enum-oracle example snippets




namespace MyApp\Enum;

use Enum\AbstractEnum;

class MyExampleEnum extends AbstractEnum
{
    const MY_EXAMPLE_ENUM_FIRST = 'first';
    const MY_EXAMPLE_ENUM_SECOND = 'second';
    const MY_EXAMPLE_ENUM_THIRD = 'third';
}




namespace MyApp\Component\Doctrine\Type;

use Doctrine\DBAL\Platforms\AbstractPlatform;
use DoctrineEnumOracle\AbstractEnumType;
use MyApp\Enum\MyExampleEnum;

class MyExampleType extends AbstractEnumType
{
    public function getEnumClassName()
    {
        return MyExampleEnum::class;
    }
}