PHP code example of frostiede / enum-bundle
1. Go to this page and download the library: Download frostiede/enum-bundle 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/ */
frostiede / enum-bundle example snippets
namespace App\Enum;
use MyCLabs\Enum\Enum;
class Status extends Enum {
public const SUCCESS = 1;
public const ERROR = 2;
public static function castValueIn($value) {
return (int) $value;
}
}