protected function addFinder(ContainerBuilder $container, $dir, $bundle)
    {
        $ref = new Reference('integrated_solr.converter.config.provider.file.' . $bundle . '.finder');

        if ($container->hasDefinition('integrated_solr.converter.config.provider.file.' . $bundle . '.finder')) {
            return $ref;
        }

        $container->addResource(new FileResource($dir)); // not really sure what this does

        $definition = new Definition(Finder::class);
        $definition->setPublic(false);
        $definition->addMethodCall('in', [$dir]);

        $container->setDefinition('integrated_solr.converter.config.provider.file.' . $bundle . '.finder', $definition);

        return $ref;
    }
protected function addFinder(ContainerBuilder $container, $dir, $bundle)
    {
        $ref = new Reference('integrated_solr.converter.config.provider.file.' . $bundle . '.finder');

        if ($container->hasDefinition('integrated_solr.converter.config.provider.file.' . $bundle . '.finder')) {
            return $ref;
        }

        $container->addResource(new FileResource($dir)); // not really sure what this does

        $definition = new Definition(Finder::class);
        $definition->setPublic(false);
        $definition->addMethodCall('in', [$dir]);

        $container->setDefinition('integrated_solr.converter.config.provider.file.' . $bundle . '.finder', $definition);

        return $ref;
    }
protected function addFinder ( ContainerBuilder $ container , $ dir , $ bundle ) { $ ref = new Reference ( 'integrated_solr.converter.config.provider.file.' . $ bundle . '.finder' ) ; if ( $ container -> hasDefinition ( 'integrated_solr.converter.config.provider.file.' . $ bundle . '.finder' ) ) { return $ ref ; } $ container -> addResource ( new FileResource ( $ dir ) ) ; // not really sure what this does $ definition = new Definition ( Finder :: class ) ; $ definition -> setPublic ( false ) ; $ definition -> addMethodCall ( 'in' , [ $ dir ] ) ; $ container -> setDefinition ( 'integrated_solr.converter.config.provider.file.' . $ bundle . '.finder' , $ definition ) ; return $ ref ; }
Create a finder definition.

Create the definition of a finder instance that will look for files in the bundle. If the finder
definition already exists then that one is returned.

@param ContainerBuilder $container
@param string           $dir
@param string           $bundle

@return Reference
Create a finder definition .