original_string: private function registerClass(ContainerBuilder $container, $className, array $tags, array $methods)
      {
          if ($container->has($className)) {
              return;
          }
  
          $definition = $container->register($className, $className);
          if (method_exists($definition, 'setAutowiredMethods')) {
              $definition->setAutowiredMethods($methods);
          } else {
              $definition->setAutowired(true);
          }
  
          // Inject the container if applicable
          if (is_a($className, ContainerAwareInterface::class, true)) {
              $definition->addMethodCall('setContainer', [new Reference('service_container')]);
          }
  
          foreach ($tags as $tagClassName => $classTags) {
              if (!is_a($className, $tagClassName, true)) {
                  continue;
              }
  
              foreach ($classTags as $classTag) {
                  $definition->addTag($classTag[0], $classTag[1]);
              }
          }
      }
code: private function registerClass(ContainerBuilder $container, $className, array $tags, array $methods)
      {
          if ($container->has($className)) {
              return;
          }
  
          $definition = $container->register($className, $className);
          if (method_exists($definition, 'setAutowiredMethods')) {
              $definition->setAutowiredMethods($methods);
          } else {
              $definition->setAutowired(true);
          }
  
          // Inject the container if applicable
          if (is_a($className, ContainerAwareInterface::class, true)) {
              $definition->addMethodCall('setContainer', [new Reference('service_container')]);
          }
  
          foreach ($tags as $tagClassName => $classTags) {
              if (!is_a($className, $tagClassName, true)) {
                  continue;
              }
  
              foreach ($classTags as $classTag) {
                  $definition->addTag($classTag[0], $classTag[1]);
              }
          }
      }
code_tokens: private function registerClass ( ContainerBuilder $ container , $ className , array $ tags , array $ methods ) { if ( $ container -> has ( $ className ) ) { return ; } $ definition = $ container -> register ( $ className , $ className ) ; if ( method_exists ( $ definition , 'setAutowiredMethods' ) ) { $ definition -> setAutowiredMethods ( $ methods ) ; } else { $ definition -> setAutowired ( true ) ; } // Inject the container if applicable if ( is_a ( $ className , ContainerAwareInterface :: class , true ) ) { $ definition -> addMethodCall ( 'setContainer' , [ new Reference ( 'service_container' ) ] ) ; } foreach ( $ tags as $ tagClassName => $ classTags ) { if ( ! is_a ( $ className , $ tagClassName , true ) ) { continue ; } foreach ( $ classTags as $ classTag ) { $ definition -> addTag ( $ classTag [ 0 ] , $ classTag [ 1 ] ) ; } } }
docstring: Registers an action in the container.
  
  @param ContainerBuilder $container
  @param string           $className
  @param array            $tags
  @param string[]         $methods
docstring_tokens: Registers an action in the container .