Alias a class to a simpler name or an interface/abstract to an implementation.

@param string $type
@param string $alias
@param bool $override Optionally override existing index.
16925
public function alias($type, $alias = null, $override = false)
    {
        if (is_array($type)) {
            foreach ($type as $alias => $asset) {
                $this->setParam('aliases', $alias, $asset, $override);
            }
        } else if (is_array($alias)) {
            foreach ($alias as $a) {
                $this->setParam('aliases', $a, $type, $override);
            }
        } else {
            $this->setParam('aliases', $alias, $type, $override);
        }

        return $this;
    }
1361600
protected function aliasAction($alias)
    {
        $request = $this->getRequest();
        $request->setActionName($alias);
        $request->setParam($request->getActionKey(), $alias);
    }
459844
public function onAddedToType(TypeInterface &$type)
    {
        parent::onAddedToType($type);

        if ($this->getAddIndex()) {
            $index_fields = [$this->name];

            if (count($this->getAddIndexContext())) {
                $index_fields = array_merge($index_fields, $this->getAddIndexContext());
            }

            $type->addIndex(new Index($this->name, $index_fields, $this->getAddIndexType()));
        }
    }
324598
public function register($type, $class, $legacy = false)
	{
		if (!@is_subclass_of($class, $this->default[$type]))
		{
			return false;
		}

		$this->classes[$type] = $class;

		if ($legacy)
		{
			$this->legacy[] = $class;
		}

		return true;
	}
795661
final public function addOverride($class, $type, array $options)
    {
        if (!isset($this->overrides[$class])) {
            $this->overrides[$class] = [];
        }

        if (!isset($this->overrides[$class][$type])) {
            $this->overrides[$class][$type] = [];
        }

        $this->overrides[$class][$type][] = $options;
    }
843568
public static function overrideType($name, $class, $phpTypeName = null)
    {
        if (!is_subclass_of($class, static::class)) {
            throw new BadArgumentException('Class :class should been subclass of :subClass', [
                'class' => $class, 'subClass' => static::class,
            ]);
        }
        
        if (null !== $phpTypeName) {
            static::$phpNamesMap[$name] = $phpTypeName;
        }
        
        static::$typesMap[$name] = $class;
    }
211152
public function registerAlias($alias, $className)
    {

        $this->_aliases[$alias] = $this->resolveClassName($className);

        return $this;
    }
279233
public function onAddedToType(TypeInterface &$type)
    {
        parent::onAddedToType($type);

        $type->addTrait(AdditionalPropertiesInterface::class, AdditionalPropertiesInterfaceImplementation::class)->protectFields($this->getName());
    }
964148
public function addType(FilterInterface $type, $alias)
    {
        $type->setName($alias);
        $this->types[$alias] = $type;

        return $this;
    }
238008
public function alias(string $alias): AliasInterface
    {
        if (!in_array($alias, $this->alias)) {
            $this->alias[] = $alias;
        }
        $this->aliasHelper($alias);

        return $this;
    }
335522
protected function addAllClassFields(string $class, string $alias, array $customRenameColumns, int $renameMode) : void
    {
        /** @var ClassMetadata $classMetadata */
        $classMetadata = $this->em->getClassMetadata($class);
        $platform      = $this->em->getConnection()->getDatabasePlatform();

        if (! $this->isInheritanceSupported($classMetadata)) {
            throw new InvalidArgumentException(
                'ResultSetMapping builder does not currently support your inheritance scheme.'
            );
        }

        foreach ($classMetadata->getDeclaredPropertiesIterator() as $property) {
            switch (true) {
                case $property instanceof FieldMetadata:
                    $columnName  = $property->getColumnName();
                    $columnAlias = $platform->getSQLResultCasing(
                        $this->getColumnAlias($columnName, $renameMode, $customRenameColumns)
                    );

                    if (isset($this->fieldMappings[$columnAlias])) {
                        throw new InvalidArgumentException(
                            sprintf("The column '%s' conflicts with another column in the mapper.", $columnName)
                        );
                    }

                    $this->addFieldResult($alias, $columnAlias, $property->getName());
                    break;

                case $property instanceof ToOneAssociationMetadata && $property->isOwningSide():
                    $targetClass = $this->em->getClassMetadata($property->getTargetEntity());

                    foreach ($property->getJoinColumns() as $joinColumn) {
                        /** @var JoinColumnMetadata $joinColumn */
                        $columnName           = $joinColumn->getColumnName();
                        $referencedColumnName = $joinColumn->getReferencedColumnName();
                        $columnAlias          = $platform->getSQLResultCasing(
                            $this->getColumnAlias($columnName, $renameMode, $customRenameColumns)
                        );

                        if (isset($this->metaMappings[$columnAlias])) {
                            throw new InvalidArgumentException(
                                sprintf("The column '%s' conflicts with another column in the mapper.", $columnName)
                            );
                        }

                        if (! $joinColumn->getType()) {
                            $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em));
                        }

                        $this->addMetaResult($alias, $columnAlias, $columnName, $property->isPrimaryKey(), $joinColumn->getType());
                    }
                    break;
            }
        }
    }
751926
protected function registerCommand($alias, $class)
    {
        $this
            ->define($alias, function($channel, $receiver) use($class) {
                return new $class($channel, $receiver);
            })
            ->define($class, function($channel, $receiver) use($class) {
                return new $class($channel, $receiver);
            })
        ;
    }
686074
void registerAlias(FieldType type, String alias)
   {
      m_aliasMap.put(new Pair<FieldTypeClass, String>(type.getFieldTypeClass(), alias), type);
   }
376366
public function required(string $alias, string $type): EntityDefinitionOptions {
    return $this->required[$alias] = new EntityDefinitionOptions($alias, $type);
  }
917753
public function handle(Client $client, $index, $type, $alias = null)
    {
        $alias = $alias ?: $index;

        $entries = $this->registry->get($alias, $type);

        $this->dispatchHandlingStartedEvent($entries);

        foreach ($entries as $entry) {
            $this->dispatchProvidingStartedEvent($entry);

            $entry->getProvider()->run(
                $client,
                $index,
                $entry->getType(),
                $this->dispatcher
            );

            $this->dispatchProvidingFinishedEvent($entry);
        }
    }
1067648
public function visible($visible = [], $override = false)
    {
        $this->visible = $override ? $visible : array_merge($this->visible, $visible);

        return $this;
    }
898683
public function onAddedToType(TypeInterface &$type)
    {
        parent::onAddedToType($type);

        $type->addTrait(IsArchivedInterface::class, IsArchivedInterfaceImplementation::class)->serialize($this->getName());
    }