<?php
|
namespace JVBase\managers\SEO\render\Traits\_Properties;
|
|
use JVBase\managers\SEO\render\Thing\Intangible\Service;
|
use JVBase\managers\SEO\render\Thing\Product\Product;
|
use JVBase\managers\SEO\render\Traits\_Helpers\arrayHelper;
|
|
if (!defined('ABSPATH')) {
|
exit;
|
}
|
trait isSimilarToTrait {
|
use arrayHelper;
|
/**
|
* @var Product|Service|array A pointer to another, somehow related product (or multiple products).
|
*/
|
protected Product|Service|array $isSimilarTo;
|
|
public function getIsSimilarTo():Product|Service|array|null
|
{
|
return $this->isSimilarTo??null;
|
}
|
public function setIsSimilarTo(Product|Service|array $isSimilarTo):void
|
{
|
if (is_array($isSimilarTo)) {
|
$isSimilarTo = $this->mixedArray('isSimilarTo', $isSimilarTo, [
|
'JVBase\managers\SEO\render\Thing\Intangible\Service',
|
'JVBase\managers\SEO\render\Thing\Product\Product'
|
]);
|
}
|
$this->isSimilarTo = $isSimilarTo;
|
}
|
}
|