(non-PHPdoc)
@see Generator/Admingenerator\GeneratorBundle\Generator.GeneratorInterface::build()
961588
public function build()
    {
        if ($this->cacheProvider->fetch($this->getCacheKey())) {
            return;
        }

        $this->doBuild();
        $this->cacheProvider->save($this->getCacheKey(), true);
    }
289621
public function build()
    {
        $this->createPathDirectories();

        if (!is_file($this->createSupervisorConfigurationFilePath())) {
            $this->generateSupervisorConfiguration();
        }

        // remove old worker configuration files
        /** @var \SplFileInfo $item */
        foreach (new \DirectoryIterator($this->paths['worker_configuration_directory']) as $item) {
            if ($item->isDir()) {
                continue;
            }

            if ('conf' !== $item->getExtension()) {
                continue;
            }

            unlink($item->getRealPath());
        }

        // generate program configuration files for all consumers
        $this->generateWorkerConfigurations(array_keys($this->consumers), $this->commands['rabbitmq_consumer']);

        // generate program configuration files for all multiple consumers
        $this->generateWorkerConfigurations(array_keys($this->multipleConsumers), $this->commands['rabbitmq_multiple_consumer']);

        // generate program configuration files for all batch consumers
        $this->generateWorkerConfigurations(array_keys($this->batchConsumers), $this->commands['rabbitmq_batch_consumer']);

        //generate program configuration files for all rpc_server consumers
        $this->generateWorkerConfigurations(array_keys($this->rpcServers), $this->commands['rabbitmq_rpc_server']);

        // start supervisord and reload configuration
        $this->supervisor->runAndReload();
    }
1308582
public function build(ContainerBuilder $container)
    {
        $container->addCompilerPass(
            new GenericCompilerPass(
                FilterTypeRegistry::class,
                'sidus.filter_type',
                'addFilterType'
            )
        );
        $container->addCompilerPass(
            new GenericCompilerPass(
                QueryHandlerRegistry::class,
                'sidus.query_handler_factory',
                'addQueryHandlerFactory'
            )
        );
    }
274602
public function build()
    {
        $config = $this->classMetadata->getExtension(Fluent::EXTENSION_NAME);

        $config['loggable'] = true;
        $config['versioned'] = array_unique(array_merge(
            isset($config['versioned']) ? $config['versioned'] : [],
            [
                $this->fieldName,
            ]
        ));

        $this->classMetadata->addExtension(Fluent::EXTENSION_NAME, $config);
    }
219596
public function build()
    {
        $file = rtrim($this->cacheDir, '/').'/'.$this->getFilename();
        $mapFile = $file.'.map';

        $cache = new PuliResourceCollectionCache($file, $this->isDebug());

        $resources = $this->resourceFinder->findByType($this->getType());

        if (!$cache->isFresh($resources)) {
            $resolvedResources = $this->resourceResolver->resolve($resources);
            $mappedContent = $this->contentBuilder->build(
                $this->getFilename(),
                $resolvedResources,
                array($this, 'sanitizePath'),
                array($this, 'prefixContent')
            );

            $cache->write($mappedContent->getContent());
            file_put_contents($mapFile, $mappedContent->getMap());

            if (!$this->debug) {
                $this->compressor->compressFile($file);
            }
        }

        return new MappedAsset($file, $mapFile);
    }
1301326
public function build()
    {
        if ($this->isCacheEnabled()) {
            $file = $this->getCachePath().self::CACHE_FILENAME;
            if (file_exists($file)) {
                include_once $file;
                $this->serviceContainer = new \ProjectServiceContainer();

                return new Client($this->serviceContainer);
            }
        }
        $extension = new NeoClientExtension();
        $this->serviceContainer->registerExtension($extension);
        $this->serviceContainer->addCompilerPass(new AliasesCompilerPass());
        $this->serviceContainer->addCompilerPass(new ConnectionRegistryCompilerPass());
        $this->serviceContainer->addCompilerPass(new NeoClientExtensionsCompilerPass());
        $this->serviceContainer->addCompilerPass(new EventSubscribersCompilerPass());
        $this->serviceContainer->loadFromExtension($extension->getAlias(), $this->getConfiguration());
        $this->serviceContainer->compile();
        if ($this->serviceContainer->hasParameter('loggers')) {
            foreach ($this->serviceContainer->getParameter('loggers') as $channel => $logger) {
                switch ($logger['type']) {
                    case 'stream':
                        $this->createDefaultStreamLogger($channel, $logger['path'], $logger['level']);
                }
            }
        }

        foreach ($this->listeners as $event => $callback) {
            $this->serviceContainer->get('event_dispatcher')->addListener($event, $callback);
        }

        foreach ($this->loggers as $alias => $logger) {
            $this->serviceContainer->get('logger')->setLogger($alias, $logger);
        }

        if ($this->isCacheEnabled()) {
            $dumper = new PhpDumper($this->serviceContainer);
            file_put_contents($file, $dumper->dump());
        }

        if (!$this->skipHaFailureFileCheck) {
            $this->checkForHaConfig();
        }

        $client = $this->getClient();

        return $client;
    }
