private function processMappedWidgetInfo(WidgetInterface $widget, $info, $value)
    {
        if (is_string($info)) {
            $result = $info;
        } elseif (is_array($info)) {
            $strValue = self::toString($value);

            if (array_key_exists($strValue, $info)) {
                $result = $info[$strValue];
            } else {
                $result = $value;
            }
        } elseif ($info instanceof \Closure){
            $result = $info($widget);
        } else {
            throw new \RuntimeException(sprintf(
                "Runtime Error: invalid data type '%s' for widget attribute", gettype($value)
            ));
        }

        return $result;
    }