MabeEnum\EnumSet::__construct PHP Method

__construct() public method

Constructor
public __construct ( string $enumeration )
$enumeration string The classname of the enumeration
    public function __construct($enumeration)
    {
        if (!is_subclass_of($enumeration, __NAMESPACE__ . '\\Enum')) {
            throw new InvalidArgumentException(sprintf("This EnumSet can handle subclasses of '%s' only", __NAMESPACE__ . '\\Enum'));
        }
        $this->enumeration = $enumeration;
        $this->ordinalMax = count($enumeration::getConstants());
        // init the bitset with zeros
        $this->bitset = str_repeat("", ceil($this->ordinalMax / 8));
    }