public static function getConstantValue($class, $constant)
    {
        $reflection = new \ReflectionClass($class);

        if (self::hasConstant($class, $constant)) {
            return $reflection->getConstant($constant);
        }

        return null;
    }