Register the entity scanner implementation.

@return void
18025
protected function registerEntityScanner()
    {
        $app = $this->app;

        $app->singleton('datamapper.entity.scanner', function ($app) {
            $reader = $app['datamapper.annotationreader'];

            $validator = new EntityValidator;

            return new EntityScanner($reader, $validator);
        });
    }
693209
public function registerCustomTypes(): void
    {
        // already registered
        if (\Doctrine\DBAL\Types\Type::hasType('neuralyzer_enum')) {
            return;
        }

        // Else register
        // Manage specific types such as enum
        \Doctrine\DBAL\Types\Type::addType(
            'neuralyzer_enum',
            'Edyan\Neuralyzer\Doctrine\Type\Enum'
        );
        $platform = $this->conn->getDatabasePlatform();
        $platform->registerDoctrineTypeMapping('enum', 'neuralyzer_enum');
        $platform->registerDoctrineTypeMapping('bit', 'boolean');
    }
984301
public function register()
	{
		$this->registerModelGenerator();
		$this->registerControllerGenerator();
		$this->registerTestGenerator();
		$this->registerResourceGenerator();
		$this->registerScaffoldGenerator();
		$this->registerViewGenerator();
		$this->registerMigrationGenerator();
		$this->registerPivotGenerator();
		$this->registerSeedGenerator();
		$this->registerFormDumper();

		$this->commands(
			'generate.model',
			'generate.controller',
			'generate.test',
			'generate.scaffold',
			'generate.resource',
			'generate.view',
			'generate.migration',
			'generate.seed',
			'generate.form',
			'generate.pivot'
		);
	}
632465
public function registerEntity(Entity $entity)
    {
        Logger::get()->debug('Registering entity ' . get_class($entity) . ":{$entity->id}...");
        self::$entities[get_called_class()][$entity->id] = $entity;
        Logger::get()->debug('Registered.');
    }
573408
public function register() {

        $this->app->register('Sgpatil\Orientdb\MigrationServiceProvider');

        $this->app['db']->extend('orientdb', function($config) {
            return new Connection($config);
        });

        $this->app->booting(function() {
            $loader = \Illuminate\Foundation\AliasLoader::getInstance();
            $loader->alias('Orientdb', 'Sgpatil\Orientdb\Eloquent\Model');
        });

        $this->app->bind('ConnectionResolverInterface', function($app) {
            $databases = $app['config']['database.connections'];
            $defaultConnection = $app['config']['database.default'];
            if($databases[$defaultConnection]['driver']!='orientdb') {
                $defaultConnection = $app['config']['database.default_nosql'];
            }
            $conn = new Connection($databases[$defaultConnection]);
            return new DatabaseManager($app, $conn);
        });

        $this->app->bind('MigrationRepositoryInterface', function($app) {
            $resolver = $this->app->make('ConnectionResolverInterface');
            $table = $app['config']['database.migrations'];
            return new DatabaseMigrationRepository($resolver, $table);
        });

        $this->app->bind('orientdb.database', function($app) {
            $databases = $app['config']['database.connections'];
            $defaultConnection = $app['config']['database.default'];
            if($databases[$defaultConnection]['driver']!='orientdb') {
                $defaultConnection = $app['config']['database.default_nosql'];
            }

            if(empty($defaultConnection)){
                throw new \Exception('Invalid database connection type. Please check DB_CONNECTION in database configuration file or in .env file.');
            }
            return new Connection($databases[$defaultConnection]);
        });

        $this->app->bind('CreateOrientdbMigration', function($app) {
            $database = $this->app->make('orientdb.database');
            return new CreateOrientdbMigration($database);
        });


        $CreateOrientdbMigration = $this->app->make('CreateOrientdbMigration');

        $this->commands('CreateOrientdbMigration');
    }
417180
public function register()
    {
        // Set resolver for MySQL
        Connection::resolverFor('mysql', function ($connection, $database, $prefix = '', array $config = []) {
            $connection = new MySqlConnection($connection, $database, $prefix, $config);

            // Add Doctrine types for better support
            $this->addDoctrineTypes($connection);

            return $connection;
        });
    }
