# solid-performance/1.1.0/src/Performance/Contracts/Service_Provider.php

Solid Performance – Your No-Code Caching, Performance, &amp; Page Speed Solution, version 1.1.0. 101 lines.

- Page: https://pluginprobe.com/plugins/solid-performance/1.1.0/code/src/Performance/Contracts/Service_Provider.php
- Raw: https://pluginprobe.com/plugins/solid-performance/1.1.0/raw/src/Performance/Contracts/Service_Provider.php
- Modified: 2024-09-03T15:51: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/solid-performance/1.1.0/code/src/Performance/Contracts/Service_Provider.php#L10-L20`.

```php
<?php
/**
 * A base class all service providers should extend.
 *
 * @since 0.1.0
 *
 * @package SolidWP\Performance
 */

declare( strict_types=1 );

namespace SolidWP\Performance\Contracts;

use SolidWP\Performance\Container;

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

/**
 * A local instance to prevent coupling directly to Di52.
 *
 * @since 0.1.0
 *
 * @package SolidWP\Performance
 */
abstract class Service_Provider {

	/**
	 * Whether this service provider will be a deferred one or not.
	 *
	 * @var bool
	 */
	protected bool $deferred = false;

	/**
	 * The container instance.
	 *
	 * @var Container
	 */
	protected Container $container;

	/**
	 * @param  Container $container The container instance.
	 */
	public function __construct( Container $container ) {
		$this->container = $container;
	}

	/**
	 * Registers the service provider container bindings.
	 *
	 * @return void
	 */
	abstract public function register(): void;

	/**
	 * Whether the service provider will be a deferred one or not.
	 *
	 * @return bool
	 */
	public function isDeferred(): bool {
		return $this->deferred;
	}

	/**
	 * Returns an array of the class or interfaces bound and provided by the service provider.
	 *
	 * @return string[] A list of fully-qualified implementations provided by the service provider.
	 */
	public function provides(): array {
		return [];
	}

	/**
	 * Binds and sets up implementations at boot time.
	 *
	 * @return void
	 */
	public function boot(): void {
	}

	/**
	 * Register all action hooks for the provider.
	 *
	 * @since 0.1.0
	 *
	 * @return void
	 */
	public function register_actions(): void {}

	/**
	 * Register all filter hooks for the provider.
	 *
	 * @since 0.1.0
	 *
	 * @return void
	 */
	public function register_filters(): void {}
}

```
