Register a class alias with the registry.

@param parent Parent class
@param alias Alias name
@param cname Class name
11113
protected static void registerAlias(Class<?> parent, String alias, String cname) {
    Entry e = data.get(parent);
    assert (e != null);
    e.addAlias(alias, cname);
  }
632655
protected function registerClassAliases()
    {
        $aliases = __config()->class_aliases;
        if (!empty($aliases)) {
            $aliasLoader = new AliasLoader($aliases);
            spl_autoload_register([$aliasLoader, 'load']);
        }
    }
8085
public function registerAlias($class, $alias)
    {
        $alias = trim($alias);
        $class = trim($class);

        $this->__registry->alias($class, $alias);
    }
537553
public void addAliasForLocator(String alias, String locator) {
		LOG.info("Add alias: '" + alias + "' for '" + locator + "'");
		aliases.put(alias, locator);
	}
397943
final protected void common_addAlias(Object key, Object[] aliasArray) {
        ValidateUtility.objectNotNull(key, "key", aliasArray, "aliasArray");
        cache.addAlias(
                       key,
                       aliasArray,
                       cache.shouldPull(this.sharingPolicy, key),
                       true);
    }
183613
@Override
	public void engineSetCertificateEntry(String alias, Certificate certificate)
			throws KeyStoreException {

		if (!(certificate instanceof X509Certificate)) {
			throw new KeyStoreException(
					"Certificate must be instance of X509Certificate");
		}
		File file;
		ResourceTrustAnchor trustAnchor = getCertificateEntry(alias);
		if (trustAnchor != null) {
			file = trustAnchor.getFile();
		} else {
			file = new File(defaultDirectory, alias);
		}
		X509Certificate x509Cert = (X509Certificate) certificate;
		try {
			if(!inMemoryOnly){
				writeCertificate(x509Cert, file);
			}
			ResourceTrustAnchor anchor = new ResourceTrustAnchor(inMemoryOnly,
					new GlobusResource(file.getAbsolutePath()), new TrustAnchor(x509Cert,
							null));
			this.aliasObjectMap.put(alias, anchor);
			this.certFilenameMap.put(x509Cert, alias);
		} catch (ResourceStoreException e) {
			throw new KeyStoreException(e);
		} catch (IOException e) {
			throw new KeyStoreException(e);
		} catch (CertificateEncodingException e) {
			throw new KeyStoreException(e);
		}
	}
261052
protected function registerClassAlias()
    {
        // Model to Repository
        class_alias(
            Repository\Exception\ValidateFailException::class,
            'Windwalker\Core\Model\Exception\ValidateFailException'
        );
        class_alias(Repository\Traits\CliOutputModelTrait::class, 'Windwalker\Core\Model\Traits\CliOutputModelTrait');
        class_alias(Repository\Traits\DatabaseModelTrait::class, 'Windwalker\Core\Model\Traits\DatabaseModelTrait');
        class_alias(
            Repository\Traits\DatabaseRepositoryTrait::class,
            'Windwalker\Core\Model\Traits\DatabaseRepositoryTrait'
        );
        class_alias(Repository\DatabaseRepository::class, 'Windwalker\Core\Model\DatabaseModelRepository');
        class_alias(Repository\DatabaseRepository::class, 'Windwalker\Core\Repository\DatabaseModelRepository');
        class_alias(
            Repository\DatabaseRepositoryInterface::class,
            'Windwalker\Core\Model\DatabaseRepositoryInterface'
        );
        class_alias(Repository\Repository::class, 'Windwalker\Core\Model\ModelRepository');
        class_alias(Repository\Repository::class, 'Windwalker\Core\Repository\ModelRepository');
    }
632438
protected function registerAliases()
    {
        $loader = $this->aliasLoader;

        $this->app->booting(function() use ($loader) {
            foreach ($this->aliases as $class => $alias) {
                $loader->alias($class, $alias);
            }
        });
    }
345258
def sort_aliases(self, aliases):
        
        self._cache_init()
        if not aliases:
            return aliases
        parent_aliases = self._cache_get_entry(self.CACHE_NAME_PARENTS).keys()
        return [parent_alias for parent_alias in parent_aliases if parent_alias in aliases]
1002928
public <T, K extends T> void alias(Class<T> abstraction, Class<K> implementation) {
        injectorConfiguration = injectorConfiguration.withAlias(abstraction, implementation);
    }
223381
protected static synchronized void registerAllowedParentClass(Class<? extends ElementBase> clazz,
                                                                  Class<? extends ElementBase> parentClass) {
        allowedParentClasses.addCardinality(clazz, parentClass, 1);
    }
1093973
private void internalSetParent(CommandRegistry parentRegistry) {
        
        if (!ObjectUtils.nullSafeEquals(this.parent, parentRegistry)) {
            
            if (this.parent != null) {
                this.parent.removeCommandRegistryListener(this);
            }
            
            this.parent = parentRegistry;
            
            if (this.parent != null) {
                this.parent.addCommandRegistryListener(this);
            }
            
        }
        
    }
954389
protected function registerProvidersAliases()
    {
        $loader = AliasLoader::getInstance();
        foreach ($this->aliases as $alias => $provider) {
            if (class_exists($provider)) {
                $loader->alias(
                    $alias,
                    $provider
                );
            }
        }
    }
123931
def _set_child_joined_alias(child, alias_map):
        
        for table in alias_map:
            join = alias_map[table]
            if not isinstance(join, Join):
                continue
            lhs = join.parent_alias
            if (lhs == child.alias and table == child.related_alias) \
                    or (lhs == child.related_alias and table == child.alias):
                child.set_joined_alias(table)
                break
1084067
public function alias(string $name, string $alias): ManagerInterface
    {
        if (!$this->isRegistered($name)) {
            throw RegisterException::missing($name);
        }
        if ($this[$name] instanceof AliasInterface) {
            $this[$name]->alias($alias);
        } else {
            throw RegisterException::noAlias();
        }

        if (!$this[$name] instanceof ContainerAwareInterface) {
            parent::register($this[$name], $alias);
        }

        return $this;
    }
1286292
public void register(String local, String alias) {
        Map<String, String> map = local.contains("*") || local.contains("?") ? wildcardMap : aliasMap;
        
        if (alias == null) {
            map.remove(local);
            return;
        }
        
        String oldAlias = map.get(local);
        
        if (oldAlias != null) {
            if (oldAlias.equals(alias)) {
                return;
            }
            
            if (log.isInfoEnabled()) {
                log.info(StrUtil.formatMessage("Replaced %s alias for '%s':  old value ='%s', new value ='%s'.", getName(),
                    local, oldAlias, alias));
            }
        }
        map.put(local, alias);
    }
573697
public function registerAliases(array $aliases)
    {

        foreach ($aliases as $alias => $className)
            $this->registerAlias($alias, $className);

        return $this;
    }