498104
public function register()
    {
        $this->app->singleton(ModelService::class, function ($app) {
            return new ModelService();
        });

        $this->app->singleton(IndexService::class, function ($app) {
            return new IndexService($app->make(ModelService::class));
        });

        $this->app->singleton(ModeContainer::class, function ($app) {
            $engineNamespace = 'Yab\\MySQLScout\\Engines\\Modes\\';
            $mode = $engineNamespace.studly_case(strtolower(config('scout.mysql.mode')));
            $fallbackMode = $engineNamespace.studly_case(strtolower(config('scout.mysql.min_fulltext_search_fallback')));

            return new ModeContainer(new $mode(), new $fallbackMode());
        });
    }
1333284
public function setupEntities()
    {
        if ($this->registeredEntities->Count() > 0) {
            return;
        }

        if (Config::inst()->get('DocumentationManifest', 'automatic_registration')) {
            $this->populateEntitiesFromInstall();
        }

        $registered = Config::inst()->get('DocumentationManifest', 'register_entities');

        foreach ($registered as $details) {
            // validate the details provided through the YAML configuration
            $required = array('Path', 'Title');

            foreach ($required as $require) {
                if (!isset($details[$require])) {
                    throw new Exception("$require is a required key in DocumentationManifest.register_entities");
                }
            }

            // if path is not an absolute value then assume it is relative from
            // the BASE_PATH.
            $path = $this->getRealPath($details['Path']);

            $key = (isset($details['Key'])) ? $details['Key'] : $details['Title'];

            if (!$path || !is_dir($path)) {
                trigger_error($details['Path'] . ' is not a valid documentation directory', E_USER_WARNING);
                continue;
            }

            $version = (isset($details['Version'])) ? $details['Version'] : '';

            $versionTitle = isset($details['VersionTitle'])
                ? $details['VersionTitle']
                : $version;

            $archived = !empty($details['Archived']);

            $branch = (isset($details['Branch'])) ? $details['Branch'] : '';

            $langs = scandir($path);

            if ($langs) {
                $possible = i18n::get_common_languages(true);

                foreach ($langs as $k => $lang) {
                    if (isset($possible[$lang])) {
                        /**
                         * @var DocumentationEntity $entity
                         */
                        $entity = Injector::inst()->create(
                            'DocumentationEntity',
                            $key
                        );

                        $entity->setPath(DocumentationHelper::normalizePath(Controller::join_links($path, $lang, '/')));
                        $entity->setTitle($details['Title']);
                        $entity->setLanguage($lang);
                        $entity->setVersion($version);
                        $entity->setVersionTitle($versionTitle);
                        $entity->setBranch($branch);
                        $entity->setIsArchived($archived);

                        if (isset($details['Stable'])) {
                            $entity->setIsStable($details['Stable']);
                        }

                        if (isset($details['DefaultEntity'])) {
                            $entity->setIsDefaultEntity($details['DefaultEntity']);
                            if ($entity->getIsDefaultEntity()) {
                                $this->has_default_entity = true;
                            }
                        }

                        $this->registeredEntities->push($entity);
                    }
                }
            }
        }
    }
330958
public function register()
    {
        $this->app->register('ProAI\Datamapper\Providers\MetadataServiceProvider');

        $this->registerEntityScanner();

        $this->registerSchemaBuilder();

        $this->registerModelGenerator();

        $this->registerCommands();
    }
502720
public function register()
    {
        if (!$this->app->bound(TranslatorAdapterFactoryInterface::class)) {
            $this->app->bind(TranslatorAdapterFactoryInterface::class, function ($app, $params) {
                $config = $app->make('config');
                $loaders = $config->get('i18n.adapters.zend.loaders', []);

                $loaderRepository = new TranslationLoaderRepository();
                foreach ($loaders as $key => $class) {
                    $loader = $app->build($class, [$app]);
                    $loaderRepository->registerTranslationLoader($key, $loader);
                }

                $serviceManager = new ServiceManager();
                $loaderPluginManager = new LoaderPluginManager(
                    $serviceManager,
                    [
                        'factories' => [
                            GettextLoader::class => function($creationContext, $resolvedName, $options) {
                                return $this->app->build(GettextLoader::class, ['webrootDirectory' => DIR_BASE]);
                            }
                        ],
                        'aliases' => [
                            'gettext' => GettextLoader::class,
                        ],
                    ]
                );
                $zendFactory = new ZendTranslatorAdapterFactory($loaderRepository, $loaderPluginManager);
                $plainFactory = new PlainTranslatorAdapterFactory();

                return new CoreTranslatorAdapterFactory($config, $plainFactory, $zendFactory);
            });
        }

        $this->app->singleton(Localization::class, function ($app) {
            $loc = new Localization();

            $translatorAdapterFactory = $app->make(TranslatorAdapterFactoryInterface::class);
            $repository = new TranslatorAdapterRepository($translatorAdapterFactory);
            $loc->setTranslatorAdapterRepository($repository);

            $loc->setActiveContext(Localization::CONTEXT_UI);

            return $loc;
        });
    }
