# depicter/trunk/app/src/Editor/EditorServiceProvider.php

Depicter — Popup &amp; Slider Builder, version trunk. 45 lines.

- Page: https://pluginprobe.com/plugins/depicter/trunk/code/app/src/Editor/EditorServiceProvider.php
- Raw: https://pluginprobe.com/plugins/depicter/trunk/raw/app/src/Editor/EditorServiceProvider.php
- Modified: 2023-04-29T19:59:32+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/trunk/code/app/src/Editor/EditorServiceProvider.php#L10-L20`.

```php
<?php

namespace Depicter\Editor;

use WPEmerge\ServiceProviders\ServiceProviderInterface;

/**
 * Loads editor.
 */
class EditorServiceProvider implements ServiceProviderInterface {

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

		$app = $container[ WPEMERGE_APPLICATION_KEY ];
		$app->alias( 'editor', 'depicter.editor' );

		$container[ 'depicter.editor.assets' ] = function () {
			return new EditorAssets();
		};

		$container[ 'depicter.editor.data' ] = function () {
			return new EditorData();
		};

		$app->alias( 'editorData', 'depicter.editor.data' );
	}

	/**
	 * {@inheritDoc}
	 */
	public function bootstrap( $container ) {
		\Depicter::app()->editor()->init();
	}

}

```
