# solid-performance/1.5.0/src/Performance/Dom/Contracts/Modifier.php

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

- Page: https://pluginprobe.com/plugins/solid-performance/1.5.0/code/src/Performance/Dom/Contracts/Modifier.php
- Raw: https://pluginprobe.com/plugins/solid-performance/1.5.0/raw/src/Performance/Dom/Contracts/Modifier.php
- Modified: 2025-02-27T18:44:40+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.5.0/code/src/Performance/Dom/Contracts/Modifier.php#L10-L20`.

```php
<?php
/**
 * The pipeline dom modifier stage contract.
 *
 * Each modifier should implement this interface.
 *
 * @package SolidWP\Performance
 */

declare( strict_types=1 );

namespace SolidWP\Performance\Dom\Contracts;

use Closure;
use SolidWP\Performance\Symfony\Component\DomCrawler\Crawler;

/**
 * @internal
 */
interface Modifier {

	/**
	 * Should immediately return true if this pipeline stage is enabled, otherwise
	 * pass the current $enabled value to the next stage.
	 *
	 * @param bool    $enabled Whether the previous stage is enabled.
	 * @param Closure $next The closure passed to the next stage.
	 *
	 * @return bool
	 */
	public function enabled( bool $enabled, Closure $next ): bool;

	/**
	 * Handle modifying the HTML and passing it to the next stage of the pipeline,
	 * assuming it's enabled.
	 *
	 * @param Crawler $crawler The symfony dom crawler instance.
	 * @param Closure $next The closure passed to the next stage.
	 *
	 * @return Crawler
	 */
	public function modify( Crawler $crawler, Closure $next ): Crawler;
}

```