48047
public function build()
    {
        $stream = new Stream('php://temp', 'wb+');


        $stream->write(json_encode(new MessageDecorator($this->getMessage())));

        return $this->getHttpMessage()
            ->withAddedHeader('Content-Type', 'application/json')
            ->withBody($stream);
    }
864283
public function build()
	{
		$filterMapper = $this->getMapper();
		$input = Input::all();

		$result = new FilterResult();
		foreach ($filterMapper->getFields() as $field) {
			$clone = clone $field;
			$name  = $clone->getName();

			if (Input::has($name)) {
				$clone->setValue($input[$name]);
			}

			$clone->setContext(BaseField::CONTEXT_FILTER);

			$result->addField($name, $clone);
		}
		$this->setResult($result);
	}
206515
function build(Container $container)
    {
        if (! $container instanceof Container )
            throw new \Exception(sprintf(
                'Container must instanceof "ContainerManager", you given "%s".'
                , (is_object($container)) ? get_class($container) : gettype($container)
            ));

        // ORDER IS MANDATORY

        // Namespace:
        $this->_buildNamespace($container);

        // Interfaces:
        $this->_buildImplementation($container);

        // Initializer:
        // maybe used while Creating Services
        $this->_buildInitializer($container);

        // Nested:
        $this->_buildNested($container);

        // Aliases:
        $this->_buildExtend($container);

        // Service:
        $this->_buildService($container);
    }
196785
public function build()
    {
        if ($this->container->hasDefinition($this->definitionName())) {
            $this->container->getDefinition(
                $this->definitionName()
            )->replaceArgument(0, array_unique($this->configuration, SORT_REGULAR));
        }
        if ($this->container->hasDefinition($this->definitionApiName())) {
            foreach ($this->configuration as $key => $config) {
                $this->configuration[$key]['enabled'] = $config['api_enabled'];

                if (array_key_exists('type', $config)) {
                    $this->configuration[$key]['type'] = $config['api_type'];
                }
            }

            $this->container->getDefinition(
                $this->definitionApiName()
            )->replaceArgument(0, array_unique($this->configuration, SORT_REGULAR));
        }

        return $this->container;
    }
95817
protected function doBuild()
    {
        $this->validateYaml();

        $generator = new AdminGenerator($this->cache_dir, $this->getGeneratorYml());
        $generator->setContainer($this->container);
        $generator->setBaseAdminTemplate(
            $generator->getFromYaml(
                'base_admin_template',
                $this->container->getParameter('admingenerator.base_admin_template')
            )
        );
        $generator->setFieldGuesser($this->getFieldGuesser());
        $generator->setMustOverwriteIfExists($this->needToOverwrite($generator));
        $generator->setTemplateDirs(
            array_merge(
                $this->container->getParameter('admingenerator.doctrine_templates_dirs'),
                array(__DIR__.'/../Resources/templates/Doctrine')
            )
        );
        $generator->setBaseController(
            'Admingenerator\GeneratorBundle\Controller\Doctrine\BaseController'
        );
        $generator->setBaseGeneratorName($this->getBaseGeneratorName());

        $embed_types = $generator->getFromYaml('params.embed_types', array());

        foreach ($embed_types as $yaml_path) {
            $this->prebuildEmbedType($yaml_path, $generator);
        }

        $builders = $generator->getFromYaml('builders', array());

        if (array_key_exists('list', $builders)) {
            $generator->addBuilder(new ListBuilderAction());
            $generator->addBuilder(new ListBuilderTemplate());
            $generator->addBuilder(new FiltersBuilderType());
        }

        if (array_key_exists('nested_list', $builders)) {
            $generator->addBuilder(new NestedListBuilderAction());
            $generator->addBuilder(new NestedListBuilderTemplate());
            $generator->addBuilder(new FiltersBuilderType());
        }

        if (array_key_exists('edit', $builders)) {
            $generator->addBuilder(new EditBuilderAction());
            $generator->addBuilder(new EditBuilderTemplate());
            $generator->addBuilder(new EditBuilderType());
        }

        if (array_key_exists('new', $builders)) {
            $generator->addBuilder(new NewBuilderAction());
            $generator->addBuilder(new NewBuilderTemplate());
            $generator->addBuilder(new NewBuilderType());
        }

        if (array_key_exists('show', $builders)) {
            $generator->addBuilder(new ShowBuilderAction());
            $generator->addBuilder(new ShowBuilderTemplate());
        }

        if (array_key_exists('excel', $builders)) {
            $generator->addBuilder(new ExcelBuilderAction());
        }

        if (array_key_exists('actions', $builders)) {
            $generator->addBuilder(new ActionsBuilderAction());
            $generator->addBuilder(new ActionsBuilderTemplate());
        }

        $generator->writeOnDisk(
            $this->getCachePath(
                $generator->getFromYaml('params.namespace_prefix'),
                $generator->getFromYaml('params.bundle_name')
            )
        );
    }
