protected function mappedData($name, Request $request) {
        $name = strtolower($name);

        if (isset($this->mappings[$name])) {
            $mapping = $this->mappings[$name];
        } elseif (isset(self::$globalMappings[$name])) {
            $mapping = self::$globalMappings[$name];
        } else {
            return null;
        }

        switch (strtolower($mapping)) {
            case self::MAP_DATA:
                $result = $request->getData();
                break;
            case self::MAP_INPUT:
                $result = $request->getInput();
                break;
            case self::MAP_QUERY:
                $result = $request->getQuery();
                break;
            default:
                return null;
        }
        return $result;
    }