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

WebPage   A

Complexity

Total Complexity 10

Size/Duplication

Total Lines 173
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 10
lcom 1
cbo 1
dl 0
loc 173
rs 10
c 0
b 0
f 0

10 Methods

Rating   Name   Duplication   Size   Complexity  
A breadcrumb() 0 4 1
A lastReviewed() 0 4 1
A mainContentOfPage() 0 4 1
A primaryImageOfPage() 0 4 1
A relatedLink() 0 4 1
A reviewedBy() 0 4 1
A significantLink() 0 4 1
A significantLinks() 0 4 1
A speakable() 0 4 1
A specialty() 0 4 1
1
<?php
2
3
namespace Spatie\SchemaOrg;
4
5
/**
6
 * A web page. Every web page is implicitly assumed to be declared to be of type
7
 * WebPage, so the various properties about that webpage, such as
8
 * <code>breadcrumb</code> may be used. We recommend explicit declaration if
9
 * these properties are specified, but if they are found outside of an
10
 * itemscope, they will be assumed to be about the page.
11
 *
12
 * @see http://schema.org/WebPage
13
 *
14
 * @mixin \Spatie\SchemaOrg\CreativeWork
15
 */
16
class WebPage extends BaseType
17
{
18
    /**
19
     * A set of links that can help a user understand and navigate a website
20
     * hierarchy.
21
     *
22
     * @param BreadcrumbList|BreadcrumbList[]|string|string[] $breadcrumb
23
     *
24
     * @return static
25
     *
26
     * @see http://schema.org/breadcrumb
27
     */
28
    public function breadcrumb($breadcrumb)
29
    {
30
        return $this->setProperty('breadcrumb', $breadcrumb);
31
    }
32
33
    /**
34
     * Date on which the content on this web page was last reviewed for accuracy
35
     * and/or completeness.
36
     *
37
     * @param \DateTimeInterface|\DateTimeInterface[] $lastReviewed
38
     *
39
     * @return static
40
     *
41
     * @see http://schema.org/lastReviewed
42
     */
43
    public function lastReviewed($lastReviewed)
44
    {
45
        return $this->setProperty('lastReviewed', $lastReviewed);
46
    }
47
48
    /**
49
     * Indicates if this web page element is the main subject of the page.
50
     *
51
     * @param WebPageElement|WebPageElement[] $mainContentOfPage
52
     *
53
     * @return static
54
     *
55
     * @see http://schema.org/mainContentOfPage
56
     */
57
    public function mainContentOfPage($mainContentOfPage)
58
    {
59
        return $this->setProperty('mainContentOfPage', $mainContentOfPage);
60
    }
61
62
    /**
63
     * Indicates the main image on the page.
64
     *
65
     * @param ImageObject|ImageObject[] $primaryImageOfPage
66
     *
67
     * @return static
68
     *
69
     * @see http://schema.org/primaryImageOfPage
70
     */
71
    public function primaryImageOfPage($primaryImageOfPage)
72
    {
73
        return $this->setProperty('primaryImageOfPage', $primaryImageOfPage);
74
    }
75
76
    /**
77
     * A link related to this web page, for example to other related web pages.
78
     *
79
     * @param string|string[] $relatedLink
80
     *
81
     * @return static
82
     *
83
     * @see http://schema.org/relatedLink
84
     */
85
    public function relatedLink($relatedLink)
86
    {
87
        return $this->setProperty('relatedLink', $relatedLink);
88
    }
89
90
    /**
91
     * People or organizations that have reviewed the content on this web page
92
     * for accuracy and/or completeness.
93
     *
94
     * @param Organization|Organization[]|Person|Person[] $reviewedBy
95
     *
96
     * @return static
97
     *
98
     * @see http://schema.org/reviewedBy
99
     */
100
    public function reviewedBy($reviewedBy)
101
    {
102
        return $this->setProperty('reviewedBy', $reviewedBy);
103
    }
104
105
    /**
106
     * One of the more significant URLs on the page. Typically, these are the
107
     * non-navigation links that are clicked on the most.
108
     *
109
     * @param string|string[] $significantLink
110
     *
111
     * @return static
112
     *
113
     * @see http://schema.org/significantLink
114
     */
115
    public function significantLink($significantLink)
116
    {
117
        return $this->setProperty('significantLink', $significantLink);
118
    }
119
120
    /**
121
     * The most significant URLs on the page. Typically, these are the
122
     * non-navigation links that are clicked on the most.
123
     *
124
     * @param string|string[] $significantLinks
125
     *
126
     * @return static
127
     *
128
     * @see http://schema.org/significantLinks
129
     */
130
    public function significantLinks($significantLinks)
131
    {
132
        return $this->setProperty('significantLinks', $significantLinks);
133
    }
134
135
    /**
136
     * Indicates sections of a Web page that are particularly 'speakable' in the
137
     * sense of being highlighted as being especially appropriate for
138
     * text-to-speech conversion. Other sections of a page may also be usefully
139
     * spoken in particular circumstances; the 'speakable' property serves to
140
     * indicate the parts most likely to be generally useful for speech.
141
     * 
142
     * The *speakable* property can be repeated an arbitrary number of times,
143
     * with three kinds of possible 'content-locator' values:
144
     * 
145
     * 1.) *id-value* URL references - uses *id-value* of an element in the page
146
     * being annotated. The simplest use of *speakable* has (potentially
147
     * relative) URL values, referencing identified sections of the document
148
     * concerned.
149
     * 
150
     * 2.) CSS Selectors - addresses content in the annotated page, eg. via
151
     * class attribute. Use the [[cssSelector]] property.
152
     * 
153
     * 3.)  XPaths - addresses content via XPaths (assuming an XML view of the
154
     * content). Use the [[xpath]] property.
155
     * 
156
     * 
157
     * For more sophisticated markup of speakable sections beyond simple ID
158
     * references, either CSS selectors or XPath expressions to pick out
159
     * document section(s) as speakable. For this
160
     * we define a supporting type, [[SpeakableSpecification]]  which is defined
161
     * to be a possible value of the *speakable* property.
162
     *
163
     * @param SpeakableSpecification|SpeakableSpecification[]|string|string[] $speakable
164
     *
165
     * @return static
166
     *
167
     * @see http://schema.org/speakable
168
     */
169
    public function speakable($speakable)
170
    {
171
        return $this->setProperty('speakable', $speakable);
172
    }
173
174
    /**
175
     * One of the domain specialities to which this web page's content applies.
176
     *
177
     * @param Specialty|Specialty[] $specialty
178
     *
179
     * @return static
180
     *
181
     * @see http://schema.org/specialty
182
     */
183
    public function specialty($specialty)
184
    {
185
        return $this->setProperty('specialty', $specialty);
186
    }
187
188
}
189