532791
protected function buildGenerators(ContainerBuilder $container, array $generators)
    {
        $collection = $container->getDefinition('cocur_build.generator.collection');
        foreach ($generators as $name => $config) {
            $id = sprintf('%s.%s', $config['generator'], $name);
            $container
                ->setDefinition($id, new DefinitionDecorator($config['generator']))
                ->replaceArgument(0, $config['options']);

            $collection->addMethodCall('add', [ new Reference($id), $config['route'] ]);
        }
    }
1226992
public function build()
    {

        $this->profiler->log('Build started');
        $this->callbacks['log']( "normality entity builder start" );

        $this->prepare();

        $processing = $this->options->getMatchingRelations( $skipping );

        $this->callbacks['log']( "skipping {$skipping->count()} ". $skipping->implode(', ', 'name' ) );
        $this->callbacks['log']( "processing {$processing->count()}" );

        // build relation
        $this->profiler->log('generation begin');
        $built = [];
        foreach( $processing as $relation ) {
            $entity = $this->buildRelation( $relation );
            $this->profiler->log($entity);
            $built[] = $entity;
        }
        $this->profiler->log('generation end');

        $this->buildEntityRegistration( $built );

        // remove orphan entities
        $options = $this->options->prepareOptions;
        if( $options & Options::REMOVE_ORPHANS ) {

            if( !( $options & Options::BACKUP ) ) {
                throw new IncompatibleOptionException("You cannot have Options::REMOVE_ORPHANS set if Options::BACKUP is not set");
            }

            $dirs = [
                $this->options->getPath('entity'),
                $this->options->getPath('entityPlaceholder'),
                $this->options->getPath('repository'),
                $this->options->getPath('repositoryPlaceholder'),
            ];

            $files = [];

            foreach( $dirs as $dir ) {

                $i = new \DirectoryIterator($dir);

                foreach( $i as $file ) {
                    if( !$file->isDot() and !$file->isDir() ) {
                        $files[$file->getPathname()] = substr( $file->getBasename(), 0, -4 );
                    }
                }

            }

            // identify files we no longer need
            $orphans = array_diff( $files, $built );

            foreach( $orphans as $orphan => $entityName ) {
                unlink( $orphan );
            }

        }

        return $processing;

    }
246536
public function build(ContainerBuilder $container)
    {
        parent::build($container);

        $container->addCompilerPass(
            new DependencyInjection\Compiler\EventPropagationPass(),
            PassConfig::TYPE_BEFORE_OPTIMIZATION
        );
    }
312653
public function build(ConnectionInterface $connection)
    {
        if (!$connection->isConnected()) {
            $connection->open();
        }

        if (null === $this->wrapper) {
            $this->wrapper = new FTPWrapper($connection);
        }

        if (null === $this->manager) {
            if (null === $this->fsFactory) {
                $this->fsFactory = new FilesystemFactory(new PermissionsFactory);
            }

            $this->manager = new FTPFilesystemManager($this->wrapper, $this->fsFactory);
        }

        if (null === $this->dlVoter) {
            $this->dlVoter = new DownloaderVoter;
            $this->dlVoter->addDefaultFTPDownloaders($this->wrapper);
        }

        if (null === $this->ulVoter) {
            $this->ulVoter = new UploaderVoter;
            $this->ulVoter->addDefaultFTPUploaders($this->wrapper);
        }

        if (null === $this->crVoter) {
            $this->crVoter = new CreatorVoter;
            $this->crVoter->addDefaultFTPCreators($this->wrapper, $this->manager);
        }

        if (null === $this->deVoter) {
            $this->deVoter = new DeleterVoter;
            $this->deVoter->addDefaultFTPDeleters($this->wrapper, $this->manager);
        }

        return new FTP($this->manager, $this->dlVoter, $this->ulVoter, $this->crVoter, $this->deVoter);
    }
1174791
public function build()
    {
        $annotationReader = $this->annotationReader;
        if (null === $annotationReader) {
            $annotationReader = new AnnotationReader();
            if (null !== $this->cacheDirectory) {
                $cacheDirectory = sprintf('%s/annotations', $this->cacheDirectory);

                $this->createDirectory($cacheDirectory);
                $annotationReader = new CachedReader($annotationReader, new FilesystemCache($cacheDirectory));
            }
        }

        $metadataDriver  = $this->driverFactory->createDriver($this->metadataDirectories, $annotationReader);

        $metadataFactory = new MetadataFactory($metadataDriver, null, $this->debug);
        $metadataFactory->setIncludeInterfaces($this->includeInterfaceMetadata);

        if (null !== $this->cacheDirectory) {
            $directory = sprintf('%s/metadata', $this->cacheDirectory);

            $this->createDirectory($directory);
            $metadataFactory->setCache(new FileCache($directory));
        }

        return new OpenGraphGenerator($metadataFactory);
    }
930392
public function build(ContainerBuilder $container)
    {
        parent::build($container);
        $container->addCompilerPass(new ApplicationConfigProviderPass());
        $container->addCompilerPass(new TranslationDomainsExtensionsPass());
        $container->addCompilerPass(new ValueObjectVisitorPass());
    }