	/**
	 * Registers the service provider with a DI container.
	 *
	 * @param   Container  $container  The DI container.
	 *
	 * @return  void
	 * @since 3.2.0
	 */
	public function register(Container $container)
	{
		$container->alias(PowerGenerator::class, 'Power.Generator')
			->share('Power.Generator', [$this, 'getGenerator'], true);

		$container->alias(ClassInjectorBuilder::class, 'Power.Generator.Class.Injector.Builder')
			->share('Power.Generator.Class.Injector.Builder', [$this, 'getClassInjectorBuilder'], true);

		$container->alias(ServiceProviderBuilder::class, 'Power.Generator.Service.Provider.Builder')
			->share('Power.Generator.Service.Provider.Builder', [$this, 'getServiceProviderBuilder'], true);

		$container->alias(Search::class, 'Power.Generator.Search')
			->share('Power.Generator.Search', [$this, 'getSearch'], true);

		$container->alias(ClassInjector::class, 'Power.Generator.Class.Injector')
			->share('Power.Generator.Class.Injector', [$this, 'getClassInjector'], true);

		$container->alias(ServiceProvider::class, 'Power.Generator.Service.Provider')
			->share('Power.Generator.Service.Provider', [$this, 'getServiceProvider'], true);

		$container->alias(Bucket::class, 'Power.Generator.Bucket')
			->share('Power.Generator.Bucket', [$this, 'getBucket'], true);
	}

	/**
	 * Get the Generator
	 *
	 * @param   Container  $container  The DI container.
	 *
	 * @return  PowerGenerator
	 * @since 3.2.0
	 */
	public function getGenerator(Container $container): PowerGenerator
	{
		return new PowerGenerator(
			$container->get('Power.Generator.Class.Injector.Builder'),
			$container->get('Power.Generator.Service.Provider.Builder')
		);
	}

	/**
	 * Get the Generator Class Injector Builder
	 *
	 * @param   Container  $container  The DI container.
	 *
	 * @return  ClassInjectorBuilder
	 * @since 3.2.0
	 */
	public function getClassInjectorBuilder(Container $container): ClassInjectorBuilder
	{
		return new ClassInjectorBuilder(
			$container->get('Power.Generator.Search'),
			$container->get('Power.Generator.Class.Injector')
		);
	}

	/**
	 * Get the Generator Service Provider Builder
	 *
	 * @param   Container  $container  The DI container.
	 *
	 * @return  ServiceProviderBuilder
	 * @since 3.2.0
	 */
	public function getServiceProviderBuilder(Container $container): ServiceProviderBuilder
	{
		return new ServiceProviderBuilder(
			$container->get('Power.Generator.Search'),
			$container->get('Power.Generator.Service.Provider')
		);
	}

	/**
	 * Get the Generator Search
	 *
	 * @param   Container  $container  The DI container.
	 *
	 * @return  Search
	 * @since 3.2.0
	 */
	public function getSearch(Container $container): Search
	{
		return new Search(
			$container->get('Power.Database.Load'),
			$container->get('Power.Parser'),
			$container->get('Power.Generator.Bucket')
		);
	}

	/**
	 * Get the Generator Class Injector
	 *
	 * @param   Container  $container  The DI container.
	 *
	 * @return  ClassInjector
	 * @since 3.2.0
	 */
	public function getClassInjector(Container $container): ClassInjector
	{
		return new ClassInjector();
	}

	/**
	 * Get the Generator Service Provider
	 *
	 * @param   Container  $container  The DI container.
	 *
	 * @return  ServiceProvider
	 * @since 3.2.0
	 */
	public function getServiceProvider(Container $container): ServiceProvider
	{
		return new ServiceProvider();
	}

	/**
	 * Get the Generator Bucket
	 *
	 * @param   Container  $container  The DI container.
	 *
	 * @return  Bucket
	 * @since 3.2.0
	 */
	public function getBucket(Container $container): Bucket
	{
		return new Bucket();
	}