Jake Vanderwerf
5 days ago 75a097a018a0090f5902758353c578fce4aa2a25
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?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;
    }
}