Jake Vanderwerf
9 days ago ed57c386db34d8693ca75311972d0929ebe5f488
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
<?php
namespace JVBase\managers\SEO\render\Traits\_Properties;
 
if (!defined('ABSPATH')) {
    exit;
}
trait gtinTrait {
    /**
     * @var string A Global Trade Item Number (GTIN). GTINs identify trade items, including products and services, using numeric identification codes.
     *
     * A correct gtin value should be a valid GTIN, which means that it should be an all-numeric string of either 8, 12, 13 or 14 digits, or a "GS1 Digital Link" URL based on such a string. The numeric component should also have a valid GS1 check digit and meet the other rules for valid GTINs. See also GS1's GTIN Summary and Wikipedia for more details. Left-padding of the gtin values is not required or encouraged. The gtin property generalizes the earlier gtin8, gtin12, gtin13, and gtin14 properties.
     *
     * The GS1 digital link specifications expresses GTINs as URLs (URIs, IRIs, etc.). Digital Links should be populated into the hasGS1DigitalLink attribute.
     *
     * Note also that this is a definition for how to include GTINs in Schema.org data, and not a definition of GTINs in general - see the GS1 documentation for authoritative details.
     */
    protected string $gtin;
 
    public function getGtin():?string
    {
        return $this->gtin??null;
    }
    public function setGtin(string $gtin):void
    {
        $this->gtin = $gtin;
    }
}