# depicter/1.3.3/app/src/Database/DatabaseServiceProvider.php

Depicter — Popup &amp; Slider Builder, version 1.3.3. 49 lines.

- Page: https://pluginprobe.com/plugins/depicter/1.3.3/code/app/src/Database/DatabaseServiceProvider.php
- Raw: https://pluginprobe.com/plugins/depicter/1.3.3/raw/app/src/Database/DatabaseServiceProvider.php
- Modified: 2022-06-01T06:26:20+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/depicter/1.3.3/code/app/src/Database/DatabaseServiceProvider.php#L10-L20`.

```php
<?php

namespace Depicter\Database;

use Depicter\Database\Repository\DocumentRepository;
use WPEmerge\ServiceProviders\ServiceProviderInterface;

/**
 * Load document data manager.
 */
class DatabaseServiceProvider implements ServiceProviderInterface {

	/**
	 * {@inheritDoc}
	 */
	/**
	 * {@inheritDoc}
	 */
	public function register( $container ) {
		$container[ 'depicter.database.migration' ] = function () {
			return new Migration();
		};

		$container[ 'depicter.database.repository.document' ] = function () {
			return new DocumentRepository();
		};

		$app = $container[ WPEMERGE_APPLICATION_KEY ];
		$app->alias( 'documentRepository', 'depicter.database.repository.document' );
	}

	/**
	 * {@inheritDoc}
	 */
	public function bootstrap( $container ) {
		register_activation_hook( DEPICTER_PLUGIN_FILE, [ $this, 'activate' ] );
	}

	/**
	 * Plugin activation.
	 *
	 * @return void
	 */
	public function activate() {
		\Depicter::resolve( 'depicter.database.migration' )->migrate(true);
	}

}

```
