Map.

@param mixed $uses
@param mixed $type

@return mixed
552524
protected function mapClassAndNamespace($uses, $type)
    {
        if (!empty($uses) && isset($type) && is_string($type) && isset($uses[$type])) {
            $type = $uses[$type];
        }

        if (is_string($type)) {
            $type = substr($type, 0, 1) == '\\' ? substr($type, 1) : $type;
        }

        return $type;
    }
164797
private function mapDir($type, $toDir)
	{
		// Check if dir exists
		if (is_dir($this->getSourceFolder()))
		{
			$dirHandle = opendir($this->getSourceFolder());

			while (false !== ($element = readdir($dirHandle)))
			{
				if (substr($element, 0, 1) != '.')
				{
					$this->symlink($this->getSourceFolder() . '/' . $element, $toDir . '/' . $type . '/' . $element);
				}
			}
		}
	}
755401
public function translation($type)
    {
        $keys       = Input::get('keys');
        $code       = Input::get('code');
        $collection = Translation::where('area', $type)->whereIn('key', $keys)->where('locale', $code)->get();

        $map = array_map(function($item) {
            return array_only($item, ['id', 'key', 'value']);
        }, $collection->toArray());
        return new JsonResponse($map, 200);
    }
1170288
public static function GetMap($MapType, $ContextType, $Extension = self::CONTEXT_CORE, $MapRootLocation = PATH_CACHE) {
      $MapHash = self::MakeMapHash($MapType, $ContextType, $Extension, $MapRootLocation);
      return self::Map($MapHash);
   }
50702
public function load($resource, $type = null)
    {
        return $this->routeCollectionMapper->mapCollection($this->import($resource));
    }
1225855
public function load($resource, $type = null)
    {
        $collection = new SymfonyRouteCollection();
        try{
            $results = $this->manager->findAllAlias();
        }catch (\Exception $e){
            return $collection;
        }
        foreach ($results as $metatag) {
            if (is_array($metatag['pathinfo'])) {
                $pathinfo = $metatag['pathinfo'];
            } else {
                $pathinfo = @unserialize($metatag['pathinfo']);
            }
            if (!is_array($pathinfo) || !isset($pathinfo['_route']) || !isset($metatag['alias'])) {
                continue;
            }
            $oldroute = $pathinfo['_route'];

            //add defaults to routealias
            if (isset($pathinfo['__defaults']) && is_array($pathinfo['__defaults'])) {
                foreach ($pathinfo['__defaults'] as $key => $value) {
                    if (strpos($key, '_') !== 0) {
                        $metatag['alias'] .= '-{'.$key.'}';
                    }
                }
            }
            $route = new Route($metatag['alias'], $pathinfo, array(), array());
            $collection->add(self::getRouteName($oldroute, $pathinfo), $route);
        }

        return $collection;
    }
999875
public function getNavTypes($type, $types)
    {
        if ($type === null) {
            return $types;
        }

        return $this->filterTypes($types, $this->getTypeCategory($type));
    }
315896
public function join($type, $table, $where, $using = true)
    {
        $linkage = $using ? 'USING ('.$where.')' : ' ON ('.$where.')';
        $this->joins[] = $type.' JOIN ' . $table . ' ' . $linkage;
        
        return $this;
    }
797679
public static function getFilter(string $type): array
    {
        return isset(self::$filters[$type]) ? self::$filters[$type] : [];
    }
491871
function mapArray (types) {
  return types.map(function (type) {
    return Array.isArray(type) ? mapArray(type) : map(type)
  })
}
552789
private function getFilters($type)
    {
        $filters = [];
        if ('contao' === $type) {
            $filters[] =
                function ($package) {
                    /** @var PackageInterface $package */
                    return in_array($package->getType(), ['contao-module', 'contao-bundle', 'legacy-contao-module']);
                };
        }

        return $filters;
    }
49126
public function declareUses(string ...$uses) {
		foreach ($uses as $name) {
			$this->declareUse($name);
		}
		return $this;
	}
524837
private function mapFormat($type)
    {
        switch ($type) {
            case IMAGETYPE_BMP:
                return 'BMP';
            case IMAGETYPE_COUNT:
                return 'COUNT';
            case IMAGETYPE_GIF:
                return 'GIF';
            case IMAGETYPE_ICO:
                return 'ICO';
            case IMAGETYPE_IFF:
                return 'IFF';
            case IMAGETYPE_JB2:
                return 'JB2';
            case IMAGETYPE_JP2:
                return 'JP2';
            case IMAGETYPE_JPC:
                return 'JPC';
            case IMAGETYPE_JPEG:
                return 'JPEG';
            case IMAGETYPE_JPEG2000:
                return 'JPEG2000';
            case IMAGETYPE_JPX:
                return 'JPX';
            case IMAGETYPE_PNG:
                return 'PNG';
            case IMAGETYPE_PSD:
                return 'PSD';
            case IMAGETYPE_SWC:
                return 'SWC';
            case IMAGETYPE_SWF:
                return 'SWF';
            case IMAGETYPE_TIFF_II:
                return 'TIFF_II';
            case IMAGETYPE_TIFF_MM:
                return 'TIFF_MM';
            case IMAGETYPE_WBMP:
                return 'WBMP';
            case IMAGETYPE_XBM:
                return 'XBM';
            case IMAGETYPE_UNKNOWN:
            default:
                return 'UNKNOWN';
        }
    }
859905
protected function getFunctions($type = null)
    {
        $funcs = \get_defined_functions();

        if ($type) {
            return $funcs[$type];
        } else {
            return \array_merge($funcs['internal'], $funcs['user']);
        }
    }
669864
public static function getResource(string $type)
    {
        if (isset(self::$resources[$type])) {
            return self::$resources[$type];
        }
        $class = '\\sdopx\\resource\\' . Utils::toCamel($type) . 'Resource';
        if (class_exists($class)) {
            self::$resources[$type] = new $class();
            return self::$resources[$type];
        }
        return null;
    }
940029
protected function getResultsByType($type)
    {
        $mapper = $this->relatedMapper->getManager()->mapper($type);

        $key = $mapper->getEntityMap()->getKeyName();

        $query = $mapper->getQuery();

        return $query->whereIn($key, array_keys($this->dictionary[$type]))->get();
    }
940598
private function resolveTypes($type)
    {
        $filterTypes = [];

        do {
            $filterTypes[] = $filterType = $this->filterRegistry[$type];
        } while (($type = $filterType->getParent()) !== null);

        return $filterTypes;
    }