<?php
|
namespace JVBase\managers\SEO\render\Traits\_Properties;
|
|
use JVBase\managers\SEO\render\Thing\CreativeWork\CreativeWork;
|
|
if (!defined('ABSPATH')) {
|
exit;
|
}
|
trait licenseTrait {
|
/**
|
* @var CreativeWork|string A license document that applies to this content, typically indicated by URL.
|
*/
|
protected CreativeWork|string $license;
|
|
public function getLicense():CreativeWork|string|null
|
{
|
return $this->license??null;
|
}
|
public function setLicense(CreativeWork|string $license):void
|
{
|
if (is_string($license) && !filter_var($license, FILTER_VALIDATE_URL)) {
|
error_log('[SEO] License is expected to be a valid URL');
|
return;
|
}
|
$this->license = $license;
|
}
|
}
|