<?php
|
namespace JVBase\managers\SEO\render\Traits\_Properties;
|
|
use JVBase\managers\SEO\render\Thing\Intangible\Quantity\Duration;
|
|
if (!defined('ABSPATH')) {
|
exit;
|
}
|
trait durationTrait {
|
/**
|
* @var Duration The duration of the item (movie, audio recording, event, etc.) in ISO 8601 duration format.
|
*/
|
protected Duration $duration;
|
|
public function getDuration():?Duration
|
{
|
return $this->duration??null;
|
}
|
public function setDuration(Duration|string $duration):void
|
{
|
if (is_string($duration)) {
|
$duration = new Duration($duration);
|
}
|
$this->duration = $duration;
|
}
|
}
|