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

            case 'candidate':
                return self::CANDIDATE;
            break;

            case 'proctor':
                return self::PROCTOR;
            break;

            case 'scorer':
                return self::SCORER;
            break;

            case 'testconstructor':
                return self::TEST_CONSTRUCTOR;
            break;

            case 'tutor':
                return self::TUTOR;
            break;

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

            case 'candidate':
                return self::CANDIDATE;
            break;

            case 'proctor':
                return self::PROCTOR;
            break;

            case 'scorer':
                return self::SCORER;
            break;

            case 'testconstructor':
                return self::TEST_CONSTRUCTOR;
            break;

            case 'tutor':
                return self::TUTOR;
            break;

            default:
                return false;
            break;
        }
    }
public static function getConstantByName ( $ name ) { switch ( strtolower ( $ name ) ) { case 'author' : return self :: AUTHOR ; break ; case 'candidate' : return self :: CANDIDATE ; break ; case 'proctor' : return self :: PROCTOR ; break ; case 'scorer' : return self :: SCORER ; break ; case 'testconstructor' : return self :: TEST_CONSTRUCTOR ; break ; case 'tutor' : return self :: TUTOR ; break ; default : return false ; break ; } }
Get the constant value from its name.

@param string $name The name of the constant you want to retrieve the value.
@return integer|boolean The value of the related constant or false if the name could not be resolved.
Get the constant value from its name .