public static function convertIntToArray($val, array $valueSet)
    {
        if ($val === null) {
            
            return [];
        }
        $bitValueArr = array_reverse(str_split(base_convert($val, 10, 2)));
        $valueArr = [];
        foreach ($bitValueArr as $bit => $bitValue) {
            if (!isset($valueSet[$bit])) {
                throw new SetColumnConverterException(sprintf('Unknown value key: "%s"', $bit), $bit);
            }
            if ($bitValue === '1') {
                $valueArr[] = $valueSet[$bit];
            }
        }
        return $valueArr;
    }
public static function convertIntToArray($val, array $valueSet)
    {
        if ($val === null) {
            
            return [];
        }
        $bitValueArr = array_reverse(str_split(base_convert($val, 10, 2)));
        $valueArr = [];
        foreach ($bitValueArr as $bit => $bitValue) {
            if (!isset($valueSet[$bit])) {
                throw new SetColumnConverterException(sprintf('Unknown value key: "%s"', $bit), $bit);
            }
            if ($bitValue === '1') {
                $valueArr[] = $valueSet[$bit];
            }
        }
        return $valueArr;
    }
public static function convertIntToArray ( $ val , array $ valueSet ) { if ( $ val === null ) { return [ ] ; } $ bitValueArr = array_reverse ( str_split ( base_convert ( $ val , 10 , 2 ) ) ) ; $ valueArr = [ ] ; foreach ( $ bitValueArr as $ bit => $ bitValue ) { if ( ! isset ( $ valueSet [ $ bit ] ) ) { throw new SetColumnConverterException ( sprintf ( 'Unknown value key: "%s"' , $ bit ) , $ bit ) ; } if ( $ bitValue === '1' ) { $ valueArr [ ] = $ valueSet [ $ bit ] ; } } return $ valueArr ; }
Converts set column integer value to corresponding array.

@param mixed $val
@param array $valueSet

@return array

@throws SetColumnConverterException
Converts set column integer value to corresponding array .