Jake Vanderwerf
2026-04-15 c4aa5cdb5e90ad4b420e22772797d16980232a2b
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
27
28
29
30
31
32
<?php
namespace JVBase\inc\managers\SEO\render\Traits\_Properties;
 
use JVBase\inc\managers\SEO\render\Thing\CreativeWork\Comment\Comment;
use JVBase\managers\SEO\render\Thing\CreativeWork\CreativeWork;
use JVBase\managers\SEO\render\Traits\_Helpers\arrayHelper;
 
if (!defined('ABSPATH')) {
    exit;
}
trait parentItemTrait {
    use arrayHelper;
    /**
     * @var Comment|CreativeWork|array The parent of a question, answer or item in general. Typically used for Q/A discussion threads e.g. a chain of comments with the first comment being an Article or other CreativeWork. See also comment which points from something to a comment about it.
     */
    protected Comment|CreativeWork|array $parentItem;
 
    public function getParent():Comment|CreativeWork|array|null
    {
        return $this->parentItem??null;
    }
    public function setParent(Comment|CreativeWork|array $parentItem):void
    {
        if (is_array($parentItem)) {
            $parentItem = $this->mixedArray('parentItem', $parentItem, [
                'JVBase\managers\SEO\render\Thing\CreativeWork\CreativeWork',
                'JVBase\inc\managers\SEO\render\Thing\CreativeWork\Comment\Comment'
            ]);
        }
        $this->parentItem = $parentItem;
    }
}