code: protected function createDefinitionWithAliases(array $ids, $value) {
          if ($value == null) {
              throw new MissingDefinitionValueException(
                  s('Trying to register a class with alias without a value. Received %s.', json_encode($ids))
              );
          } else if (count($ids) == 0) {
              throw new MissingDefinitionIdentifierException(
                  'Trying to create a definition without an identifier.'
              );
          }
  
          $definition = null;
  
          foreach ($ids as $id) {
              if ( ! $definition instanceof IDefinition) {
                  $definition = $this->createDefinition($id, $value);
              } else {
                  $alias = $this->createAliasDefinition($definition, $id);
                  $definition->addAlias($alias);
                  $this->addDefinition($alias);
              }
          }
  
          return $definition;
      }
docs: @param array $ids
  @param $value
  
  @return IDefinition
  @throws MissingDefinitionIdentifierException
  @throws MissingDefinitionValueException