| 1 |
<?php |
| 2 |
|
| 3 |
namespace DeliciousBrains\SpinupWp; |
| 4 |
|
| 5 |
use DeliciousBrains\SpinupWp\Compatibility\ElementorPlugin; |
| 6 |
|
| 7 |
class Compatibility { |
| 8 |
/** |
| 9 |
* @var Cache |
| 10 |
*/ |
| 11 |
protected $cache; |
| 12 |
|
| 13 |
/** |
| 14 |
* @var array |
| 15 |
*/ |
| 16 |
protected $compatibilityClasses = array( |
| 17 |
ElementorPlugin::class, |
| 18 |
); |
| 19 |
|
| 20 |
/** |
| 21 |
* Compatibility constructor. |
| 22 |
* |
| 23 |
* @param Cache $cache |
| 24 |
*/ |
| 25 |
public function __construct( Cache $cache ) { |
| 26 |
$this->cache = $cache; |
| 27 |
} |
| 28 |
|
| 29 |
/** |
| 30 |
* Init |
| 31 |
*/ |
| 32 |
public function init() { |
| 33 |
foreach ( $this->compatibilityClasses as $compatibilityClass ) { |
| 34 |
( new $compatibilityClass( $this->cache ) )->init(); |
| 35 |
} |
| 36 |
} |
| 37 |
} |