| 1 |
<?php |
| 2 |
/** |
| 3 |
* Integrations: Abstract base class for all integration implementations |
| 4 |
* |
| 5 |
* @package Parsely |
| 6 |
* @since 2.6.0 |
| 7 |
*/ |
| 8 |
|
| 9 |
declare(strict_types=1); |
| 10 |
|
| 11 |
namespace Parsely\Integrations; |
| 12 |
|
| 13 |
use Parsely\Parsely; |
| 14 |
|
| 15 |
/** |
| 16 |
* Base class that all integrations should extend from. |
| 17 |
* |
| 18 |
* @since 2.6.0 |
| 19 |
* @since 3.5.2 Converted from interface to abstract class. |
| 20 |
*/ |
| 21 |
abstract class Integration { |
| 22 |
/** |
| 23 |
* Instance of Parsely class. |
| 24 |
* |
| 25 |
* @var Parsely |
| 26 |
*/ |
| 27 |
protected static $parsely; |
| 28 |
|
| 29 |
/** |
| 30 |
* Constructor. |
| 31 |
* |
| 32 |
* @param Parsely $parsely Instance of Parsely class. |
| 33 |
*/ |
| 34 |
public function __construct( Parsely $parsely ) { |
| 35 |
self::$parsely = $parsely; |
| 36 |
} |
| 37 |
|
| 38 |
/** |
| 39 |
* Applies the hooks that integrate the plugin or theme with the Parse.ly |
| 40 |
* plugin. |
| 41 |
* |
| 42 |
* @since 2.6.0 |
| 43 |
*/ |
| 44 |
abstract public function integrate(): void; |
| 45 |
} |
| 46 |
|