Register the factory class.

@return void
192386
protected function registerFactory()
    {
        $this->app->singleton('throttle.factory', function (Container $app) {
            $cache = $app->cache->driver($app->config->get('throttle.driver'));

            return new CacheFactory($cache);
        });

        $this->app->alias('throttle.factory', CacheFactory::class);
        $this->app->alias('throttle.factory', FactoryInterface::class);
    }
594311
public function register()
    {
        $this->app->singleton(Dispatcher::class, function ($app) {
            return new Dispatcher($app, function ($connection = null) use ($app) {
                return $app[QueueFactoryContract::class]->connection($connection);
            });
        });

        $this->app->alias(
            Dispatcher::class, DispatcherContract::class
        );

        $this->app->alias(
            Dispatcher::class, QueueingDispatcherContract::class
        );
    }
976153
public function register()
    {
        $configPath = __DIR__ . '/../config/ide-helper.php';
        $this->mergeConfigFrom($configPath, 'ide-helper');
        $localViewFactory = $this->createLocalViewFactory();

        $this->app->singleton(
            'command.ide-helper.generate',
            function ($app) use ($localViewFactory) {
                return new GeneratorCommand($app['config'], $app['files'], $localViewFactory);
            }
        );

        $this->app->singleton(
            'command.ide-helper.models',
            function ($app) {
                return new ModelsCommand($app['files']);
            }
        );

        $this->app->singleton(
            'command.ide-helper.meta',
            function ($app) use ($localViewFactory) {
                return new MetaCommand($app['files'], $localViewFactory, $app['config']);
            }
        );

        $this->app->singleton(
            'command.ide-helper.eloquent',
            function ($app) use ($localViewFactory) {
                return new EloquentCommand($app['files']);
            }
        );

        $this->commands(
            'command.ide-helper.generate',
            'command.ide-helper.models',
            'command.ide-helper.meta',
            'command.ide-helper.eloquent'
        );
    }
886362
public function register()
    {
        $this->registerConnectionServices();
        $this->registerEloquentFactory();
        $this->registerQueueableEntityResolver();

        Model::setConnectionResolver($this->container['db']);
        Model::setEventDispatcher($this->container['events']);
        Model::clearBootedModels();
        Model::observe(InternalObserve::class);
    }
1255567
public function register()
    {
        $this->registerCallbackFactory();
        $this->registerEventDispatcher();
        $this->registerFactory();
        $this->registerCascadeTransitionCallback();
        $this->registerCommands();
    }
606641
public function registerFactory()
    {
        $this->plugin->singleton('view', function ($plugin) {
            // Next we need to grab the engine resolver instance that will be used by the
            // environment. The resolver will be used by an environment to get each of
            // the various engine implementations such as plain PHP or Blade engine.
            $resolver = $plugin['view.engine.resolver'];

            $finder = $plugin['view.finder'];

            $env = new Factory($resolver, $finder, $plugin['events']);

            // We will also set the container instance on this view environment since the
            // view composers may be classes registered in the container, which allows
            // for great testable, flexible composers for the application developer.
            $env->setContainer($plugin);

            $env->share('plugin', $plugin);

            return $env;
        });
    }
638663
public function register()
    {
        $this->app->singleton('column.factory', function ($app) {
            return new ColumnFactory($app);
        });

        $this->app->alias('column.factory', ColumnFactory::class);
    }
288731
public function run()
    {
        foreach ($this->factoryClasses as $modelClass => $factoryClass) {
            /** @var ModelFactory $instance */
            $instance = new $factoryClass;
            $this->registry->define($modelClass, $instance->getDefinition());
        }
    }
637968
public function register()
    {
        $this->app->singleton('posttype.factory', function ($app) {
            return new PosttypeFactory($app);
        });

        $this->app->alias('posttype.factory', PosttypeFactory::class);
    }
