| 1 |
<?php |
| 2 |
|
| 3 |
namespace GeminiLabs\SiteReviews\Integrations; |
| 4 |
|
| 5 |
use GeminiLabs\SiteReviews\Contracts\PluginContract; |
| 6 |
use GeminiLabs\SiteReviews\Contracts\ShortcodeContract; |
| 7 |
|
| 8 |
trait IntegrationShortcode |
| 9 |
{ |
| 10 |
private ShortcodeContract $shortcode_instance; |
| 11 |
|
| 12 |
public function app(): PluginContract |
| 13 |
{ |
| 14 |
return glsr(); |
| 15 |
} |
| 16 |
|
| 17 |
abstract public static function shortcodeClass(): string; |
| 18 |
|
| 19 |
public function shortcodeInstance(): ShortcodeContract |
| 20 |
{ |
| 21 |
if (!isset($this->shortcode_instance)) { |
| 22 |
$this->shortcode_instance = glsr(static::shortcodeClass()); |
| 23 |
} |
| 24 |
return $this->shortcode_instance; |
| 25 |
} |
| 26 |
} |
| 27 |
|