# imagify/2.2/classes/Dependencies/League/Container/ServiceProvider/ServiceProviderInterface.php

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

- Page: https://pluginprobe.com/plugins/imagify/2.2/code/classes/Dependencies/League/Container/ServiceProvider/ServiceProviderInterface.php
- Raw: https://pluginprobe.com/plugins/imagify/2.2/raw/classes/Dependencies/League/Container/ServiceProvider/ServiceProviderInterface.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/code/classes/Dependencies/League/Container/ServiceProvider/ServiceProviderInterface.php#L10-L20`.

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

namespace Imagify\Dependencies\League\Container\ServiceProvider;

use Imagify\Dependencies\League\Container\ContainerAwareInterface;

interface ServiceProviderInterface extends ContainerAwareInterface
{
    /**
     * Returns a boolean if checking whether this provider provides a specific
     * service or returns an array of provided services if no argument passed.
     *
     * @param string $service
     *
     * @return boolean
     */
    public function provides(string $service) : bool;

    /**
     * Use the register method to register items with the container via the
     * protected $this->leagueContainer property or the `getLeagueContainer` method
     * from the ContainerAwareTrait.
     *
     * @return void
     */
    public function register();

    /**
     * Set a custom id for the service provider. This enables
     * registering the same service provider multiple times.
     *
     * @param string $id
     *
     * @return self
     */
    public function setIdentifier(string $id) : ServiceProviderInterface;

    /**
     * The id of the service provider uniquely identifies it, so
     * that we can quickly determine if it has already been registered.
     * Defaults to get_class($provider).
     *
     * @return string
     */
    public function getIdentifier() : string;
}

```
