Return the configuration of a repository by its alias

@param		string	$alias	Alias of the repository, as found in the composer.json
@return	mixed		The Composer\Repository\PackageRepository that matches, or null
979247
public static function getRepositoryConfigByAlias($alias)
	{
		$config = self::_getConfig();
		$repos = self::getRepositoryConfigs();
		if (isset($repos[$alias]))
		{
			return $repos[$alias];
		}
		return null;
	}
1331001
public static function getInstance($alias = null)
	{
		if('' === static::$driverName)
		{
			static::init();
		}
		if(null === $alias)
		{
			$alias = self::defaultAlias();
		}
		if (isset(self::$instances[static::$driverName][$alias]))
		{
			return self::$instances[static::$driverName][$alias];
		}
		else
		{
			$option = Config::get('@.APP_' . strtoupper(static::$driverName) . '.' . $alias);
			if(false === $option)
			{
				return null;
			}
			else
			{
				return self::create($option,$alias);
			}
		}
	}
110103
public function getProvider($alias)
    {
        if (array_key_exists($alias, $this->providers)) {
            return $this->providers[$alias];
        }

        return null;
    }
856878
public function mapReference($alias)
    {
        //$alias = strval($alias);
        $reference = array_key_exists($alias, $this->aliases);

        if (array_key_exists($alias, $this->aliases)) {
            return $this->aliases[$alias];
        }

        return $alias;
    }
1096461
public function getRelation($alias) {
        if ($this->hasRelation($alias)) {
            return $this->_relations[$alias];
        }

        throw new MissingRelationException(sprintf('Repository relation %s does not exist', $alias));
    }
1209264
public function config($alias = null)
    {
        $alias  = Str::low($alias);
        $plugin = Inflector::camelize($alias);
        if (Plugin::loaded($plugin)) {
            $entity = $this->Extension->getEntity($plugin);
            if ($this->request->is(['post', 'put'])) {
                $entity = $this->Extensions->patchEntity($entity, $this->request->getData());
                $result = $this->Extensions->save($entity);
                if ($result) {
                    $this->Flash->success(__d('extensions', 'The plugin settings has been saved.'));
                    return $this->App->redirect([
                        'apply' => ['action' => 'config', $result->get('slug')]
                    ]);
                }

                $this->Flash->error(__d('extensions', 'The settings could not be saved. Please, try again.'));
            }
        } else {
            throw new MissingPluginException(['plugin' => $plugin]);
        }

        $this
            ->set('plugin', $plugin)
            ->set('entity', $entity)
            ->set('page_title', __d('extensions', 'Configuration plugin «{0}»', __d($alias, $plugin)));
    }
712676
public function get($alias)
    {
        $alias = strtolower($alias);
        if (isset($this->_items[$alias])) {
            return $this->_items[$alias];
        }

        return null;
    }
1244148
public function alias($alias = null)
    {
        if ($alias !== null) {
            $this->setAlias($alias);
        }

        return $this->getAlias();
    }
820929
public static function getAlias($alias)
    {
        $alias = strtolower($alias);

        return array_key_exists($alias, self::$aliases) ? self::$aliases[$alias] : false;
    }
510964
public function getFieldByAlias($alias)
    {
        foreach ($this->_fields as $column => $fields)
        {
            foreach ($fields as $field)
            {
                if ($field->getAlias() === $alias)
                {
                    return $field;
                }
            }
        }
        return null;
    }
497694
protected static function create($alias)
    {
        $aliasConfigKey = static::CONFIGURE_KEY_PREFIX . $alias;
        if (!Configure::check($aliasConfigKey)) {
            throw new \InvalidArgumentException('Filesystem "' . $alias . '" not configured');
        }

        if (static::existsAndInstanceOf($aliasConfigKey)) {
            return Configure::read($aliasConfigKey . '.client');
        }

        if (Configure::check($aliasConfigKey . '.factory')) {
            return static::factory(Configure::read($aliasConfigKey . '.factory'));
        }

        if (self::existsAndVarsCount($aliasConfigKey)) {
            return static::adapter(static::read($aliasConfigKey, 'adapter'), static::read($aliasConfigKey, 'vars'));
        }

        if (self::existsWithDsn($aliasConfigKey)) {
            return static::adapterFromDsn(Configure::read($aliasConfigKey. '.url'));
        }

        throw new \InvalidArgumentException(sprintf(static::INVALID_ARGUMENT_MSG, $alias));
    }
1257802
public function get($alias)
    {
        if (!array_key_exists($alias, $this->adapters)) {
            throw new \InvalidArgumentException(sprintf('There is no adapter registered under that alias: "%s"', $alias));
        }

        return $this->adapters[$alias];
    }
775241
protected function aliasToMatcher($alias)
    {
        foreach ($this->matchers as $class => $aliases) {
            if (in_array($alias, $aliases)) {
                return $class;
            }
        }

        throw new Exceptions\UnknownAliasException($alias);
    }
265965
public static function removeRepository($alias)
	{
		$config = self::_getConfig();
		$configSource = $config->getConfigSource();
		$configSource->removeRepository($alias);
	}
1121688
public function get($alias){
		if($alias==''){
			return array();
			}
		$id=false;
		$external_cache=NULL;
		bimport('http.useragent');
		$suffix=BBrowserUseragent::getDeviceSuffix();
		if(CACHE_TYPE){
			bimport('cache.general');
			$bcache=BCache::getInstance();
			$rules=$bcache->get('softmodules:rules:'.$alias.$suffix);
			}
		if(($rules===false)||($rules===NULL)){
			$group=$this->get_group_byalias($alias);
			if(empty($group)){
				//Create group???
				return array();
				}
			$modules=$group->getModules();
			$rules=array();
			if(($suffix=='.d')||($suffix=='.t')){
				usort($modules,$this->build_sorter('ordering_desktop'));
				//sort modules
				foreach($modules as $mod)
					if(($mod->enable_desktop==1))
						$rules[]=(object)array(

							'com'=>$mod->com,
							'segments'=>$mod->segments,
							'position'=>$mod->position_desktop,
							);
				}
			if($suffix=='.m'){
				usort($modules,$this->build_sorter('ordering_mobile'));
				//sort modules
				foreach($modules as $mod)
					if(($mod->enable_mobile==1))
						$rules[]=(object)array(
							'com'=>$mod->com,
							'segments'=>$mod->segments,
							'position'=>$mod->position_mobile,
							);
				}
			$bcache->set('softmodules:rules:'.$alias.$suffix,$rules,9999);
			}
		return $rules;
		}
1124602
public function find($alias = null)
    {
        $finder = new EntityFinder($this->manager, $this->manager->getDriver(), $this);
        if ($alias !== null) {
            $finder->alias($alias);
        }

        return $finder;
    }
956989
public function resolve($alias): ?Type
    {
        if (null === $alias) {
            return null;
        }

        if (!isset($this->cache[$alias])) {
            $type = $this->string2Type($alias);
            $this->cache[$alias] = $type;
        }

        return $this->cache[$alias];
    }