public static function getConstNameByValue($class, $value)
    {
        $constants = static::getReflection($class)->getConstants();
        $result = array_search($value, $constants);

        return $result;
    }