code: protected function defineEndpoint(ContainerBuilder $container, $alias, $params)
      {
          $definition = new Definition(self::ENDPOINT_CLASS, array($params));
          $definition->addTag(self::ENDPOINT_TAG, array('alias' => $alias));
  
          $container->setDefinition(
              sprintf($this->getAlias() . '.endpoints.%s', $alias),
              $definition
          );
      }
docs: Creates Endpoint definition in the service container.
  
  @param \Symfony\Component\DependencyInjection\ContainerBuilder $container
  @param string $alias
  @param array $params