970801
public function register()
    {
        $this->app['aura/html:helper'] = $this->app->share(
            function ($app) {
                $app;
                $factory = new \Aura\Html\HelperLocatorFactory;
                return $factory->newInstance();
            }
        );

        $this->app['aura/html:escaper'] = $this->app->share(
            function ($app) {
                $app;
                $factory = new \Aura\Html\EscaperFactory();
                return $factory->newInstance();
            }
        );

        $this->app['jnjxp/meta:helper'] = $this->app->share(
            function ($app) {
                $factory = new MetaHelperFactory(
                    $app->make('aura/html:helper'),
                    $app->make('aura/html:escaper')
                );
                return $factory->newInstance();
            }
        );

        $this->app->booting(
            function () {
                $loader = \Illuminate\Foundation\AliasLoader::getInstance();
                $loader->alias('AuraHtml', 'Jnjxp\Meta\Facades\AuraHtmlHelper');
                $loader->alias('Meta', 'Jnjxp\Meta\Facades\MetaHelper');
            }
        );
    }
223974
public function registerThumbnailFactory()
    {
        $this->app->singleton('thumbnail.factory', function ($app) {
            return new ThumbnailFactory($app['thumbnails.collection'], $app);
        });

        $this->app->alias('thumbnail.factory', ThumbnailFactory::class);
    }
697777
public function register()
    {
        $this->mergeConfig();
        $this->setupCache();
        $this->setupMetaData();
        $this->setupConnection();
        $this->registerManagerRegistry();
        $this->registerEntityManager();
        $this->registerClassMetaDataFactory();
        $this->registerExtensions();
        $this->registerConsoleCommands();
        $this->registerCustomTypes();
        $this->registerEntityFactory();
        $this->registerProxyAutoloader();

        if ($this->shouldRegisterDoctrinePresenceValidator()) {
            $this->registerPresenceVerifierProvider();
        }
    }
544446
public function registerFactory()
    {
        $this->app->singleton('view', function ($app) {
            // Next we need to grab the engine resolver instance that will be used by the
            // environment. The resolver will be used by an environment to get each of
            // the various engine implementations such as plain PHP or Blade engine.
            $resolver = $app['view.engine.resolver'];

            $finder = $app['view.finder'];

            $factory = $this->createFactory($resolver, $finder, $app['events']);

            // We will also set the container instance on this view environment since the
            // view composers may be classes registered in the container, which allows
            // for great testable, flexible composers for the application developer.
            $factory->setContainer($app);

            $factory->share('app', $app);

            return $factory;
        });
    }
652615
public function register()
    {
        $container = $this->getContainer();

        /** @var Tapestry $tapestry */
        $tapestry = $container->get(Tapestry::class);
        $configuration = new Configuration(include(__DIR__.'/../../src/Modules/Config/DefaultConfig.php'));

        if ($baseConfigPathName = $this->identifyConfigurationPath($tapestry['currentWorkingDirectory'])) {
            $configuration->merge($this->getConfigurationFromPath($baseConfigPathName));
        }

        if ($envConfigPathName = $this->identifyConfigurationPath($tapestry['currentWorkingDirectory'], $tapestry['environment'])) {
            $configuration->merge($this->getConfigurationFromPath($envConfigPathName));
        }

        $container->share(Configuration::class, $configuration);
    }
1350706
public function register()
    {
        $this->app->bind(LoaderInterface::class, ArrayLoader::class);

        $this->registerExtensionConfig();
        $this->registerExtensionFinder();
        $this->registerExtensionManager();
        $this->registerExtensionDispatcher();
        $this->registerExtensionBootstrap();
        $this->registerComposerHandler();
        $this->registerComponentsRepository();
    }
1350547
public function register()
    {
        $this->app->singleton('taxonomy.factory', function ($app) {
            return new TaxonomyFactory($app);
        });

        $this->app->alias('taxonomy.factory', TaxonomyFactory::class);
    }
104079
public function registerFactory()
    {
        Zilf::$container->register(
            'view', function () {
                // Next we need to grab the engine resolver instance that will be used by the
                // environment. The resolver will be used by an environment to get each of
                // the various engine implementations such as plain PHP or Blade engine.
                $resolver = Zilf::$container->getShare('view.engine.resolver');

                $finder = Zilf::$container->getShare('view.finder');

                $factory = $this->createFactory($resolver, $finder);

                // We will also set the container instance on this view environment since the
                // view composers may be classes registered in the container, which allows
                // for great testable, flexible composers for the application developer.
                /* $factory->setContainer($app);

                $factory->share('app', $app);*/

                return $factory;
            }
        );
    }