Completed
Pull Request — master (#79)
by
unknown
15:15
created

Thing::subjectOf()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
namespace Spatie\SchemaOrg;
4
5
/**
6
 * The most generic type of item.
7
 *
8
 * @see http://schema.org/Thing
9
 */
10
class Thing extends BaseType
11
{
12
    /**
13
     * An additional type for the item, typically used for adding more specific
14
     * types from external vocabularies in microdata syntax. This is a
15
     * relationship between something and a class that the thing is in. In RDFa
16
     * syntax, it is better to use the native RDFa syntax - the 'typeof'
17
     * attribute - for multiple types. Schema.org tools may have only weaker
18
     * understanding of extra types, in particular those defined externally.
19
     *
20
     * @param string|string[] $additionalType
21
     *
22
     * @return static
23
     *
24
     * @see http://schema.org/additionalType
25
     */
26
    public function additionalType($additionalType)
27
    {
28
        return $this->setProperty('additionalType', $additionalType);
29
    }
30
31
    /**
32
     * An alias for the item.
33
     *
34
     * @param string|string[] $alternateName
35
     *
36
     * @return static
37
     *
38
     * @see http://schema.org/alternateName
39
     */
40
    public function alternateName($alternateName)
41
    {
42
        return $this->setProperty('alternateName', $alternateName);
43
    }
44
45
    /**
46
     * A description of the item.
47
     *
48
     * @param string|string[] $description
49
     *
50
     * @return static
51
     *
52
     * @see http://schema.org/description
53
     */
54
    public function description($description)
55
    {
56
        return $this->setProperty('description', $description);
57
    }
58
59
    /**
60
     * A sub property of description. A short description of the item used to
61
     * disambiguate from other, similar items. Information from other properties
62
     * (in particular, name) may be necessary for the description to be useful
63
     * for disambiguation.
64
     *
65
     * @param string|string[] $disambiguatingDescription
66
     *
67
     * @return static
68
     *
69
     * @see http://schema.org/disambiguatingDescription
70
     */
71
    public function disambiguatingDescription($disambiguatingDescription)
72
    {
73
        return $this->setProperty('disambiguatingDescription', $disambiguatingDescription);
74
    }
75
76
    /**
77
     * The identifier property represents any kind of identifier for any kind of
78
     * [[Thing]], such as ISBNs, GTIN codes, UUIDs etc. Schema.org provides
79
     * dedicated properties for representing many of these, either as textual
80
     * strings or as URL (URI) links. See [background
81
     * notes](/docs/datamodel.html#identifierBg) for more details.
82
     *
83
     * @param PropertyValue|PropertyValue[]|string|string[] $identifier
84
     *
85
     * @return static
86
     *
87
     * @see http://schema.org/identifier
88
     */
89
    public function identifier($identifier)
90
    {
91
        return $this->setProperty('identifier', $identifier);
92
    }
93
94
    /**
95
     * An image of the item. This can be a [[URL]] or a fully described
96
     * [[ImageObject]].
97
     *
98
     * @param ImageObject|ImageObject[]|string|string[] $image
99
     *
100
     * @return static
101
     *
102
     * @see http://schema.org/image
103
     */
104
    public function image($image)
105
    {
106
        return $this->setProperty('image', $image);
107
    }
108
109
    /**
110
     * Indicates a page (or other CreativeWork) for which this thing is the main
111
     * entity being described. See [background
112
     * notes](/docs/datamodel.html#mainEntityBackground) for details.
113
     *
114
     * @param CreativeWork|CreativeWork[]|string|string[] $mainEntityOfPage
115
     *
116
     * @return static
117
     *
118
     * @see http://schema.org/mainEntityOfPage
119
     */
120
    public function mainEntityOfPage($mainEntityOfPage)
121
    {
122
        return $this->setProperty('mainEntityOfPage', $mainEntityOfPage);
123
    }
124
125
    /**
126
     * The name of the item.
127
     *
128
     * @param string|string[] $name
129
     *
130
     * @return static
131
     *
132
     * @see http://schema.org/name
133
     */
134
    public function name($name)
135
    {
136
        return $this->setProperty('name', $name);
137
    }
138
139
    /**
140
     * Indicates a potential Action, which describes an idealized action in
141
     * which this thing would play an 'object' role.
142
     *
143
     * @param Action|Action[] $potentialAction
144
     *
145
     * @return static
146
     *
147
     * @see http://schema.org/potentialAction
148
     */
149
    public function potentialAction($potentialAction)
150
    {
151
        return $this->setProperty('potentialAction', $potentialAction);
152
    }
153
154
    /**
155
     * URL of a reference Web page that unambiguously indicates the item's
156
     * identity. E.g. the URL of the item's Wikipedia page, Wikidata entry, or
157
     * official website.
158
     *
159
     * @param string|string[] $sameAs
160
     *
161
     * @return static
162
     *
163
     * @see http://schema.org/sameAs
164
     */
165
    public function sameAs($sameAs)
166
    {
167
        return $this->setProperty('sameAs', $sameAs);
168
    }
169
170
    /**
171
     * A CreativeWork or Event about this Thing..
172
     *
173
     * @param CreativeWork|CreativeWork[]|Event|Event[] $subjectOf
174
     *
175
     * @return static
176
     *
177
     * @see http://schema.org/subjectOf
178
     */
179
    public function subjectOf($subjectOf)
180
    {
181
        return $this->setProperty('subjectOf', $subjectOf);
182
    }
183
184
    /**
185
     * URL of the item.
186
     *
187
     * @param string|string[] $url
188
     *
189
     * @return static
190
     *
191
     * @see http://schema.org/url
192
     */
193
    public function url($url)
194
    {
195
        return $this->setProperty('url', $url);
196
    }
197
198
}
199