PluginProbe
Parse.ly / 3.14.1
Parse.ly v3.14.1
3.24.1 3.24.0 3.23.7 3.23.6 3.23.5 3.23.4 3.23.3 3.16.0 3.16.1 3.16.2 3.16.3 3.16.4 3.17.0 3.18.0 3.18.1 3.19.0 3.19.1 3.19.2 3.19.3 3.2.0 3.2.1 3.20.0 3.20.1 3.20.2 3.20.3 All 105 releases
← All changes | src/Integrations/class-integration.php +27 -7 3.2.03.14.1 View file →
@@ -1,10 +1,10 @@
1 1 <?php
2 2 /**
3 - * Integration interface
3 + * Integrations: Abstract base class for all integration implementations
4 4 *
5 - * @package Parsely\Integrations
6 - * @since 2.6.0
5 + * @package Parsely
6 + * @since 2.6.0
7 7 */
8 8
9 9 declare(strict_types=1);
10 10
@@ -9,17 +9,37 @@
9 9 declare(strict_types=1);
10 10
11 11 namespace Parsely\Integrations;
12 12
13 +use Parsely\Parsely;
14 +
13 15 /**
14 - * Integration classes are expected to implement this interface.
16 + * Base class that all integrations should extend from.
15 17 *
16 18 * @since 2.6.0
19 + * @since 3.5.2 Converted from interface to abstract class.
17 20 */
18 -interface Integration {
21 +abstract class Integration {
19 22 /**
20 - * Apply the hooks that integrate the plugin or theme with the Parse.ly plugin.
23 + * Instance of Parsely class.
21 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 + *
22 42 * @since 2.6.0
23 43 */
24 - public function integrate(): void;
44 + abstract public function integrate(): void;
25 45 }