699202
protected function registerEntityManager()
    {
        // Bind the default Entity Manager
        $this->app->singleton('em', function ($app) {
            return $app->make(ManagerRegistry::class)->getManager();
        });

        $this->app->alias('em', EntityManager::class);
        $this->app->alias('em', EntityManagerInterface::class);
    }
1358157
public function register()
    {
        $this->setupCache();
        $this->mergeConfig();
        $this->setupMetaData();
        $this->setupConnection();
        $this->registerManagerRegistry();
        $this->registerEntityManager();
        $this->registerClassMetaDataFactory();
        $this->registerExtensions();
        $this->registerCustomTypes();
        $this->registerPresenceVerifier();
        $this->registerConsoleCommands();
    }
1211750
public function register()
    {
        $this->mergeConfigFrom(
            __DIR__.'/../config/eloquent-viewable.php',
            'eloquent-viewable'
        );

        $this->app->when(Views::class)
            ->needs(CacheRepository::class)
            ->give(function () : CacheRepository {
                return $this->app['cache']->store(config('eloquent-viewable.cache.store'));
            });

        $this->app->bind(ViewContract::class, View::class);

        $this->app->bind(CrawlerDetectAdapter::class, function ($app) {
            $detector = new CrawlerDetect(
                $app['request']->headers->all(),
                $app['request']->server('HTTP_USER_AGENT')
            );

            return new CrawlerDetectAdapter($detector);
        });

        $this->app->singleton(CrawlerDetectorContract::class, CrawlerDetectAdapter::class);
        $this->app->singleton(IpAddressResolverContract::class, IpAddressResolver::class);
        $this->app->singleton(HeaderResolverContract::class, HeaderResolver::class);
    }
191987
public function register()
	{
		$this->app->singleton('migration.generate',
            function($app) {
                return new MigrateGenerateCommand(
                    $app->make('Way\Generators\Generator'),
                    $app->make('Way\Generators\Filesystem\Filesystem'),
                    $app->make('Way\Generators\Compilers\TemplateCompiler'),
                    $app->make('migration.repository'),
                    $app->make('config')
                );
            });

		$this->commands('migration.generate');

		// Bind the Repository Interface to $app['migrations.repository']
		$this->app->bind('Illuminate\Database\Migrations\MigrationRepositoryInterface', function($app) {
			return $app['migration.repository'];
		});
	}
481275
protected function registerRouteScanner()
    {
        $this->app->singleton('annotations.route.scanner', function ($app) {
            $scanner = new RouteScanner([]);

            $scanner->addAnnotationNamespace(
              'Collective\Annotations\Routing\Annotations\Annotations',
              __DIR__.'/Routing/Annotations/Annotations'
            );

            return $scanner;
        });
    }
466659
public function register()
    {
        $this->app->singleton(Parser::class, function ($app) {
            return new Parser(new ParsedownDriver(config('markdown') ?? []));
        });

        $this->app->bind('markdown', Parser::class);
    }
1326504
protected function registering()
    {
        $this->app->bindShared(ServiceShortCuts::RESOLVER_SERVICE, function () {
            return new Resolver($this->app);
        });

        $this->app->bindShared(ServiceShortCuts::GHOST_SERVICE, function () {
            return new GhostServices($this->app);
        });

        $this->app->bind(ServiceShortCuts::CORE_INITIALIZED, true);

        $this->app->booting(function () {
            $loader = AliasLoader::getInstance();

            foreach ($this->aliases as $facade => $facadeClass) {
                $loader->alias($facade, $facadeClass);
            }
        });
    }