<?php
|
namespace JVBase\managers\SEO\render\Traits\_Properties;
|
|
use JVBase\managers\SEO\render\Thing\Organization\Organization;
|
use JVBase\managers\SEO\render\Thing\Person\Person;
|
use JVBase\managers\SEO\render\Traits\_Helpers\arrayHelper;
|
|
if (!defined('ABSPATH')) {
|
exit;
|
}
|
trait agentTrait {
|
use arrayHelper;
|
/**
|
* @var Organization|Person|array The direct performer or driver of the action (animate or inanimate). E.g. John wrote a book.
|
*/
|
protected Organization|Person|array $agent;
|
|
public function getAgent():Organization|Person|array|null
|
{
|
return $this->agent??null;
|
}
|
public function setAgent(Organization|Person|array $agent):void
|
{
|
if (is_array($agent)) {
|
$agent = $this->mixedArray('agent', $agent, [
|
'JVBase\managers\SEO\render\Thing\Organization\Organization',
|
'JVBase\managers\SEO\render\Thing\Person\Person'
|
]);
|
}
|
$this->agent = $agent;
|
}
|
}
|