public static function getConstantByName($name)
    {
        switch (strtolower($name)) {
            case 'single':
                return self::SINGLE;
            break;

            case 'multiple':
                return self::MULTIPLE;
            break;

            case 'ordered':
                return self::ORDERED;
            break;

            case 'record':
                return self::RECORD;
            break;

            default:
                return false;
            break;
        }
    }
public static function getConstantByName($name)
    {
        switch (strtolower($name)) {
            case 'single':
                return self::SINGLE;
            break;

            case 'multiple':
                return self::MULTIPLE;
            break;

            case 'ordered':
                return self::ORDERED;
            break;

            case 'record':
                return self::RECORD;
            break;

            default:
                return false;
            break;
        }
    }
public static function getConstantByName ( $ name ) { switch ( strtolower ( $ name ) ) { case 'single' : return self :: SINGLE ; break ; case 'multiple' : return self :: MULTIPLE ; break ; case 'ordered' : return self :: ORDERED ; break ; case 'record' : return self :: RECORD ; break ; default : return false ; break ; } }
Get a constant value from its name.

@param unknown_type $name The name of the constant, as per QTI spec.
@return integer|boolean The constant value or false if not found.
Get a constant value from its name .