# imagify/2.2.3.1/classes/Picture/ServiceProvider.php

Imagify Image Optimization: Optimize Images | Compress &amp; Convert to WebP/AVIF, version 2.2.3.1. 49 lines.

- Page: https://pluginprobe.com/plugins/imagify/2.2.3.1/code/classes/Picture/ServiceProvider.php
- Raw: https://pluginprobe.com/plugins/imagify/2.2.3.1/raw/classes/Picture/ServiceProvider.php
- Modified: 2024-03-06T17:27:56+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/imagify/2.2.3.1/code/classes/Picture/ServiceProvider.php#L10-L20`.

```php
<?php
declare(strict_types=1);

namespace Imagify\Picture;

use Imagify\Dependencies\League\Container\ServiceProvider\AbstractServiceProvider;

/**
 * Service provider for Picture display
 */
class ServiceProvider extends AbstractServiceProvider {
	/**
	 * Services provided by this provider
	 *
	 * @var array
	 */
	protected $provides = [
		'picture_display',
	];

	/**
	 * Subscribers provided by this provider
	 *
	 * @var array
	 */
	public $subscribers = [
		'picture_display',
	];

	/**
	 * Registers the provided classes
	 *
	 * @return void
	 */
	public function register() {
		$this->getContainer()->share( 'picture_display', Display::class )
			->addArgument( $this->getContainer()->get( 'filesystem' ) );
	}

	/**
	 * Returns the subscribers array
	 *
	 * @return array
	 */
	public function get_subscribers() {
		return $this->subscribers;
	}
}

```
