@@ -26,149 +26,149 @@ |
||
26 | 26 | */ |
27 | 27 | class LeaveAction extends MetaJsonLd implements LeaveActionInterface, InteractActionInterface, ActionInterface, ThingInterface |
28 | 28 | { |
29 | - use LeaveActionTrait; |
|
30 | - use InteractActionTrait; |
|
31 | - use ActionTrait; |
|
32 | - use ThingTrait; |
|
33 | - |
|
34 | - /** |
|
35 | - * The Schema.org Type Name |
|
36 | - * |
|
37 | - * @var string |
|
38 | - */ |
|
39 | - public static $schemaTypeName = 'LeaveAction'; |
|
40 | - |
|
41 | - /** |
|
42 | - * The Schema.org Type Scope |
|
43 | - * |
|
44 | - * @var string |
|
45 | - */ |
|
46 | - public static $schemaTypeScope = 'https://schema.org/LeaveAction'; |
|
47 | - |
|
48 | - /** |
|
49 | - * The Schema.org Type Extends |
|
50 | - * |
|
51 | - * @var string |
|
52 | - */ |
|
53 | - public static $schemaTypeExtends = 'InteractAction'; |
|
54 | - |
|
55 | - /** |
|
56 | - * The Schema.org Type Description |
|
57 | - * |
|
58 | - * @var string |
|
59 | - */ |
|
60 | - public static $schemaTypeDescription = 'An agent leaves an event / group with participants/friends at a location.\n\nRelated actions:\n\n* [[JoinAction]]: The antonym of LeaveAction.\n* [[UnRegisterAction]]: Unlike UnRegisterAction, LeaveAction implies leaving a group/team of people rather than a service.'; |
|
61 | - |
|
62 | - |
|
63 | - /** |
|
64 | - * @inheritdoc |
|
65 | - */ |
|
66 | - public function getSchemaPropertyNames(): array |
|
67 | - { |
|
68 | - return array_keys($this->getSchemaPropertyExpectedTypes()); |
|
69 | - } |
|
70 | - |
|
71 | - |
|
72 | - /** |
|
73 | - * @inheritdoc |
|
74 | - */ |
|
75 | - public function getSchemaPropertyExpectedTypes(): array |
|
76 | - { |
|
77 | - return [ |
|
78 | - 'actionStatus' => ['ActionStatusType'], |
|
79 | - 'additionalType' => ['URL'], |
|
80 | - 'agent' => ['Organization', 'Person'], |
|
81 | - 'alternateName' => ['Text'], |
|
82 | - 'description' => ['Text'], |
|
83 | - 'disambiguatingDescription' => ['Text'], |
|
84 | - 'endTime' => ['DateTime', 'Time'], |
|
85 | - 'error' => ['Thing'], |
|
86 | - 'event' => ['Event'], |
|
87 | - 'identifier' => ['PropertyValue', 'URL', 'Text'], |
|
88 | - 'image' => ['URL', 'ImageObject'], |
|
89 | - 'instrument' => ['Thing'], |
|
90 | - 'location' => ['Place', 'Text', 'VirtualLocation', 'PostalAddress'], |
|
91 | - 'mainEntityOfPage' => ['URL', 'CreativeWork'], |
|
92 | - 'name' => ['Text'], |
|
93 | - 'object' => ['Thing'], |
|
94 | - 'participant' => ['Organization', 'Person'], |
|
95 | - 'potentialAction' => ['Action'], |
|
96 | - 'provider' => ['Organization', 'Person'], |
|
97 | - 'result' => ['Thing'], |
|
98 | - 'sameAs' => ['URL'], |
|
99 | - 'startTime' => ['Time', 'DateTime'], |
|
100 | - 'subjectOf' => ['Event', 'CreativeWork'], |
|
101 | - 'target' => ['URL', 'EntryPoint'], |
|
102 | - 'url' => ['URL'] |
|
103 | - ]; |
|
104 | - } |
|
105 | - |
|
106 | - |
|
107 | - /** |
|
108 | - * @inheritdoc |
|
109 | - */ |
|
110 | - public function getSchemaPropertyDescriptions(): array |
|
111 | - { |
|
112 | - return [ |
|
113 | - 'actionStatus' => 'Indicates the current disposition of the Action.', |
|
114 | - 'additionalType' => 'An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the \'typeof\' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally.', |
|
115 | - 'agent' => 'The direct performer or driver of the action (animate or inanimate). E.g. *John* wrote a book.', |
|
116 | - 'alternateName' => 'An alias for the item.', |
|
117 | - 'description' => 'A description of the item.', |
|
118 | - 'disambiguatingDescription' => 'A sub property of description. A short description of the item used to disambiguate from other, similar items. Information from other properties (in particular, name) may be necessary for the description to be useful for disambiguation.', |
|
119 | - 'endTime' => 'The endTime of something. For a reserved event or service (e.g. FoodEstablishmentReservation), the time that it is expected to end. For actions that span a period of time, when the action was performed. E.g. John wrote a book from January to *December*. For media, including audio and video, it\'s the time offset of the end of a clip within a larger file. Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions.', |
|
120 | - 'error' => 'For failed actions, more information on the cause of the failure.', |
|
121 | - 'event' => 'Upcoming or past event associated with this place, organization, or action.', |
|
122 | - 'identifier' => 'The identifier property represents any kind of identifier for any kind of [[Thing]], such as ISBNs, GTIN codes, UUIDs etc. Schema.org provides dedicated properties for representing many of these, either as textual strings or as URL (URI) links. See [background notes](/docs/datamodel.html#identifierBg) for more details. ', |
|
123 | - 'image' => 'An image of the item. This can be a [[URL]] or a fully described [[ImageObject]].', |
|
124 | - 'instrument' => 'The object that helped the agent perform the action. E.g. John wrote a book with *a pen*.', |
|
125 | - 'location' => 'The location of, for example, where an event is happening, where an organization is located, or where an action takes place.', |
|
126 | - 'mainEntityOfPage' => 'Indicates a page (or other CreativeWork) for which this thing is the main entity being described. See [background notes](/docs/datamodel.html#mainEntityBackground) for details.', |
|
127 | - 'name' => 'The name of the item.', |
|
128 | - 'object' => 'The object upon which the action is carried out, whose state is kept intact or changed. Also known as the semantic roles patient, affected or undergoer (which change their state) or theme (which doesn\'t). E.g. John read *a book*.', |
|
129 | - 'participant' => 'Other co-agents that participated in the action indirectly. E.g. John wrote a book with *Steve*.', |
|
130 | - 'potentialAction' => 'Indicates a potential Action, which describes an idealized action in which this thing would play an \'object\' role.', |
|
131 | - 'provider' => 'The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller.', |
|
132 | - 'result' => 'The result produced in the action. E.g. John wrote *a book*.', |
|
133 | - 'sameAs' => 'URL of a reference Web page that unambiguously indicates the item\'s identity. E.g. the URL of the item\'s Wikipedia page, Wikidata entry, or official website.', |
|
134 | - 'startTime' => 'The startTime of something. For a reserved event or service (e.g. FoodEstablishmentReservation), the time that it is expected to start. For actions that span a period of time, when the action was performed. E.g. John wrote a book from *January* to December. For media, including audio and video, it\'s the time offset of the start of a clip within a larger file. Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions.', |
|
135 | - 'subjectOf' => 'A CreativeWork or Event about this Thing.', |
|
136 | - 'target' => 'Indicates a target EntryPoint, or url, for an Action.', |
|
137 | - 'url' => 'URL of the item.' |
|
138 | - ]; |
|
139 | - } |
|
140 | - |
|
141 | - |
|
142 | - /** |
|
143 | - * @inheritdoc |
|
144 | - */ |
|
145 | - public function getGoogleRequiredSchema(): array |
|
146 | - { |
|
147 | - return ['description', 'name']; |
|
148 | - } |
|
149 | - |
|
150 | - |
|
151 | - /** |
|
152 | - * @inheritdoc |
|
153 | - */ |
|
154 | - public function getGoogleRecommendedSchema(): array |
|
155 | - { |
|
156 | - return ['image', 'url']; |
|
157 | - } |
|
158 | - |
|
159 | - |
|
160 | - /** |
|
161 | - * @inheritdoc |
|
162 | - */ |
|
163 | - public function defineRules(): array |
|
164 | - { |
|
165 | - $rules = parent::defineRules(); |
|
166 | - $rules = array_merge($rules, [ |
|
167 | - [$this->getSchemaPropertyNames(), 'validateJsonSchema'], |
|
168 | - [$this->getGoogleRequiredSchema(), 'required', 'on' => ['google'], 'message' => 'This property is required by Google.'], |
|
169 | - [$this->getGoogleRecommendedSchema(), 'required', 'on' => ['google'], 'message' => 'This property is recommended by Google.'] |
|
170 | - ]); |
|
171 | - |
|
172 | - return $rules; |
|
173 | - } |
|
29 | + use LeaveActionTrait; |
|
30 | + use InteractActionTrait; |
|
31 | + use ActionTrait; |
|
32 | + use ThingTrait; |
|
33 | + |
|
34 | + /** |
|
35 | + * The Schema.org Type Name |
|
36 | + * |
|
37 | + * @var string |
|
38 | + */ |
|
39 | + public static $schemaTypeName = 'LeaveAction'; |
|
40 | + |
|
41 | + /** |
|
42 | + * The Schema.org Type Scope |
|
43 | + * |
|
44 | + * @var string |
|
45 | + */ |
|
46 | + public static $schemaTypeScope = 'https://schema.org/LeaveAction'; |
|
47 | + |
|
48 | + /** |
|
49 | + * The Schema.org Type Extends |
|
50 | + * |
|
51 | + * @var string |
|
52 | + */ |
|
53 | + public static $schemaTypeExtends = 'InteractAction'; |
|
54 | + |
|
55 | + /** |
|
56 | + * The Schema.org Type Description |
|
57 | + * |
|
58 | + * @var string |
|
59 | + */ |
|
60 | + public static $schemaTypeDescription = 'An agent leaves an event / group with participants/friends at a location.\n\nRelated actions:\n\n* [[JoinAction]]: The antonym of LeaveAction.\n* [[UnRegisterAction]]: Unlike UnRegisterAction, LeaveAction implies leaving a group/team of people rather than a service.'; |
|
61 | + |
|
62 | + |
|
63 | + /** |
|
64 | + * @inheritdoc |
|
65 | + */ |
|
66 | + public function getSchemaPropertyNames(): array |
|
67 | + { |
|
68 | + return array_keys($this->getSchemaPropertyExpectedTypes()); |
|
69 | + } |
|
70 | + |
|
71 | + |
|
72 | + /** |
|
73 | + * @inheritdoc |
|
74 | + */ |
|
75 | + public function getSchemaPropertyExpectedTypes(): array |
|
76 | + { |
|
77 | + return [ |
|
78 | + 'actionStatus' => ['ActionStatusType'], |
|
79 | + 'additionalType' => ['URL'], |
|
80 | + 'agent' => ['Organization', 'Person'], |
|
81 | + 'alternateName' => ['Text'], |
|
82 | + 'description' => ['Text'], |
|
83 | + 'disambiguatingDescription' => ['Text'], |
|
84 | + 'endTime' => ['DateTime', 'Time'], |
|
85 | + 'error' => ['Thing'], |
|
86 | + 'event' => ['Event'], |
|
87 | + 'identifier' => ['PropertyValue', 'URL', 'Text'], |
|
88 | + 'image' => ['URL', 'ImageObject'], |
|
89 | + 'instrument' => ['Thing'], |
|
90 | + 'location' => ['Place', 'Text', 'VirtualLocation', 'PostalAddress'], |
|
91 | + 'mainEntityOfPage' => ['URL', 'CreativeWork'], |
|
92 | + 'name' => ['Text'], |
|
93 | + 'object' => ['Thing'], |
|
94 | + 'participant' => ['Organization', 'Person'], |
|
95 | + 'potentialAction' => ['Action'], |
|
96 | + 'provider' => ['Organization', 'Person'], |
|
97 | + 'result' => ['Thing'], |
|
98 | + 'sameAs' => ['URL'], |
|
99 | + 'startTime' => ['Time', 'DateTime'], |
|
100 | + 'subjectOf' => ['Event', 'CreativeWork'], |
|
101 | + 'target' => ['URL', 'EntryPoint'], |
|
102 | + 'url' => ['URL'] |
|
103 | + ]; |
|
104 | + } |
|
105 | + |
|
106 | + |
|
107 | + /** |
|
108 | + * @inheritdoc |
|
109 | + */ |
|
110 | + public function getSchemaPropertyDescriptions(): array |
|
111 | + { |
|
112 | + return [ |
|
113 | + 'actionStatus' => 'Indicates the current disposition of the Action.', |
|
114 | + 'additionalType' => 'An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the \'typeof\' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally.', |
|
115 | + 'agent' => 'The direct performer or driver of the action (animate or inanimate). E.g. *John* wrote a book.', |
|
116 | + 'alternateName' => 'An alias for the item.', |
|
117 | + 'description' => 'A description of the item.', |
|
118 | + 'disambiguatingDescription' => 'A sub property of description. A short description of the item used to disambiguate from other, similar items. Information from other properties (in particular, name) may be necessary for the description to be useful for disambiguation.', |
|
119 | + 'endTime' => 'The endTime of something. For a reserved event or service (e.g. FoodEstablishmentReservation), the time that it is expected to end. For actions that span a period of time, when the action was performed. E.g. John wrote a book from January to *December*. For media, including audio and video, it\'s the time offset of the end of a clip within a larger file. Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions.', |
|
120 | + 'error' => 'For failed actions, more information on the cause of the failure.', |
|
121 | + 'event' => 'Upcoming or past event associated with this place, organization, or action.', |
|
122 | + 'identifier' => 'The identifier property represents any kind of identifier for any kind of [[Thing]], such as ISBNs, GTIN codes, UUIDs etc. Schema.org provides dedicated properties for representing many of these, either as textual strings or as URL (URI) links. See [background notes](/docs/datamodel.html#identifierBg) for more details. ', |
|
123 | + 'image' => 'An image of the item. This can be a [[URL]] or a fully described [[ImageObject]].', |
|
124 | + 'instrument' => 'The object that helped the agent perform the action. E.g. John wrote a book with *a pen*.', |
|
125 | + 'location' => 'The location of, for example, where an event is happening, where an organization is located, or where an action takes place.', |
|
126 | + 'mainEntityOfPage' => 'Indicates a page (or other CreativeWork) for which this thing is the main entity being described. See [background notes](/docs/datamodel.html#mainEntityBackground) for details.', |
|
127 | + 'name' => 'The name of the item.', |
|
128 | + 'object' => 'The object upon which the action is carried out, whose state is kept intact or changed. Also known as the semantic roles patient, affected or undergoer (which change their state) or theme (which doesn\'t). E.g. John read *a book*.', |
|
129 | + 'participant' => 'Other co-agents that participated in the action indirectly. E.g. John wrote a book with *Steve*.', |
|
130 | + 'potentialAction' => 'Indicates a potential Action, which describes an idealized action in which this thing would play an \'object\' role.', |
|
131 | + 'provider' => 'The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller.', |
|
132 | + 'result' => 'The result produced in the action. E.g. John wrote *a book*.', |
|
133 | + 'sameAs' => 'URL of a reference Web page that unambiguously indicates the item\'s identity. E.g. the URL of the item\'s Wikipedia page, Wikidata entry, or official website.', |
|
134 | + 'startTime' => 'The startTime of something. For a reserved event or service (e.g. FoodEstablishmentReservation), the time that it is expected to start. For actions that span a period of time, when the action was performed. E.g. John wrote a book from *January* to December. For media, including audio and video, it\'s the time offset of the start of a clip within a larger file. Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions.', |
|
135 | + 'subjectOf' => 'A CreativeWork or Event about this Thing.', |
|
136 | + 'target' => 'Indicates a target EntryPoint, or url, for an Action.', |
|
137 | + 'url' => 'URL of the item.' |
|
138 | + ]; |
|
139 | + } |
|
140 | + |
|
141 | + |
|
142 | + /** |
|
143 | + * @inheritdoc |
|
144 | + */ |
|
145 | + public function getGoogleRequiredSchema(): array |
|
146 | + { |
|
147 | + return ['description', 'name']; |
|
148 | + } |
|
149 | + |
|
150 | + |
|
151 | + /** |
|
152 | + * @inheritdoc |
|
153 | + */ |
|
154 | + public function getGoogleRecommendedSchema(): array |
|
155 | + { |
|
156 | + return ['image', 'url']; |
|
157 | + } |
|
158 | + |
|
159 | + |
|
160 | + /** |
|
161 | + * @inheritdoc |
|
162 | + */ |
|
163 | + public function defineRules(): array |
|
164 | + { |
|
165 | + $rules = parent::defineRules(); |
|
166 | + $rules = array_merge($rules, [ |
|
167 | + [$this->getSchemaPropertyNames(), 'validateJsonSchema'], |
|
168 | + [$this->getGoogleRequiredSchema(), 'required', 'on' => ['google'], 'message' => 'This property is required by Google.'], |
|
169 | + [$this->getGoogleRecommendedSchema(), 'required', 'on' => ['google'], 'message' => 'This property is recommended by Google.'] |
|
170 | + ]); |
|
171 | + |
|
172 | + return $rules; |
|
173 | + } |
|
174 | 174 | } |
@@ -24,128 +24,128 @@ |
||
24 | 24 | */ |
25 | 25 | class Genetic extends MetaJsonLd implements GeneticInterface, MedicalSpecialtyInterface, SpecialtyInterface, EnumerationInterface, IntangibleInterface, ThingInterface, MedicalEnumerationInterface |
26 | 26 | { |
27 | - use GeneticTrait; |
|
28 | - use MedicalSpecialtyTrait; |
|
29 | - use SpecialtyTrait; |
|
30 | - use EnumerationTrait; |
|
31 | - use IntangibleTrait; |
|
32 | - use ThingTrait; |
|
33 | - use MedicalEnumerationTrait; |
|
34 | - |
|
35 | - /** |
|
36 | - * The Schema.org Type Name |
|
37 | - * |
|
38 | - * @var string |
|
39 | - */ |
|
40 | - public static $schemaTypeName = 'Genetic'; |
|
41 | - |
|
42 | - /** |
|
43 | - * The Schema.org Type Scope |
|
44 | - * |
|
45 | - * @var string |
|
46 | - */ |
|
47 | - public static $schemaTypeScope = 'https://schema.org/Genetic'; |
|
48 | - |
|
49 | - /** |
|
50 | - * The Schema.org Type Extends |
|
51 | - * |
|
52 | - * @var string |
|
53 | - */ |
|
54 | - public static $schemaTypeExtends = 'MedicalSpecialty'; |
|
55 | - |
|
56 | - /** |
|
57 | - * The Schema.org Type Description |
|
58 | - * |
|
59 | - * @var string |
|
60 | - */ |
|
61 | - public static $schemaTypeDescription = 'A specific branch of medical science that pertains to hereditary transmission and the variation of inherited characteristics and disorders.'; |
|
62 | - |
|
63 | - |
|
64 | - /** |
|
65 | - * @inheritdoc |
|
66 | - */ |
|
67 | - public function getSchemaPropertyNames(): array |
|
68 | - { |
|
69 | - return array_keys($this->getSchemaPropertyExpectedTypes()); |
|
70 | - } |
|
71 | - |
|
72 | - |
|
73 | - /** |
|
74 | - * @inheritdoc |
|
75 | - */ |
|
76 | - public function getSchemaPropertyExpectedTypes(): array |
|
77 | - { |
|
78 | - return [ |
|
79 | - 'additionalType' => ['URL'], |
|
80 | - 'alternateName' => ['Text'], |
|
81 | - 'description' => ['Text'], |
|
82 | - 'disambiguatingDescription' => ['Text'], |
|
83 | - 'identifier' => ['PropertyValue', 'URL', 'Text'], |
|
84 | - 'image' => ['URL', 'ImageObject'], |
|
85 | - 'mainEntityOfPage' => ['URL', 'CreativeWork'], |
|
86 | - 'name' => ['Text'], |
|
87 | - 'potentialAction' => ['Action'], |
|
88 | - 'sameAs' => ['URL'], |
|
89 | - 'subjectOf' => ['Event', 'CreativeWork'], |
|
90 | - 'supersededBy' => ['Class', 'Property', 'Enumeration'], |
|
91 | - 'url' => ['URL'] |
|
92 | - ]; |
|
93 | - } |
|
94 | - |
|
95 | - |
|
96 | - /** |
|
97 | - * @inheritdoc |
|
98 | - */ |
|
99 | - public function getSchemaPropertyDescriptions(): array |
|
100 | - { |
|
101 | - return [ |
|
102 | - 'additionalType' => 'An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the \'typeof\' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally.', |
|
103 | - 'alternateName' => 'An alias for the item.', |
|
104 | - 'description' => 'A description of the item.', |
|
105 | - 'disambiguatingDescription' => 'A sub property of description. A short description of the item used to disambiguate from other, similar items. Information from other properties (in particular, name) may be necessary for the description to be useful for disambiguation.', |
|
106 | - 'identifier' => 'The identifier property represents any kind of identifier for any kind of [[Thing]], such as ISBNs, GTIN codes, UUIDs etc. Schema.org provides dedicated properties for representing many of these, either as textual strings or as URL (URI) links. See [background notes](/docs/datamodel.html#identifierBg) for more details. ', |
|
107 | - 'image' => 'An image of the item. This can be a [[URL]] or a fully described [[ImageObject]].', |
|
108 | - 'mainEntityOfPage' => 'Indicates a page (or other CreativeWork) for which this thing is the main entity being described. See [background notes](/docs/datamodel.html#mainEntityBackground) for details.', |
|
109 | - 'name' => 'The name of the item.', |
|
110 | - 'potentialAction' => 'Indicates a potential Action, which describes an idealized action in which this thing would play an \'object\' role.', |
|
111 | - 'sameAs' => 'URL of a reference Web page that unambiguously indicates the item\'s identity. E.g. the URL of the item\'s Wikipedia page, Wikidata entry, or official website.', |
|
112 | - 'subjectOf' => 'A CreativeWork or Event about this Thing.', |
|
113 | - 'supersededBy' => 'Relates a term (i.e. a property, class or enumeration) to one that supersedes it.', |
|
114 | - 'url' => 'URL of the item.' |
|
115 | - ]; |
|
116 | - } |
|
117 | - |
|
118 | - |
|
119 | - /** |
|
120 | - * @inheritdoc |
|
121 | - */ |
|
122 | - public function getGoogleRequiredSchema(): array |
|
123 | - { |
|
124 | - return ['description', 'name']; |
|
125 | - } |
|
126 | - |
|
127 | - |
|
128 | - /** |
|
129 | - * @inheritdoc |
|
130 | - */ |
|
131 | - public function getGoogleRecommendedSchema(): array |
|
132 | - { |
|
133 | - return ['image', 'url']; |
|
134 | - } |
|
135 | - |
|
136 | - |
|
137 | - /** |
|
138 | - * @inheritdoc |
|
139 | - */ |
|
140 | - public function defineRules(): array |
|
141 | - { |
|
142 | - $rules = parent::defineRules(); |
|
143 | - $rules = array_merge($rules, [ |
|
144 | - [$this->getSchemaPropertyNames(), 'validateJsonSchema'], |
|
145 | - [$this->getGoogleRequiredSchema(), 'required', 'on' => ['google'], 'message' => 'This property is required by Google.'], |
|
146 | - [$this->getGoogleRecommendedSchema(), 'required', 'on' => ['google'], 'message' => 'This property is recommended by Google.'] |
|
147 | - ]); |
|
148 | - |
|
149 | - return $rules; |
|
150 | - } |
|
27 | + use GeneticTrait; |
|
28 | + use MedicalSpecialtyTrait; |
|
29 | + use SpecialtyTrait; |
|
30 | + use EnumerationTrait; |
|
31 | + use IntangibleTrait; |
|
32 | + use ThingTrait; |
|
33 | + use MedicalEnumerationTrait; |
|
34 | + |
|
35 | + /** |
|
36 | + * The Schema.org Type Name |
|
37 | + * |
|
38 | + * @var string |
|
39 | + */ |
|
40 | + public static $schemaTypeName = 'Genetic'; |
|
41 | + |
|
42 | + /** |
|
43 | + * The Schema.org Type Scope |
|
44 | + * |
|
45 | + * @var string |
|
46 | + */ |
|
47 | + public static $schemaTypeScope = 'https://schema.org/Genetic'; |
|
48 | + |
|
49 | + /** |
|
50 | + * The Schema.org Type Extends |
|
51 | + * |
|
52 | + * @var string |
|
53 | + */ |
|
54 | + public static $schemaTypeExtends = 'MedicalSpecialty'; |
|
55 | + |
|
56 | + /** |
|
57 | + * The Schema.org Type Description |
|
58 | + * |
|
59 | + * @var string |
|
60 | + */ |
|
61 | + public static $schemaTypeDescription = 'A specific branch of medical science that pertains to hereditary transmission and the variation of inherited characteristics and disorders.'; |
|
62 | + |
|
63 | + |
|
64 | + /** |
|
65 | + * @inheritdoc |
|
66 | + */ |
|
67 | + public function getSchemaPropertyNames(): array |
|
68 | + { |
|
69 | + return array_keys($this->getSchemaPropertyExpectedTypes()); |
|
70 | + } |
|
71 | + |
|
72 | + |
|
73 | + /** |
|
74 | + * @inheritdoc |
|
75 | + */ |
|
76 | + public function getSchemaPropertyExpectedTypes(): array |
|
77 | + { |
|
78 | + return [ |
|
79 | + 'additionalType' => ['URL'], |
|
80 | + 'alternateName' => ['Text'], |
|
81 | + 'description' => ['Text'], |
|
82 | + 'disambiguatingDescription' => ['Text'], |
|
83 | + 'identifier' => ['PropertyValue', 'URL', 'Text'], |
|
84 | + 'image' => ['URL', 'ImageObject'], |
|
85 | + 'mainEntityOfPage' => ['URL', 'CreativeWork'], |
|
86 | + 'name' => ['Text'], |
|
87 | + 'potentialAction' => ['Action'], |
|
88 | + 'sameAs' => ['URL'], |
|
89 | + 'subjectOf' => ['Event', 'CreativeWork'], |
|
90 | + 'supersededBy' => ['Class', 'Property', 'Enumeration'], |
|
91 | + 'url' => ['URL'] |
|
92 | + ]; |
|
93 | + } |
|
94 | + |
|
95 | + |
|
96 | + /** |
|
97 | + * @inheritdoc |
|
98 | + */ |
|
99 | + public function getSchemaPropertyDescriptions(): array |
|
100 | + { |
|
101 | + return [ |
|
102 | + 'additionalType' => 'An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the \'typeof\' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally.', |
|
103 | + 'alternateName' => 'An alias for the item.', |
|
104 | + 'description' => 'A description of the item.', |
|
105 | + 'disambiguatingDescription' => 'A sub property of description. A short description of the item used to disambiguate from other, similar items. Information from other properties (in particular, name) may be necessary for the description to be useful for disambiguation.', |
|
106 | + 'identifier' => 'The identifier property represents any kind of identifier for any kind of [[Thing]], such as ISBNs, GTIN codes, UUIDs etc. Schema.org provides dedicated properties for representing many of these, either as textual strings or as URL (URI) links. See [background notes](/docs/datamodel.html#identifierBg) for more details. ', |
|
107 | + 'image' => 'An image of the item. This can be a [[URL]] or a fully described [[ImageObject]].', |
|
108 | + 'mainEntityOfPage' => 'Indicates a page (or other CreativeWork) for which this thing is the main entity being described. See [background notes](/docs/datamodel.html#mainEntityBackground) for details.', |
|
109 | + 'name' => 'The name of the item.', |
|
110 | + 'potentialAction' => 'Indicates a potential Action, which describes an idealized action in which this thing would play an \'object\' role.', |
|
111 | + 'sameAs' => 'URL of a reference Web page that unambiguously indicates the item\'s identity. E.g. the URL of the item\'s Wikipedia page, Wikidata entry, or official website.', |
|
112 | + 'subjectOf' => 'A CreativeWork or Event about this Thing.', |
|
113 | + 'supersededBy' => 'Relates a term (i.e. a property, class or enumeration) to one that supersedes it.', |
|
114 | + 'url' => 'URL of the item.' |
|
115 | + ]; |
|
116 | + } |
|
117 | + |
|
118 | + |
|
119 | + /** |
|
120 | + * @inheritdoc |
|
121 | + */ |
|
122 | + public function getGoogleRequiredSchema(): array |
|
123 | + { |
|
124 | + return ['description', 'name']; |
|
125 | + } |
|
126 | + |
|
127 | + |
|
128 | + /** |
|
129 | + * @inheritdoc |
|
130 | + */ |
|
131 | + public function getGoogleRecommendedSchema(): array |
|
132 | + { |
|
133 | + return ['image', 'url']; |
|
134 | + } |
|
135 | + |
|
136 | + |
|
137 | + /** |
|
138 | + * @inheritdoc |
|
139 | + */ |
|
140 | + public function defineRules(): array |
|
141 | + { |
|
142 | + $rules = parent::defineRules(); |
|
143 | + $rules = array_merge($rules, [ |
|
144 | + [$this->getSchemaPropertyNames(), 'validateJsonSchema'], |
|
145 | + [$this->getGoogleRequiredSchema(), 'required', 'on' => ['google'], 'message' => 'This property is required by Google.'], |
|
146 | + [$this->getGoogleRecommendedSchema(), 'required', 'on' => ['google'], 'message' => 'This property is recommended by Google.'] |
|
147 | + ]); |
|
148 | + |
|
149 | + return $rules; |
|
150 | + } |
|
151 | 151 | } |
@@ -24,127 +24,127 @@ |
||
24 | 24 | */ |
25 | 25 | class Nonprofit501c15 extends MetaJsonLd implements Nonprofit501c15Interface, USNonprofitTypeInterface, NonprofitTypeInterface, EnumerationInterface, IntangibleInterface, ThingInterface |
26 | 26 | { |
27 | - use Nonprofit501c15Trait; |
|
28 | - use USNonprofitTypeTrait; |
|
29 | - use NonprofitTypeTrait; |
|
30 | - use EnumerationTrait; |
|
31 | - use IntangibleTrait; |
|
32 | - use ThingTrait; |
|
33 | - |
|
34 | - /** |
|
35 | - * The Schema.org Type Name |
|
36 | - * |
|
37 | - * @var string |
|
38 | - */ |
|
39 | - public static $schemaTypeName = 'Nonprofit501c15'; |
|
40 | - |
|
41 | - /** |
|
42 | - * The Schema.org Type Scope |
|
43 | - * |
|
44 | - * @var string |
|
45 | - */ |
|
46 | - public static $schemaTypeScope = 'https://schema.org/Nonprofit501c15'; |
|
47 | - |
|
48 | - /** |
|
49 | - * The Schema.org Type Extends |
|
50 | - * |
|
51 | - * @var string |
|
52 | - */ |
|
53 | - public static $schemaTypeExtends = 'USNonprofitType'; |
|
54 | - |
|
55 | - /** |
|
56 | - * The Schema.org Type Description |
|
57 | - * |
|
58 | - * @var string |
|
59 | - */ |
|
60 | - public static $schemaTypeDescription = 'Nonprofit501c15: Non-profit type referring to Mutual Insurance Companies or Associations.'; |
|
61 | - |
|
62 | - |
|
63 | - /** |
|
64 | - * @inheritdoc |
|
65 | - */ |
|
66 | - public function getSchemaPropertyNames(): array |
|
67 | - { |
|
68 | - return array_keys($this->getSchemaPropertyExpectedTypes()); |
|
69 | - } |
|
70 | - |
|
71 | - |
|
72 | - /** |
|
73 | - * @inheritdoc |
|
74 | - */ |
|
75 | - public function getSchemaPropertyExpectedTypes(): array |
|
76 | - { |
|
77 | - return [ |
|
78 | - 'additionalType' => ['URL'], |
|
79 | - 'alternateName' => ['Text'], |
|
80 | - 'description' => ['Text'], |
|
81 | - 'disambiguatingDescription' => ['Text'], |
|
82 | - 'identifier' => ['PropertyValue', 'URL', 'Text'], |
|
83 | - 'image' => ['URL', 'ImageObject'], |
|
84 | - 'mainEntityOfPage' => ['URL', 'CreativeWork'], |
|
85 | - 'name' => ['Text'], |
|
86 | - 'potentialAction' => ['Action'], |
|
87 | - 'sameAs' => ['URL'], |
|
88 | - 'subjectOf' => ['Event', 'CreativeWork'], |
|
89 | - 'supersededBy' => ['Class', 'Property', 'Enumeration'], |
|
90 | - 'url' => ['URL'] |
|
91 | - ]; |
|
92 | - } |
|
93 | - |
|
94 | - |
|
95 | - /** |
|
96 | - * @inheritdoc |
|
97 | - */ |
|
98 | - public function getSchemaPropertyDescriptions(): array |
|
99 | - { |
|
100 | - return [ |
|
101 | - 'additionalType' => 'An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the \'typeof\' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally.', |
|
102 | - 'alternateName' => 'An alias for the item.', |
|
103 | - 'description' => 'A description of the item.', |
|
104 | - 'disambiguatingDescription' => 'A sub property of description. A short description of the item used to disambiguate from other, similar items. Information from other properties (in particular, name) may be necessary for the description to be useful for disambiguation.', |
|
105 | - 'identifier' => 'The identifier property represents any kind of identifier for any kind of [[Thing]], such as ISBNs, GTIN codes, UUIDs etc. Schema.org provides dedicated properties for representing many of these, either as textual strings or as URL (URI) links. See [background notes](/docs/datamodel.html#identifierBg) for more details. ', |
|
106 | - 'image' => 'An image of the item. This can be a [[URL]] or a fully described [[ImageObject]].', |
|
107 | - 'mainEntityOfPage' => 'Indicates a page (or other CreativeWork) for which this thing is the main entity being described. See [background notes](/docs/datamodel.html#mainEntityBackground) for details.', |
|
108 | - 'name' => 'The name of the item.', |
|
109 | - 'potentialAction' => 'Indicates a potential Action, which describes an idealized action in which this thing would play an \'object\' role.', |
|
110 | - 'sameAs' => 'URL of a reference Web page that unambiguously indicates the item\'s identity. E.g. the URL of the item\'s Wikipedia page, Wikidata entry, or official website.', |
|
111 | - 'subjectOf' => 'A CreativeWork or Event about this Thing.', |
|
112 | - 'supersededBy' => 'Relates a term (i.e. a property, class or enumeration) to one that supersedes it.', |
|
113 | - 'url' => 'URL of the item.' |
|
114 | - ]; |
|
115 | - } |
|
116 | - |
|
117 | - |
|
118 | - /** |
|
119 | - * @inheritdoc |
|
120 | - */ |
|
121 | - public function getGoogleRequiredSchema(): array |
|
122 | - { |
|
123 | - return ['description', 'name']; |
|
124 | - } |
|
125 | - |
|
126 | - |
|
127 | - /** |
|
128 | - * @inheritdoc |
|
129 | - */ |
|
130 | - public function getGoogleRecommendedSchema(): array |
|
131 | - { |
|
132 | - return ['image', 'url']; |
|
133 | - } |
|
134 | - |
|
135 | - |
|
136 | - /** |
|
137 | - * @inheritdoc |
|
138 | - */ |
|
139 | - public function defineRules(): array |
|
140 | - { |
|
141 | - $rules = parent::defineRules(); |
|
142 | - $rules = array_merge($rules, [ |
|
143 | - [$this->getSchemaPropertyNames(), 'validateJsonSchema'], |
|
144 | - [$this->getGoogleRequiredSchema(), 'required', 'on' => ['google'], 'message' => 'This property is required by Google.'], |
|
145 | - [$this->getGoogleRecommendedSchema(), 'required', 'on' => ['google'], 'message' => 'This property is recommended by Google.'] |
|
146 | - ]); |
|
147 | - |
|
148 | - return $rules; |
|
149 | - } |
|
27 | + use Nonprofit501c15Trait; |
|
28 | + use USNonprofitTypeTrait; |
|
29 | + use NonprofitTypeTrait; |
|
30 | + use EnumerationTrait; |
|
31 | + use IntangibleTrait; |
|
32 | + use ThingTrait; |
|
33 | + |
|
34 | + /** |
|
35 | + * The Schema.org Type Name |
|
36 | + * |
|
37 | + * @var string |
|
38 | + */ |
|
39 | + public static $schemaTypeName = 'Nonprofit501c15'; |
|
40 | + |
|
41 | + /** |
|
42 | + * The Schema.org Type Scope |
|
43 | + * |
|
44 | + * @var string |
|
45 | + */ |
|
46 | + public static $schemaTypeScope = 'https://schema.org/Nonprofit501c15'; |
|
47 | + |
|
48 | + /** |
|
49 | + * The Schema.org Type Extends |
|
50 | + * |
|
51 | + * @var string |
|
52 | + */ |
|
53 | + public static $schemaTypeExtends = 'USNonprofitType'; |
|
54 | + |
|
55 | + /** |
|
56 | + * The Schema.org Type Description |
|
57 | + * |
|
58 | + * @var string |
|
59 | + */ |
|
60 | + public static $schemaTypeDescription = 'Nonprofit501c15: Non-profit type referring to Mutual Insurance Companies or Associations.'; |
|
61 | + |
|
62 | + |
|
63 | + /** |
|
64 | + * @inheritdoc |
|
65 | + */ |
|
66 | + public function getSchemaPropertyNames(): array |
|
67 | + { |
|
68 | + return array_keys($this->getSchemaPropertyExpectedTypes()); |
|
69 | + } |
|
70 | + |
|
71 | + |
|
72 | + /** |
|
73 | + * @inheritdoc |
|
74 | + */ |
|
75 | + public function getSchemaPropertyExpectedTypes(): array |
|
76 | + { |
|
77 | + return [ |
|
78 | + 'additionalType' => ['URL'], |
|
79 | + 'alternateName' => ['Text'], |
|
80 | + 'description' => ['Text'], |
|
81 | + 'disambiguatingDescription' => ['Text'], |
|
82 | + 'identifier' => ['PropertyValue', 'URL', 'Text'], |
|
83 | + 'image' => ['URL', 'ImageObject'], |
|
84 | + 'mainEntityOfPage' => ['URL', 'CreativeWork'], |
|
85 | + 'name' => ['Text'], |
|
86 | + 'potentialAction' => ['Action'], |
|
87 | + 'sameAs' => ['URL'], |
|
88 | + 'subjectOf' => ['Event', 'CreativeWork'], |
|
89 | + 'supersededBy' => ['Class', 'Property', 'Enumeration'], |
|
90 | + 'url' => ['URL'] |
|
91 | + ]; |
|
92 | + } |
|
93 | + |
|
94 | + |
|
95 | + /** |
|
96 | + * @inheritdoc |
|
97 | + */ |
|
98 | + public function getSchemaPropertyDescriptions(): array |
|
99 | + { |
|
100 | + return [ |
|
101 | + 'additionalType' => 'An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the \'typeof\' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally.', |
|
102 | + 'alternateName' => 'An alias for the item.', |
|
103 | + 'description' => 'A description of the item.', |
|
104 | + 'disambiguatingDescription' => 'A sub property of description. A short description of the item used to disambiguate from other, similar items. Information from other properties (in particular, name) may be necessary for the description to be useful for disambiguation.', |
|
105 | + 'identifier' => 'The identifier property represents any kind of identifier for any kind of [[Thing]], such as ISBNs, GTIN codes, UUIDs etc. Schema.org provides dedicated properties for representing many of these, either as textual strings or as URL (URI) links. See [background notes](/docs/datamodel.html#identifierBg) for more details. ', |
|
106 | + 'image' => 'An image of the item. This can be a [[URL]] or a fully described [[ImageObject]].', |
|
107 | + 'mainEntityOfPage' => 'Indicates a page (or other CreativeWork) for which this thing is the main entity being described. See [background notes](/docs/datamodel.html#mainEntityBackground) for details.', |
|
108 | + 'name' => 'The name of the item.', |
|
109 | + 'potentialAction' => 'Indicates a potential Action, which describes an idealized action in which this thing would play an \'object\' role.', |
|
110 | + 'sameAs' => 'URL of a reference Web page that unambiguously indicates the item\'s identity. E.g. the URL of the item\'s Wikipedia page, Wikidata entry, or official website.', |
|
111 | + 'subjectOf' => 'A CreativeWork or Event about this Thing.', |
|
112 | + 'supersededBy' => 'Relates a term (i.e. a property, class or enumeration) to one that supersedes it.', |
|
113 | + 'url' => 'URL of the item.' |
|
114 | + ]; |
|
115 | + } |
|
116 | + |
|
117 | + |
|
118 | + /** |
|
119 | + * @inheritdoc |
|
120 | + */ |
|
121 | + public function getGoogleRequiredSchema(): array |
|
122 | + { |
|
123 | + return ['description', 'name']; |
|
124 | + } |
|
125 | + |
|
126 | + |
|
127 | + /** |
|
128 | + * @inheritdoc |
|
129 | + */ |
|
130 | + public function getGoogleRecommendedSchema(): array |
|
131 | + { |
|
132 | + return ['image', 'url']; |
|
133 | + } |
|
134 | + |
|
135 | + |
|
136 | + /** |
|
137 | + * @inheritdoc |
|
138 | + */ |
|
139 | + public function defineRules(): array |
|
140 | + { |
|
141 | + $rules = parent::defineRules(); |
|
142 | + $rules = array_merge($rules, [ |
|
143 | + [$this->getSchemaPropertyNames(), 'validateJsonSchema'], |
|
144 | + [$this->getGoogleRequiredSchema(), 'required', 'on' => ['google'], 'message' => 'This property is required by Google.'], |
|
145 | + [$this->getGoogleRecommendedSchema(), 'required', 'on' => ['google'], 'message' => 'This property is recommended by Google.'] |
|
146 | + ]); |
|
147 | + |
|
148 | + return $rules; |
|
149 | + } |
|
150 | 150 | } |
@@ -23,137 +23,137 @@ |
||
23 | 23 | */ |
24 | 24 | class QuantitativeValue extends MetaJsonLd implements QuantitativeValueInterface, StructuredValueInterface, IntangibleInterface, ThingInterface |
25 | 25 | { |
26 | - use QuantitativeValueTrait; |
|
27 | - use StructuredValueTrait; |
|
28 | - use IntangibleTrait; |
|
29 | - use ThingTrait; |
|
30 | - |
|
31 | - /** |
|
32 | - * The Schema.org Type Name |
|
33 | - * |
|
34 | - * @var string |
|
35 | - */ |
|
36 | - public static $schemaTypeName = 'QuantitativeValue'; |
|
37 | - |
|
38 | - /** |
|
39 | - * The Schema.org Type Scope |
|
40 | - * |
|
41 | - * @var string |
|
42 | - */ |
|
43 | - public static $schemaTypeScope = 'https://schema.org/QuantitativeValue'; |
|
44 | - |
|
45 | - /** |
|
46 | - * The Schema.org Type Extends |
|
47 | - * |
|
48 | - * @var string |
|
49 | - */ |
|
50 | - public static $schemaTypeExtends = 'StructuredValue'; |
|
51 | - |
|
52 | - /** |
|
53 | - * The Schema.org Type Description |
|
54 | - * |
|
55 | - * @var string |
|
56 | - */ |
|
57 | - public static $schemaTypeDescription = ' A point value or interval for product characteristics and other purposes.'; |
|
58 | - |
|
59 | - |
|
60 | - /** |
|
61 | - * @inheritdoc |
|
62 | - */ |
|
63 | - public function getSchemaPropertyNames(): array |
|
64 | - { |
|
65 | - return array_keys($this->getSchemaPropertyExpectedTypes()); |
|
66 | - } |
|
67 | - |
|
68 | - |
|
69 | - /** |
|
70 | - * @inheritdoc |
|
71 | - */ |
|
72 | - public function getSchemaPropertyExpectedTypes(): array |
|
73 | - { |
|
74 | - return [ |
|
75 | - 'additionalProperty' => ['PropertyValue'], |
|
76 | - 'additionalType' => ['URL'], |
|
77 | - 'alternateName' => ['Text'], |
|
78 | - 'description' => ['Text'], |
|
79 | - 'disambiguatingDescription' => ['Text'], |
|
80 | - 'identifier' => ['PropertyValue', 'URL', 'Text'], |
|
81 | - 'image' => ['URL', 'ImageObject'], |
|
82 | - 'mainEntityOfPage' => ['URL', 'CreativeWork'], |
|
83 | - 'maxValue' => ['Number'], |
|
84 | - 'minValue' => ['Number'], |
|
85 | - 'name' => ['Text'], |
|
86 | - 'potentialAction' => ['Action'], |
|
87 | - 'sameAs' => ['URL'], |
|
88 | - 'subjectOf' => ['Event', 'CreativeWork'], |
|
89 | - 'unitCode' => ['Text', 'URL'], |
|
90 | - 'unitText' => ['Text'], |
|
91 | - 'url' => ['URL'], |
|
92 | - 'value' => ['StructuredValue', 'Text', 'Boolean', 'Number'], |
|
93 | - 'valueReference' => ['Enumeration', 'QualitativeValue', 'DefinedTerm', 'StructuredValue', 'PropertyValue', 'Text', 'MeasurementTypeEnumeration', 'QuantitativeValue'] |
|
94 | - ]; |
|
95 | - } |
|
96 | - |
|
97 | - |
|
98 | - /** |
|
99 | - * @inheritdoc |
|
100 | - */ |
|
101 | - public function getSchemaPropertyDescriptions(): array |
|
102 | - { |
|
103 | - return [ |
|
104 | - 'additionalProperty' => 'A property-value pair representing an additional characteristic of the entity, e.g. a product feature or another characteristic for which there is no matching property in schema.org. Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. https://schema.org/width, https://schema.org/color, https://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. ', |
|
105 | - 'additionalType' => 'An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the \'typeof\' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally.', |
|
106 | - 'alternateName' => 'An alias for the item.', |
|
107 | - 'description' => 'A description of the item.', |
|
108 | - 'disambiguatingDescription' => 'A sub property of description. A short description of the item used to disambiguate from other, similar items. Information from other properties (in particular, name) may be necessary for the description to be useful for disambiguation.', |
|
109 | - 'identifier' => 'The identifier property represents any kind of identifier for any kind of [[Thing]], such as ISBNs, GTIN codes, UUIDs etc. Schema.org provides dedicated properties for representing many of these, either as textual strings or as URL (URI) links. See [background notes](/docs/datamodel.html#identifierBg) for more details. ', |
|
110 | - 'image' => 'An image of the item. This can be a [[URL]] or a fully described [[ImageObject]].', |
|
111 | - 'mainEntityOfPage' => 'Indicates a page (or other CreativeWork) for which this thing is the main entity being described. See [background notes](/docs/datamodel.html#mainEntityBackground) for details.', |
|
112 | - 'maxValue' => 'The upper value of some characteristic or property.', |
|
113 | - 'minValue' => 'The lower value of some characteristic or property.', |
|
114 | - 'name' => 'The name of the item.', |
|
115 | - 'potentialAction' => 'Indicates a potential Action, which describes an idealized action in which this thing would play an \'object\' role.', |
|
116 | - 'sameAs' => 'URL of a reference Web page that unambiguously indicates the item\'s identity. E.g. the URL of the item\'s Wikipedia page, Wikidata entry, or official website.', |
|
117 | - 'subjectOf' => 'A CreativeWork or Event about this Thing.', |
|
118 | - 'unitCode' => 'The unit of measurement given using the UN/CEFACT Common Code (3 characters) or a URL. Other codes than the UN/CEFACT Common Code may be used with a prefix followed by a colon.', |
|
119 | - 'unitText' => 'A string or text indicating the unit of measurement. Useful if you cannot provide a standard unit code for <a href=\'unitCode\'>unitCode</a>.', |
|
120 | - 'url' => 'URL of the item.', |
|
121 | - 'value' => 'The value of the quantitative value or property value node. * For [[QuantitativeValue]] and [[MonetaryAmount]], the recommended type for values is \'Number\'. * For [[PropertyValue]], it can be \'Text\', \'Number\', \'Boolean\', or \'StructuredValue\'. * Use values from 0123456789 (Unicode \'DIGIT ZERO\' (U+0030) to \'DIGIT NINE\' (U+0039)) rather than superficially similar Unicode symbols. * Use \'.\' (Unicode \'FULL STOP\' (U+002E)) rather than \',\' to indicate a decimal point. Avoid using these symbols as a readability separator.', |
|
122 | - 'valueReference' => 'A secondary value that provides additional information on the original value, e.g. a reference temperature or a type of measurement.' |
|
123 | - ]; |
|
124 | - } |
|
125 | - |
|
126 | - |
|
127 | - /** |
|
128 | - * @inheritdoc |
|
129 | - */ |
|
130 | - public function getGoogleRequiredSchema(): array |
|
131 | - { |
|
132 | - return ['description', 'name']; |
|
133 | - } |
|
134 | - |
|
135 | - |
|
136 | - /** |
|
137 | - * @inheritdoc |
|
138 | - */ |
|
139 | - public function getGoogleRecommendedSchema(): array |
|
140 | - { |
|
141 | - return ['image', 'url']; |
|
142 | - } |
|
143 | - |
|
144 | - |
|
145 | - /** |
|
146 | - * @inheritdoc |
|
147 | - */ |
|
148 | - public function defineRules(): array |
|
149 | - { |
|
150 | - $rules = parent::defineRules(); |
|
151 | - $rules = array_merge($rules, [ |
|
152 | - [$this->getSchemaPropertyNames(), 'validateJsonSchema'], |
|
153 | - [$this->getGoogleRequiredSchema(), 'required', 'on' => ['google'], 'message' => 'This property is required by Google.'], |
|
154 | - [$this->getGoogleRecommendedSchema(), 'required', 'on' => ['google'], 'message' => 'This property is recommended by Google.'] |
|
155 | - ]); |
|
156 | - |
|
157 | - return $rules; |
|
158 | - } |
|
26 | + use QuantitativeValueTrait; |
|
27 | + use StructuredValueTrait; |
|
28 | + use IntangibleTrait; |
|
29 | + use ThingTrait; |
|
30 | + |
|
31 | + /** |
|
32 | + * The Schema.org Type Name |
|
33 | + * |
|
34 | + * @var string |
|
35 | + */ |
|
36 | + public static $schemaTypeName = 'QuantitativeValue'; |
|
37 | + |
|
38 | + /** |
|
39 | + * The Schema.org Type Scope |
|
40 | + * |
|
41 | + * @var string |
|
42 | + */ |
|
43 | + public static $schemaTypeScope = 'https://schema.org/QuantitativeValue'; |
|
44 | + |
|
45 | + /** |
|
46 | + * The Schema.org Type Extends |
|
47 | + * |
|
48 | + * @var string |
|
49 | + */ |
|
50 | + public static $schemaTypeExtends = 'StructuredValue'; |
|
51 | + |
|
52 | + /** |
|
53 | + * The Schema.org Type Description |
|
54 | + * |
|
55 | + * @var string |
|
56 | + */ |
|
57 | + public static $schemaTypeDescription = ' A point value or interval for product characteristics and other purposes.'; |
|
58 | + |
|
59 | + |
|
60 | + /** |
|
61 | + * @inheritdoc |
|
62 | + */ |
|
63 | + public function getSchemaPropertyNames(): array |
|
64 | + { |
|
65 | + return array_keys($this->getSchemaPropertyExpectedTypes()); |
|
66 | + } |
|
67 | + |
|
68 | + |
|
69 | + /** |
|
70 | + * @inheritdoc |
|
71 | + */ |
|
72 | + public function getSchemaPropertyExpectedTypes(): array |
|
73 | + { |
|
74 | + return [ |
|
75 | + 'additionalProperty' => ['PropertyValue'], |
|
76 | + 'additionalType' => ['URL'], |
|
77 | + 'alternateName' => ['Text'], |
|
78 | + 'description' => ['Text'], |
|
79 | + 'disambiguatingDescription' => ['Text'], |
|
80 | + 'identifier' => ['PropertyValue', 'URL', 'Text'], |
|
81 | + 'image' => ['URL', 'ImageObject'], |
|
82 | + 'mainEntityOfPage' => ['URL', 'CreativeWork'], |
|
83 | + 'maxValue' => ['Number'], |
|
84 | + 'minValue' => ['Number'], |
|
85 | + 'name' => ['Text'], |
|
86 | + 'potentialAction' => ['Action'], |
|
87 | + 'sameAs' => ['URL'], |
|
88 | + 'subjectOf' => ['Event', 'CreativeWork'], |
|
89 | + 'unitCode' => ['Text', 'URL'], |
|
90 | + 'unitText' => ['Text'], |
|
91 | + 'url' => ['URL'], |
|
92 | + 'value' => ['StructuredValue', 'Text', 'Boolean', 'Number'], |
|
93 | + 'valueReference' => ['Enumeration', 'QualitativeValue', 'DefinedTerm', 'StructuredValue', 'PropertyValue', 'Text', 'MeasurementTypeEnumeration', 'QuantitativeValue'] |
|
94 | + ]; |
|
95 | + } |
|
96 | + |
|
97 | + |
|
98 | + /** |
|
99 | + * @inheritdoc |
|
100 | + */ |
|
101 | + public function getSchemaPropertyDescriptions(): array |
|
102 | + { |
|
103 | + return [ |
|
104 | + 'additionalProperty' => 'A property-value pair representing an additional characteristic of the entity, e.g. a product feature or another characteristic for which there is no matching property in schema.org. Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. https://schema.org/width, https://schema.org/color, https://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. ', |
|
105 | + 'additionalType' => 'An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the \'typeof\' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally.', |
|
106 | + 'alternateName' => 'An alias for the item.', |
|
107 | + 'description' => 'A description of the item.', |
|
108 | + 'disambiguatingDescription' => 'A sub property of description. A short description of the item used to disambiguate from other, similar items. Information from other properties (in particular, name) may be necessary for the description to be useful for disambiguation.', |
|
109 | + 'identifier' => 'The identifier property represents any kind of identifier for any kind of [[Thing]], such as ISBNs, GTIN codes, UUIDs etc. Schema.org provides dedicated properties for representing many of these, either as textual strings or as URL (URI) links. See [background notes](/docs/datamodel.html#identifierBg) for more details. ', |
|
110 | + 'image' => 'An image of the item. This can be a [[URL]] or a fully described [[ImageObject]].', |
|
111 | + 'mainEntityOfPage' => 'Indicates a page (or other CreativeWork) for which this thing is the main entity being described. See [background notes](/docs/datamodel.html#mainEntityBackground) for details.', |
|
112 | + 'maxValue' => 'The upper value of some characteristic or property.', |
|
113 | + 'minValue' => 'The lower value of some characteristic or property.', |
|
114 | + 'name' => 'The name of the item.', |
|
115 | + 'potentialAction' => 'Indicates a potential Action, which describes an idealized action in which this thing would play an \'object\' role.', |
|
116 | + 'sameAs' => 'URL of a reference Web page that unambiguously indicates the item\'s identity. E.g. the URL of the item\'s Wikipedia page, Wikidata entry, or official website.', |
|
117 | + 'subjectOf' => 'A CreativeWork or Event about this Thing.', |
|
118 | + 'unitCode' => 'The unit of measurement given using the UN/CEFACT Common Code (3 characters) or a URL. Other codes than the UN/CEFACT Common Code may be used with a prefix followed by a colon.', |
|
119 | + 'unitText' => 'A string or text indicating the unit of measurement. Useful if you cannot provide a standard unit code for <a href=\'unitCode\'>unitCode</a>.', |
|
120 | + 'url' => 'URL of the item.', |
|
121 | + 'value' => 'The value of the quantitative value or property value node. * For [[QuantitativeValue]] and [[MonetaryAmount]], the recommended type for values is \'Number\'. * For [[PropertyValue]], it can be \'Text\', \'Number\', \'Boolean\', or \'StructuredValue\'. * Use values from 0123456789 (Unicode \'DIGIT ZERO\' (U+0030) to \'DIGIT NINE\' (U+0039)) rather than superficially similar Unicode symbols. * Use \'.\' (Unicode \'FULL STOP\' (U+002E)) rather than \',\' to indicate a decimal point. Avoid using these symbols as a readability separator.', |
|
122 | + 'valueReference' => 'A secondary value that provides additional information on the original value, e.g. a reference temperature or a type of measurement.' |
|
123 | + ]; |
|
124 | + } |
|
125 | + |
|
126 | + |
|
127 | + /** |
|
128 | + * @inheritdoc |
|
129 | + */ |
|
130 | + public function getGoogleRequiredSchema(): array |
|
131 | + { |
|
132 | + return ['description', 'name']; |
|
133 | + } |
|
134 | + |
|
135 | + |
|
136 | + /** |
|
137 | + * @inheritdoc |
|
138 | + */ |
|
139 | + public function getGoogleRecommendedSchema(): array |
|
140 | + { |
|
141 | + return ['image', 'url']; |
|
142 | + } |
|
143 | + |
|
144 | + |
|
145 | + /** |
|
146 | + * @inheritdoc |
|
147 | + */ |
|
148 | + public function defineRules(): array |
|
149 | + { |
|
150 | + $rules = parent::defineRules(); |
|
151 | + $rules = array_merge($rules, [ |
|
152 | + [$this->getSchemaPropertyNames(), 'validateJsonSchema'], |
|
153 | + [$this->getGoogleRequiredSchema(), 'required', 'on' => ['google'], 'message' => 'This property is required by Google.'], |
|
154 | + [$this->getGoogleRecommendedSchema(), 'required', 'on' => ['google'], 'message' => 'This property is recommended by Google.'] |
|
155 | + ]); |
|
156 | + |
|
157 | + return $rules; |
|
158 | + } |
|
159 | 159 | } |
@@ -23,126 +23,126 @@ |
||
23 | 23 | */ |
24 | 24 | class RsvpResponseMaybe extends MetaJsonLd implements RsvpResponseMaybeInterface, RsvpResponseTypeInterface, EnumerationInterface, IntangibleInterface, ThingInterface |
25 | 25 | { |
26 | - use RsvpResponseMaybeTrait; |
|
27 | - use RsvpResponseTypeTrait; |
|
28 | - use EnumerationTrait; |
|
29 | - use IntangibleTrait; |
|
30 | - use ThingTrait; |
|
31 | - |
|
32 | - /** |
|
33 | - * The Schema.org Type Name |
|
34 | - * |
|
35 | - * @var string |
|
36 | - */ |
|
37 | - public static $schemaTypeName = 'RsvpResponseMaybe'; |
|
38 | - |
|
39 | - /** |
|
40 | - * The Schema.org Type Scope |
|
41 | - * |
|
42 | - * @var string |
|
43 | - */ |
|
44 | - public static $schemaTypeScope = 'https://schema.org/RsvpResponseMaybe'; |
|
45 | - |
|
46 | - /** |
|
47 | - * The Schema.org Type Extends |
|
48 | - * |
|
49 | - * @var string |
|
50 | - */ |
|
51 | - public static $schemaTypeExtends = 'RsvpResponseType'; |
|
52 | - |
|
53 | - /** |
|
54 | - * The Schema.org Type Description |
|
55 | - * |
|
56 | - * @var string |
|
57 | - */ |
|
58 | - public static $schemaTypeDescription = 'The invitee may or may not attend.'; |
|
59 | - |
|
60 | - |
|
61 | - /** |
|
62 | - * @inheritdoc |
|
63 | - */ |
|
64 | - public function getSchemaPropertyNames(): array |
|
65 | - { |
|
66 | - return array_keys($this->getSchemaPropertyExpectedTypes()); |
|
67 | - } |
|
68 | - |
|
69 | - |
|
70 | - /** |
|
71 | - * @inheritdoc |
|
72 | - */ |
|
73 | - public function getSchemaPropertyExpectedTypes(): array |
|
74 | - { |
|
75 | - return [ |
|
76 | - 'additionalType' => ['URL'], |
|
77 | - 'alternateName' => ['Text'], |
|
78 | - 'description' => ['Text'], |
|
79 | - 'disambiguatingDescription' => ['Text'], |
|
80 | - 'identifier' => ['PropertyValue', 'URL', 'Text'], |
|
81 | - 'image' => ['URL', 'ImageObject'], |
|
82 | - 'mainEntityOfPage' => ['URL', 'CreativeWork'], |
|
83 | - 'name' => ['Text'], |
|
84 | - 'potentialAction' => ['Action'], |
|
85 | - 'sameAs' => ['URL'], |
|
86 | - 'subjectOf' => ['Event', 'CreativeWork'], |
|
87 | - 'supersededBy' => ['Class', 'Property', 'Enumeration'], |
|
88 | - 'url' => ['URL'] |
|
89 | - ]; |
|
90 | - } |
|
91 | - |
|
92 | - |
|
93 | - /** |
|
94 | - * @inheritdoc |
|
95 | - */ |
|
96 | - public function getSchemaPropertyDescriptions(): array |
|
97 | - { |
|
98 | - return [ |
|
99 | - 'additionalType' => 'An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the \'typeof\' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally.', |
|
100 | - 'alternateName' => 'An alias for the item.', |
|
101 | - 'description' => 'A description of the item.', |
|
102 | - 'disambiguatingDescription' => 'A sub property of description. A short description of the item used to disambiguate from other, similar items. Information from other properties (in particular, name) may be necessary for the description to be useful for disambiguation.', |
|
103 | - 'identifier' => 'The identifier property represents any kind of identifier for any kind of [[Thing]], such as ISBNs, GTIN codes, UUIDs etc. Schema.org provides dedicated properties for representing many of these, either as textual strings or as URL (URI) links. See [background notes](/docs/datamodel.html#identifierBg) for more details. ', |
|
104 | - 'image' => 'An image of the item. This can be a [[URL]] or a fully described [[ImageObject]].', |
|
105 | - 'mainEntityOfPage' => 'Indicates a page (or other CreativeWork) for which this thing is the main entity being described. See [background notes](/docs/datamodel.html#mainEntityBackground) for details.', |
|
106 | - 'name' => 'The name of the item.', |
|
107 | - 'potentialAction' => 'Indicates a potential Action, which describes an idealized action in which this thing would play an \'object\' role.', |
|
108 | - 'sameAs' => 'URL of a reference Web page that unambiguously indicates the item\'s identity. E.g. the URL of the item\'s Wikipedia page, Wikidata entry, or official website.', |
|
109 | - 'subjectOf' => 'A CreativeWork or Event about this Thing.', |
|
110 | - 'supersededBy' => 'Relates a term (i.e. a property, class or enumeration) to one that supersedes it.', |
|
111 | - 'url' => 'URL of the item.' |
|
112 | - ]; |
|
113 | - } |
|
114 | - |
|
115 | - |
|
116 | - /** |
|
117 | - * @inheritdoc |
|
118 | - */ |
|
119 | - public function getGoogleRequiredSchema(): array |
|
120 | - { |
|
121 | - return ['description', 'name']; |
|
122 | - } |
|
123 | - |
|
124 | - |
|
125 | - /** |
|
126 | - * @inheritdoc |
|
127 | - */ |
|
128 | - public function getGoogleRecommendedSchema(): array |
|
129 | - { |
|
130 | - return ['image', 'url']; |
|
131 | - } |
|
132 | - |
|
133 | - |
|
134 | - /** |
|
135 | - * @inheritdoc |
|
136 | - */ |
|
137 | - public function defineRules(): array |
|
138 | - { |
|
139 | - $rules = parent::defineRules(); |
|
140 | - $rules = array_merge($rules, [ |
|
141 | - [$this->getSchemaPropertyNames(), 'validateJsonSchema'], |
|
142 | - [$this->getGoogleRequiredSchema(), 'required', 'on' => ['google'], 'message' => 'This property is required by Google.'], |
|
143 | - [$this->getGoogleRecommendedSchema(), 'required', 'on' => ['google'], 'message' => 'This property is recommended by Google.'] |
|
144 | - ]); |
|
145 | - |
|
146 | - return $rules; |
|
147 | - } |
|
26 | + use RsvpResponseMaybeTrait; |
|
27 | + use RsvpResponseTypeTrait; |
|
28 | + use EnumerationTrait; |
|
29 | + use IntangibleTrait; |
|
30 | + use ThingTrait; |
|
31 | + |
|
32 | + /** |
|
33 | + * The Schema.org Type Name |
|
34 | + * |
|
35 | + * @var string |
|
36 | + */ |
|
37 | + public static $schemaTypeName = 'RsvpResponseMaybe'; |
|
38 | + |
|
39 | + /** |
|
40 | + * The Schema.org Type Scope |
|
41 | + * |
|
42 | + * @var string |
|
43 | + */ |
|
44 | + public static $schemaTypeScope = 'https://schema.org/RsvpResponseMaybe'; |
|
45 | + |
|
46 | + /** |
|
47 | + * The Schema.org Type Extends |
|
48 | + * |
|
49 | + * @var string |
|
50 | + */ |
|
51 | + public static $schemaTypeExtends = 'RsvpResponseType'; |
|
52 | + |
|
53 | + /** |
|
54 | + * The Schema.org Type Description |
|
55 | + * |
|
56 | + * @var string |
|
57 | + */ |
|
58 | + public static $schemaTypeDescription = 'The invitee may or may not attend.'; |
|
59 | + |
|
60 | + |
|
61 | + /** |
|
62 | + * @inheritdoc |
|
63 | + */ |
|
64 | + public function getSchemaPropertyNames(): array |
|
65 | + { |
|
66 | + return array_keys($this->getSchemaPropertyExpectedTypes()); |
|
67 | + } |
|
68 | + |
|
69 | + |
|
70 | + /** |
|
71 | + * @inheritdoc |
|
72 | + */ |
|
73 | + public function getSchemaPropertyExpectedTypes(): array |
|
74 | + { |
|
75 | + return [ |
|
76 | + 'additionalType' => ['URL'], |
|
77 | + 'alternateName' => ['Text'], |
|
78 | + 'description' => ['Text'], |
|
79 | + 'disambiguatingDescription' => ['Text'], |
|
80 | + 'identifier' => ['PropertyValue', 'URL', 'Text'], |
|
81 | + 'image' => ['URL', 'ImageObject'], |
|
82 | + 'mainEntityOfPage' => ['URL', 'CreativeWork'], |
|
83 | + 'name' => ['Text'], |
|
84 | + 'potentialAction' => ['Action'], |
|
85 | + 'sameAs' => ['URL'], |
|
86 | + 'subjectOf' => ['Event', 'CreativeWork'], |
|
87 | + 'supersededBy' => ['Class', 'Property', 'Enumeration'], |
|
88 | + 'url' => ['URL'] |
|
89 | + ]; |
|
90 | + } |
|
91 | + |
|
92 | + |
|
93 | + /** |
|
94 | + * @inheritdoc |
|
95 | + */ |
|
96 | + public function getSchemaPropertyDescriptions(): array |
|
97 | + { |
|
98 | + return [ |
|
99 | + 'additionalType' => 'An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the \'typeof\' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally.', |
|
100 | + 'alternateName' => 'An alias for the item.', |
|
101 | + 'description' => 'A description of the item.', |
|
102 | + 'disambiguatingDescription' => 'A sub property of description. A short description of the item used to disambiguate from other, similar items. Information from other properties (in particular, name) may be necessary for the description to be useful for disambiguation.', |
|
103 | + 'identifier' => 'The identifier property represents any kind of identifier for any kind of [[Thing]], such as ISBNs, GTIN codes, UUIDs etc. Schema.org provides dedicated properties for representing many of these, either as textual strings or as URL (URI) links. See [background notes](/docs/datamodel.html#identifierBg) for more details. ', |
|
104 | + 'image' => 'An image of the item. This can be a [[URL]] or a fully described [[ImageObject]].', |
|
105 | + 'mainEntityOfPage' => 'Indicates a page (or other CreativeWork) for which this thing is the main entity being described. See [background notes](/docs/datamodel.html#mainEntityBackground) for details.', |
|
106 | + 'name' => 'The name of the item.', |
|
107 | + 'potentialAction' => 'Indicates a potential Action, which describes an idealized action in which this thing would play an \'object\' role.', |
|
108 | + 'sameAs' => 'URL of a reference Web page that unambiguously indicates the item\'s identity. E.g. the URL of the item\'s Wikipedia page, Wikidata entry, or official website.', |
|
109 | + 'subjectOf' => 'A CreativeWork or Event about this Thing.', |
|
110 | + 'supersededBy' => 'Relates a term (i.e. a property, class or enumeration) to one that supersedes it.', |
|
111 | + 'url' => 'URL of the item.' |
|
112 | + ]; |
|
113 | + } |
|
114 | + |
|
115 | + |
|
116 | + /** |
|
117 | + * @inheritdoc |
|
118 | + */ |
|
119 | + public function getGoogleRequiredSchema(): array |
|
120 | + { |
|
121 | + return ['description', 'name']; |
|
122 | + } |
|
123 | + |
|
124 | + |
|
125 | + /** |
|
126 | + * @inheritdoc |
|
127 | + */ |
|
128 | + public function getGoogleRecommendedSchema(): array |
|
129 | + { |
|
130 | + return ['image', 'url']; |
|
131 | + } |
|
132 | + |
|
133 | + |
|
134 | + /** |
|
135 | + * @inheritdoc |
|
136 | + */ |
|
137 | + public function defineRules(): array |
|
138 | + { |
|
139 | + $rules = parent::defineRules(); |
|
140 | + $rules = array_merge($rules, [ |
|
141 | + [$this->getSchemaPropertyNames(), 'validateJsonSchema'], |
|
142 | + [$this->getGoogleRequiredSchema(), 'required', 'on' => ['google'], 'message' => 'This property is required by Google.'], |
|
143 | + [$this->getGoogleRecommendedSchema(), 'required', 'on' => ['google'], 'message' => 'This property is recommended by Google.'] |
|
144 | + ]); |
|
145 | + |
|
146 | + return $rules; |
|
147 | + } |
|
148 | 148 | } |
@@ -23,215 +23,215 @@ |
||
23 | 23 | */ |
24 | 24 | class BusStation extends MetaJsonLd implements BusStationInterface, CivicStructureInterface, PlaceInterface, ThingInterface |
25 | 25 | { |
26 | - use BusStationTrait; |
|
27 | - use CivicStructureTrait; |
|
28 | - use PlaceTrait; |
|
29 | - use ThingTrait; |
|
30 | - |
|
31 | - /** |
|
32 | - * The Schema.org Type Name |
|
33 | - * |
|
34 | - * @var string |
|
35 | - */ |
|
36 | - public static $schemaTypeName = 'BusStation'; |
|
37 | - |
|
38 | - /** |
|
39 | - * The Schema.org Type Scope |
|
40 | - * |
|
41 | - * @var string |
|
42 | - */ |
|
43 | - public static $schemaTypeScope = 'https://schema.org/BusStation'; |
|
44 | - |
|
45 | - /** |
|
46 | - * The Schema.org Type Extends |
|
47 | - * |
|
48 | - * @var string |
|
49 | - */ |
|
50 | - public static $schemaTypeExtends = 'CivicStructure'; |
|
51 | - |
|
52 | - /** |
|
53 | - * The Schema.org Type Description |
|
54 | - * |
|
55 | - * @var string |
|
56 | - */ |
|
57 | - public static $schemaTypeDescription = 'A bus station.'; |
|
58 | - |
|
59 | - |
|
60 | - /** |
|
61 | - * @inheritdoc |
|
62 | - */ |
|
63 | - public function getSchemaPropertyNames(): array |
|
64 | - { |
|
65 | - return array_keys($this->getSchemaPropertyExpectedTypes()); |
|
66 | - } |
|
67 | - |
|
68 | - |
|
69 | - /** |
|
70 | - * @inheritdoc |
|
71 | - */ |
|
72 | - public function getSchemaPropertyExpectedTypes(): array |
|
73 | - { |
|
74 | - return [ |
|
75 | - 'additionalProperty' => ['PropertyValue'], |
|
76 | - 'additionalType' => ['URL'], |
|
77 | - 'address' => ['Text', 'PostalAddress'], |
|
78 | - 'aggregateRating' => ['AggregateRating'], |
|
79 | - 'alternateName' => ['Text'], |
|
80 | - 'amenityFeature' => ['LocationFeatureSpecification'], |
|
81 | - 'branchCode' => ['Text'], |
|
82 | - 'containedIn' => ['Place'], |
|
83 | - 'containedInPlace' => ['Place'], |
|
84 | - 'containsPlace' => ['Place'], |
|
85 | - 'description' => ['Text'], |
|
86 | - 'disambiguatingDescription' => ['Text'], |
|
87 | - 'event' => ['Event'], |
|
88 | - 'events' => ['Event'], |
|
89 | - 'faxNumber' => ['Text'], |
|
90 | - 'geo' => ['GeoCoordinates', 'GeoShape'], |
|
91 | - 'geoContains' => ['Place', 'GeospatialGeometry'], |
|
92 | - 'geoCoveredBy' => ['GeospatialGeometry', 'Place'], |
|
93 | - 'geoCovers' => ['GeospatialGeometry', 'Place'], |
|
94 | - 'geoCrosses' => ['GeospatialGeometry', 'Place'], |
|
95 | - 'geoDisjoint' => ['GeospatialGeometry', 'Place'], |
|
96 | - 'geoEquals' => ['GeospatialGeometry', 'Place'], |
|
97 | - 'geoIntersects' => ['GeospatialGeometry', 'Place'], |
|
98 | - 'geoOverlaps' => ['GeospatialGeometry', 'Place'], |
|
99 | - 'geoTouches' => ['GeospatialGeometry', 'Place'], |
|
100 | - 'geoWithin' => ['GeospatialGeometry', 'Place'], |
|
101 | - 'globalLocationNumber' => ['Text'], |
|
102 | - 'hasDriveThroughService' => ['Boolean'], |
|
103 | - 'hasMap' => ['URL', 'Map'], |
|
104 | - 'identifier' => ['PropertyValue', 'URL', 'Text'], |
|
105 | - 'image' => ['URL', 'ImageObject'], |
|
106 | - 'isAccessibleForFree' => ['Boolean'], |
|
107 | - 'isicV4' => ['Text'], |
|
108 | - 'keywords' => ['URL', 'DefinedTerm', 'Text'], |
|
109 | - 'latitude' => ['Number', 'Text'], |
|
110 | - 'logo' => ['ImageObject', 'URL'], |
|
111 | - 'longitude' => ['Text', 'Number'], |
|
112 | - 'mainEntityOfPage' => ['URL', 'CreativeWork'], |
|
113 | - 'map' => ['URL'], |
|
114 | - 'maps' => ['URL'], |
|
115 | - 'maximumAttendeeCapacity' => ['Integer'], |
|
116 | - 'name' => ['Text'], |
|
117 | - 'openingHours' => ['Text'], |
|
118 | - 'openingHoursSpecification' => ['OpeningHoursSpecification'], |
|
119 | - 'photo' => ['Photograph', 'ImageObject'], |
|
120 | - 'photos' => ['ImageObject', 'Photograph'], |
|
121 | - 'potentialAction' => ['Action'], |
|
122 | - 'publicAccess' => ['Boolean'], |
|
123 | - 'review' => ['Review'], |
|
124 | - 'reviews' => ['Review'], |
|
125 | - 'sameAs' => ['URL'], |
|
126 | - 'slogan' => ['Text'], |
|
127 | - 'smokingAllowed' => ['Boolean'], |
|
128 | - 'specialOpeningHoursSpecification' => ['OpeningHoursSpecification'], |
|
129 | - 'subjectOf' => ['Event', 'CreativeWork'], |
|
130 | - 'telephone' => ['Text'], |
|
131 | - 'tourBookingPage' => ['URL'], |
|
132 | - 'url' => ['URL'] |
|
133 | - ]; |
|
134 | - } |
|
135 | - |
|
136 | - |
|
137 | - /** |
|
138 | - * @inheritdoc |
|
139 | - */ |
|
140 | - public function getSchemaPropertyDescriptions(): array |
|
141 | - { |
|
142 | - return [ |
|
143 | - 'additionalProperty' => 'A property-value pair representing an additional characteristic of the entity, e.g. a product feature or another characteristic for which there is no matching property in schema.org. Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. https://schema.org/width, https://schema.org/color, https://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. ', |
|
144 | - 'additionalType' => 'An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the \'typeof\' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally.', |
|
145 | - 'address' => 'Physical address of the item.', |
|
146 | - 'aggregateRating' => 'The overall rating, based on a collection of reviews or ratings, of the item.', |
|
147 | - 'alternateName' => 'An alias for the item.', |
|
148 | - 'amenityFeature' => 'An amenity feature (e.g. a characteristic or service) of the Accommodation. This generic property does not make a statement about whether the feature is included in an offer for the main accommodation or available at extra costs.', |
|
149 | - 'branchCode' => 'A short textual code (also called "store code") that uniquely identifies a place of business. The code is typically assigned by the parentOrganization and used in structured URLs. For example, in the URL http://www.starbucks.co.uk/store-locator/etc/detail/3047 the code "3047" is a branchCode for a particular branch. ', |
|
150 | - 'containedIn' => 'The basic containment relation between a place and one that contains it.', |
|
151 | - 'containedInPlace' => 'The basic containment relation between a place and one that contains it.', |
|
152 | - 'containsPlace' => 'The basic containment relation between a place and another that it contains.', |
|
153 | - 'description' => 'A description of the item.', |
|
154 | - 'disambiguatingDescription' => 'A sub property of description. A short description of the item used to disambiguate from other, similar items. Information from other properties (in particular, name) may be necessary for the description to be useful for disambiguation.', |
|
155 | - 'event' => 'Upcoming or past event associated with this place, organization, or action.', |
|
156 | - 'events' => 'Upcoming or past events associated with this place or organization.', |
|
157 | - 'faxNumber' => 'The fax number.', |
|
158 | - 'geo' => 'The geo coordinates of the place.', |
|
159 | - 'geoContains' => 'Represents a relationship between two geometries (or the places they represent), relating a containing geometry to a contained geometry. "a contains b iff no points of b lie in the exterior of a, and at least one point of the interior of b lies in the interior of a". As defined in [DE-9IM](https://en.wikipedia.org/wiki/DE-9IM).', |
|
160 | - 'geoCoveredBy' => 'Represents a relationship between two geometries (or the places they represent), relating a geometry to another that covers it. As defined in [DE-9IM](https://en.wikipedia.org/wiki/DE-9IM).', |
|
161 | - 'geoCovers' => 'Represents a relationship between two geometries (or the places they represent), relating a covering geometry to a covered geometry. "Every point of b is a point of (the interior or boundary of) a". As defined in [DE-9IM](https://en.wikipedia.org/wiki/DE-9IM).', |
|
162 | - 'geoCrosses' => 'Represents a relationship between two geometries (or the places they represent), relating a geometry to another that crosses it: "a crosses b: they have some but not all interior points in common, and the dimension of the intersection is less than that of at least one of them". As defined in [DE-9IM](https://en.wikipedia.org/wiki/DE-9IM).', |
|
163 | - 'geoDisjoint' => 'Represents spatial relations in which two geometries (or the places they represent) are topologically disjoint: "they have no point in common. They form a set of disconnected geometries." (A symmetric relationship, as defined in [DE-9IM](https://en.wikipedia.org/wiki/DE-9IM).)', |
|
164 | - 'geoEquals' => 'Represents spatial relations in which two geometries (or the places they represent) are topologically equal, as defined in [DE-9IM](https://en.wikipedia.org/wiki/DE-9IM). "Two geometries are topologically equal if their interiors intersect and no part of the interior or boundary of one geometry intersects the exterior of the other" (a symmetric relationship).', |
|
165 | - 'geoIntersects' => 'Represents spatial relations in which two geometries (or the places they represent) have at least one point in common. As defined in [DE-9IM](https://en.wikipedia.org/wiki/DE-9IM).', |
|
166 | - 'geoOverlaps' => 'Represents a relationship between two geometries (or the places they represent), relating a geometry to another that geospatially overlaps it, i.e. they have some but not all points in common. As defined in [DE-9IM](https://en.wikipedia.org/wiki/DE-9IM).', |
|
167 | - 'geoTouches' => 'Represents spatial relations in which two geometries (or the places they represent) touch: "they have at least one boundary point in common, but no interior points." (A symmetric relationship, as defined in [DE-9IM](https://en.wikipedia.org/wiki/DE-9IM).)', |
|
168 | - 'geoWithin' => 'Represents a relationship between two geometries (or the places they represent), relating a geometry to one that contains it, i.e. it is inside (i.e. within) its interior. As defined in [DE-9IM](https://en.wikipedia.org/wiki/DE-9IM).', |
|
169 | - 'globalLocationNumber' => 'The [Global Location Number](http://www.gs1.org/gln) (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations.', |
|
170 | - 'hasDriveThroughService' => 'Indicates whether some facility (e.g. [[FoodEstablishment]], [[CovidTestingFacility]]) offers a service that can be used by driving through in a car. In the case of [[CovidTestingFacility]] such facilities could potentially help with social distancing from other potentially-infected users.', |
|
171 | - 'hasMap' => 'A URL to a map of the place.', |
|
172 | - 'identifier' => 'The identifier property represents any kind of identifier for any kind of [[Thing]], such as ISBNs, GTIN codes, UUIDs etc. Schema.org provides dedicated properties for representing many of these, either as textual strings or as URL (URI) links. See [background notes](/docs/datamodel.html#identifierBg) for more details. ', |
|
173 | - 'image' => 'An image of the item. This can be a [[URL]] or a fully described [[ImageObject]].', |
|
174 | - 'isAccessibleForFree' => 'A flag to signal that the item, event, or place is accessible for free.', |
|
175 | - 'isicV4' => 'The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place.', |
|
176 | - 'keywords' => 'Keywords or tags used to describe some item. Multiple textual entries in a keywords list are typically delimited by commas, or by repeating the property.', |
|
177 | - 'latitude' => 'The latitude of a location. For example ```37.42242``` ([WGS 84](https://en.wikipedia.org/wiki/World_Geodetic_System)).', |
|
178 | - 'logo' => 'An associated logo.', |
|
179 | - 'longitude' => 'The longitude of a location. For example ```-122.08585``` ([WGS 84](https://en.wikipedia.org/wiki/World_Geodetic_System)).', |
|
180 | - 'mainEntityOfPage' => 'Indicates a page (or other CreativeWork) for which this thing is the main entity being described. See [background notes](/docs/datamodel.html#mainEntityBackground) for details.', |
|
181 | - 'map' => 'A URL to a map of the place.', |
|
182 | - 'maps' => 'A URL to a map of the place.', |
|
183 | - 'maximumAttendeeCapacity' => 'The total number of individuals that may attend an event or venue.', |
|
184 | - 'name' => 'The name of the item.', |
|
185 | - 'openingHours' => 'The general opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas \',\' separating each day. Day or time ranges are specified using a hyphen \'-\'. * Days are specified using the following two-letter combinations: ```Mo```, ```Tu```, ```We```, ```Th```, ```Fr```, ```Sa```, ```Su```. * Times are specified using 24:00 format. For example, 3pm is specified as ```15:00```, 10am as ```10:00```. * Here is an example: <code><time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time></code>. * If a business is open 7 days a week, then it can be specified as <code><time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time></code>.', |
|
186 | - 'openingHoursSpecification' => 'The opening hours of a certain place.', |
|
187 | - 'photo' => 'A photograph of this place.', |
|
188 | - 'photos' => 'Photographs of this place.', |
|
189 | - 'potentialAction' => 'Indicates a potential Action, which describes an idealized action in which this thing would play an \'object\' role.', |
|
190 | - 'publicAccess' => 'A flag to signal that the [[Place]] is open to public visitors. If this property is omitted there is no assumed default boolean value', |
|
191 | - 'review' => 'A review of the item.', |
|
192 | - 'reviews' => 'Review of the item.', |
|
193 | - 'sameAs' => 'URL of a reference Web page that unambiguously indicates the item\'s identity. E.g. the URL of the item\'s Wikipedia page, Wikidata entry, or official website.', |
|
194 | - 'slogan' => 'A slogan or motto associated with the item.', |
|
195 | - 'smokingAllowed' => 'Indicates whether it is allowed to smoke in the place, e.g. in the restaurant, hotel or hotel room.', |
|
196 | - 'specialOpeningHoursSpecification' => 'The special opening hours of a certain place. Use this to explicitly override general opening hours brought in scope by [[openingHoursSpecification]] or [[openingHours]]. ', |
|
197 | - 'subjectOf' => 'A CreativeWork or Event about this Thing.', |
|
198 | - 'telephone' => 'The telephone number.', |
|
199 | - 'tourBookingPage' => 'A page providing information on how to book a tour of some [[Place]], such as an [[Accommodation]] or [[ApartmentComplex]] in a real estate setting, as well as other kinds of tours as appropriate.', |
|
200 | - 'url' => 'URL of the item.' |
|
201 | - ]; |
|
202 | - } |
|
203 | - |
|
204 | - |
|
205 | - /** |
|
206 | - * @inheritdoc |
|
207 | - */ |
|
208 | - public function getGoogleRequiredSchema(): array |
|
209 | - { |
|
210 | - return ['description', 'name']; |
|
211 | - } |
|
212 | - |
|
213 | - |
|
214 | - /** |
|
215 | - * @inheritdoc |
|
216 | - */ |
|
217 | - public function getGoogleRecommendedSchema(): array |
|
218 | - { |
|
219 | - return ['image', 'url']; |
|
220 | - } |
|
221 | - |
|
222 | - |
|
223 | - /** |
|
224 | - * @inheritdoc |
|
225 | - */ |
|
226 | - public function defineRules(): array |
|
227 | - { |
|
228 | - $rules = parent::defineRules(); |
|
229 | - $rules = array_merge($rules, [ |
|
230 | - [$this->getSchemaPropertyNames(), 'validateJsonSchema'], |
|
231 | - [$this->getGoogleRequiredSchema(), 'required', 'on' => ['google'], 'message' => 'This property is required by Google.'], |
|
232 | - [$this->getGoogleRecommendedSchema(), 'required', 'on' => ['google'], 'message' => 'This property is recommended by Google.'] |
|
233 | - ]); |
|
234 | - |
|
235 | - return $rules; |
|
236 | - } |
|
26 | + use BusStationTrait; |
|
27 | + use CivicStructureTrait; |
|
28 | + use PlaceTrait; |
|
29 | + use ThingTrait; |
|
30 | + |
|
31 | + /** |
|
32 | + * The Schema.org Type Name |
|
33 | + * |
|
34 | + * @var string |
|
35 | + */ |
|
36 | + public static $schemaTypeName = 'BusStation'; |
|
37 | + |
|
38 | + /** |
|
39 | + * The Schema.org Type Scope |
|
40 | + * |
|
41 | + * @var string |
|
42 | + */ |
|
43 | + public static $schemaTypeScope = 'https://schema.org/BusStation'; |
|
44 | + |
|
45 | + /** |
|
46 | + * The Schema.org Type Extends |
|
47 | + * |
|
48 | + * @var string |
|
49 | + */ |
|
50 | + public static $schemaTypeExtends = 'CivicStructure'; |
|
51 | + |
|
52 | + /** |
|
53 | + * The Schema.org Type Description |
|
54 | + * |
|
55 | + * @var string |
|
56 | + */ |
|
57 | + public static $schemaTypeDescription = 'A bus station.'; |
|
58 | + |
|
59 | + |
|
60 | + /** |
|
61 | + * @inheritdoc |
|
62 | + */ |
|
63 | + public function getSchemaPropertyNames(): array |
|
64 | + { |
|
65 | + return array_keys($this->getSchemaPropertyExpectedTypes()); |
|
66 | + } |
|
67 | + |
|
68 | + |
|
69 | + /** |
|
70 | + * @inheritdoc |
|
71 | + */ |
|
72 | + public function getSchemaPropertyExpectedTypes(): array |
|
73 | + { |
|
74 | + return [ |
|
75 | + 'additionalProperty' => ['PropertyValue'], |
|
76 | + 'additionalType' => ['URL'], |
|
77 | + 'address' => ['Text', 'PostalAddress'], |
|
78 | + 'aggregateRating' => ['AggregateRating'], |
|
79 | + 'alternateName' => ['Text'], |
|
80 | + 'amenityFeature' => ['LocationFeatureSpecification'], |
|
81 | + 'branchCode' => ['Text'], |
|
82 | + 'containedIn' => ['Place'], |
|
83 | + 'containedInPlace' => ['Place'], |
|
84 | + 'containsPlace' => ['Place'], |
|
85 | + 'description' => ['Text'], |
|
86 | + 'disambiguatingDescription' => ['Text'], |
|
87 | + 'event' => ['Event'], |
|
88 | + 'events' => ['Event'], |
|
89 | + 'faxNumber' => ['Text'], |
|
90 | + 'geo' => ['GeoCoordinates', 'GeoShape'], |
|
91 | + 'geoContains' => ['Place', 'GeospatialGeometry'], |
|
92 | + 'geoCoveredBy' => ['GeospatialGeometry', 'Place'], |
|
93 | + 'geoCovers' => ['GeospatialGeometry', 'Place'], |
|
94 | + 'geoCrosses' => ['GeospatialGeometry', 'Place'], |
|
95 | + 'geoDisjoint' => ['GeospatialGeometry', 'Place'], |
|
96 | + 'geoEquals' => ['GeospatialGeometry', 'Place'], |
|
97 | + 'geoIntersects' => ['GeospatialGeometry', 'Place'], |
|
98 | + 'geoOverlaps' => ['GeospatialGeometry', 'Place'], |
|
99 | + 'geoTouches' => ['GeospatialGeometry', 'Place'], |
|
100 | + 'geoWithin' => ['GeospatialGeometry', 'Place'], |
|
101 | + 'globalLocationNumber' => ['Text'], |
|
102 | + 'hasDriveThroughService' => ['Boolean'], |
|
103 | + 'hasMap' => ['URL', 'Map'], |
|
104 | + 'identifier' => ['PropertyValue', 'URL', 'Text'], |
|
105 | + 'image' => ['URL', 'ImageObject'], |
|
106 | + 'isAccessibleForFree' => ['Boolean'], |
|
107 | + 'isicV4' => ['Text'], |
|
108 | + 'keywords' => ['URL', 'DefinedTerm', 'Text'], |
|
109 | + 'latitude' => ['Number', 'Text'], |
|
110 | + 'logo' => ['ImageObject', 'URL'], |
|
111 | + 'longitude' => ['Text', 'Number'], |
|
112 | + 'mainEntityOfPage' => ['URL', 'CreativeWork'], |
|
113 | + 'map' => ['URL'], |
|
114 | + 'maps' => ['URL'], |
|
115 | + 'maximumAttendeeCapacity' => ['Integer'], |
|
116 | + 'name' => ['Text'], |
|
117 | + 'openingHours' => ['Text'], |
|
118 | + 'openingHoursSpecification' => ['OpeningHoursSpecification'], |
|
119 | + 'photo' => ['Photograph', 'ImageObject'], |
|
120 | + 'photos' => ['ImageObject', 'Photograph'], |
|
121 | + 'potentialAction' => ['Action'], |
|
122 | + 'publicAccess' => ['Boolean'], |
|
123 | + 'review' => ['Review'], |
|
124 | + 'reviews' => ['Review'], |
|
125 | + 'sameAs' => ['URL'], |
|
126 | + 'slogan' => ['Text'], |
|
127 | + 'smokingAllowed' => ['Boolean'], |
|
128 | + 'specialOpeningHoursSpecification' => ['OpeningHoursSpecification'], |
|
129 | + 'subjectOf' => ['Event', 'CreativeWork'], |
|
130 | + 'telephone' => ['Text'], |
|
131 | + 'tourBookingPage' => ['URL'], |
|
132 | + 'url' => ['URL'] |
|
133 | + ]; |
|
134 | + } |
|
135 | + |
|
136 | + |
|
137 | + /** |
|
138 | + * @inheritdoc |
|
139 | + */ |
|
140 | + public function getSchemaPropertyDescriptions(): array |
|
141 | + { |
|
142 | + return [ |
|
143 | + 'additionalProperty' => 'A property-value pair representing an additional characteristic of the entity, e.g. a product feature or another characteristic for which there is no matching property in schema.org. Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. https://schema.org/width, https://schema.org/color, https://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. ', |
|
144 | + 'additionalType' => 'An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the \'typeof\' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally.', |
|
145 | + 'address' => 'Physical address of the item.', |
|
146 | + 'aggregateRating' => 'The overall rating, based on a collection of reviews or ratings, of the item.', |
|
147 | + 'alternateName' => 'An alias for the item.', |
|
148 | + 'amenityFeature' => 'An amenity feature (e.g. a characteristic or service) of the Accommodation. This generic property does not make a statement about whether the feature is included in an offer for the main accommodation or available at extra costs.', |
|
149 | + 'branchCode' => 'A short textual code (also called "store code") that uniquely identifies a place of business. The code is typically assigned by the parentOrganization and used in structured URLs. For example, in the URL http://www.starbucks.co.uk/store-locator/etc/detail/3047 the code "3047" is a branchCode for a particular branch. ', |
|
150 | + 'containedIn' => 'The basic containment relation between a place and one that contains it.', |
|
151 | + 'containedInPlace' => 'The basic containment relation between a place and one that contains it.', |
|
152 | + 'containsPlace' => 'The basic containment relation between a place and another that it contains.', |
|
153 | + 'description' => 'A description of the item.', |
|
154 | + 'disambiguatingDescription' => 'A sub property of description. A short description of the item used to disambiguate from other, similar items. Information from other properties (in particular, name) may be necessary for the description to be useful for disambiguation.', |
|
155 | + 'event' => 'Upcoming or past event associated with this place, organization, or action.', |
|
156 | + 'events' => 'Upcoming or past events associated with this place or organization.', |
|
157 | + 'faxNumber' => 'The fax number.', |
|
158 | + 'geo' => 'The geo coordinates of the place.', |
|
159 | + 'geoContains' => 'Represents a relationship between two geometries (or the places they represent), relating a containing geometry to a contained geometry. "a contains b iff no points of b lie in the exterior of a, and at least one point of the interior of b lies in the interior of a". As defined in [DE-9IM](https://en.wikipedia.org/wiki/DE-9IM).', |
|
160 | + 'geoCoveredBy' => 'Represents a relationship between two geometries (or the places they represent), relating a geometry to another that covers it. As defined in [DE-9IM](https://en.wikipedia.org/wiki/DE-9IM).', |
|
161 | + 'geoCovers' => 'Represents a relationship between two geometries (or the places they represent), relating a covering geometry to a covered geometry. "Every point of b is a point of (the interior or boundary of) a". As defined in [DE-9IM](https://en.wikipedia.org/wiki/DE-9IM).', |
|
162 | + 'geoCrosses' => 'Represents a relationship between two geometries (or the places they represent), relating a geometry to another that crosses it: "a crosses b: they have some but not all interior points in common, and the dimension of the intersection is less than that of at least one of them". As defined in [DE-9IM](https://en.wikipedia.org/wiki/DE-9IM).', |
|
163 | + 'geoDisjoint' => 'Represents spatial relations in which two geometries (or the places they represent) are topologically disjoint: "they have no point in common. They form a set of disconnected geometries." (A symmetric relationship, as defined in [DE-9IM](https://en.wikipedia.org/wiki/DE-9IM).)', |
|
164 | + 'geoEquals' => 'Represents spatial relations in which two geometries (or the places they represent) are topologically equal, as defined in [DE-9IM](https://en.wikipedia.org/wiki/DE-9IM). "Two geometries are topologically equal if their interiors intersect and no part of the interior or boundary of one geometry intersects the exterior of the other" (a symmetric relationship).', |
|
165 | + 'geoIntersects' => 'Represents spatial relations in which two geometries (or the places they represent) have at least one point in common. As defined in [DE-9IM](https://en.wikipedia.org/wiki/DE-9IM).', |
|
166 | + 'geoOverlaps' => 'Represents a relationship between two geometries (or the places they represent), relating a geometry to another that geospatially overlaps it, i.e. they have some but not all points in common. As defined in [DE-9IM](https://en.wikipedia.org/wiki/DE-9IM).', |
|
167 | + 'geoTouches' => 'Represents spatial relations in which two geometries (or the places they represent) touch: "they have at least one boundary point in common, but no interior points." (A symmetric relationship, as defined in [DE-9IM](https://en.wikipedia.org/wiki/DE-9IM).)', |
|
168 | + 'geoWithin' => 'Represents a relationship between two geometries (or the places they represent), relating a geometry to one that contains it, i.e. it is inside (i.e. within) its interior. As defined in [DE-9IM](https://en.wikipedia.org/wiki/DE-9IM).', |
|
169 | + 'globalLocationNumber' => 'The [Global Location Number](http://www.gs1.org/gln) (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations.', |
|
170 | + 'hasDriveThroughService' => 'Indicates whether some facility (e.g. [[FoodEstablishment]], [[CovidTestingFacility]]) offers a service that can be used by driving through in a car. In the case of [[CovidTestingFacility]] such facilities could potentially help with social distancing from other potentially-infected users.', |
|
171 | + 'hasMap' => 'A URL to a map of the place.', |
|
172 | + 'identifier' => 'The identifier property represents any kind of identifier for any kind of [[Thing]], such as ISBNs, GTIN codes, UUIDs etc. Schema.org provides dedicated properties for representing many of these, either as textual strings or as URL (URI) links. See [background notes](/docs/datamodel.html#identifierBg) for more details. ', |
|
173 | + 'image' => 'An image of the item. This can be a [[URL]] or a fully described [[ImageObject]].', |
|
174 | + 'isAccessibleForFree' => 'A flag to signal that the item, event, or place is accessible for free.', |
|
175 | + 'isicV4' => 'The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place.', |
|
176 | + 'keywords' => 'Keywords or tags used to describe some item. Multiple textual entries in a keywords list are typically delimited by commas, or by repeating the property.', |
|
177 | + 'latitude' => 'The latitude of a location. For example ```37.42242``` ([WGS 84](https://en.wikipedia.org/wiki/World_Geodetic_System)).', |
|
178 | + 'logo' => 'An associated logo.', |
|
179 | + 'longitude' => 'The longitude of a location. For example ```-122.08585``` ([WGS 84](https://en.wikipedia.org/wiki/World_Geodetic_System)).', |
|
180 | + 'mainEntityOfPage' => 'Indicates a page (or other CreativeWork) for which this thing is the main entity being described. See [background notes](/docs/datamodel.html#mainEntityBackground) for details.', |
|
181 | + 'map' => 'A URL to a map of the place.', |
|
182 | + 'maps' => 'A URL to a map of the place.', |
|
183 | + 'maximumAttendeeCapacity' => 'The total number of individuals that may attend an event or venue.', |
|
184 | + 'name' => 'The name of the item.', |
|
185 | + 'openingHours' => 'The general opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas \',\' separating each day. Day or time ranges are specified using a hyphen \'-\'. * Days are specified using the following two-letter combinations: ```Mo```, ```Tu```, ```We```, ```Th```, ```Fr```, ```Sa```, ```Su```. * Times are specified using 24:00 format. For example, 3pm is specified as ```15:00```, 10am as ```10:00```. * Here is an example: <code><time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time></code>. * If a business is open 7 days a week, then it can be specified as <code><time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time></code>.', |
|
186 | + 'openingHoursSpecification' => 'The opening hours of a certain place.', |
|
187 | + 'photo' => 'A photograph of this place.', |
|
188 | + 'photos' => 'Photographs of this place.', |
|
189 | + 'potentialAction' => 'Indicates a potential Action, which describes an idealized action in which this thing would play an \'object\' role.', |
|
190 | + 'publicAccess' => 'A flag to signal that the [[Place]] is open to public visitors. If this property is omitted there is no assumed default boolean value', |
|
191 | + 'review' => 'A review of the item.', |
|
192 | + 'reviews' => 'Review of the item.', |
|
193 | + 'sameAs' => 'URL of a reference Web page that unambiguously indicates the item\'s identity. E.g. the URL of the item\'s Wikipedia page, Wikidata entry, or official website.', |
|
194 | + 'slogan' => 'A slogan or motto associated with the item.', |
|
195 | + 'smokingAllowed' => 'Indicates whether it is allowed to smoke in the place, e.g. in the restaurant, hotel or hotel room.', |
|
196 | + 'specialOpeningHoursSpecification' => 'The special opening hours of a certain place. Use this to explicitly override general opening hours brought in scope by [[openingHoursSpecification]] or [[openingHours]]. ', |
|
197 | + 'subjectOf' => 'A CreativeWork or Event about this Thing.', |
|
198 | + 'telephone' => 'The telephone number.', |
|
199 | + 'tourBookingPage' => 'A page providing information on how to book a tour of some [[Place]], such as an [[Accommodation]] or [[ApartmentComplex]] in a real estate setting, as well as other kinds of tours as appropriate.', |
|
200 | + 'url' => 'URL of the item.' |
|
201 | + ]; |
|
202 | + } |
|
203 | + |
|
204 | + |
|
205 | + /** |
|
206 | + * @inheritdoc |
|
207 | + */ |
|
208 | + public function getGoogleRequiredSchema(): array |
|
209 | + { |
|
210 | + return ['description', 'name']; |
|
211 | + } |
|
212 | + |
|
213 | + |
|
214 | + /** |
|
215 | + * @inheritdoc |
|
216 | + */ |
|
217 | + public function getGoogleRecommendedSchema(): array |
|
218 | + { |
|
219 | + return ['image', 'url']; |
|
220 | + } |
|
221 | + |
|
222 | + |
|
223 | + /** |
|
224 | + * @inheritdoc |
|
225 | + */ |
|
226 | + public function defineRules(): array |
|
227 | + { |
|
228 | + $rules = parent::defineRules(); |
|
229 | + $rules = array_merge($rules, [ |
|
230 | + [$this->getSchemaPropertyNames(), 'validateJsonSchema'], |
|
231 | + [$this->getGoogleRequiredSchema(), 'required', 'on' => ['google'], 'message' => 'This property is required by Google.'], |
|
232 | + [$this->getGoogleRecommendedSchema(), 'required', 'on' => ['google'], 'message' => 'This property is recommended by Google.'] |
|
233 | + ]); |
|
234 | + |
|
235 | + return $rules; |
|
236 | + } |
|
237 | 237 | } |
@@ -25,146 +25,146 @@ |
||
25 | 25 | */ |
26 | 26 | class LocationFeatureSpecification extends MetaJsonLd implements LocationFeatureSpecificationInterface, PropertyValueInterface, StructuredValueInterface, IntangibleInterface, ThingInterface |
27 | 27 | { |
28 | - use LocationFeatureSpecificationTrait; |
|
29 | - use PropertyValueTrait; |
|
30 | - use StructuredValueTrait; |
|
31 | - use IntangibleTrait; |
|
32 | - use ThingTrait; |
|
33 | - |
|
34 | - /** |
|
35 | - * The Schema.org Type Name |
|
36 | - * |
|
37 | - * @var string |
|
38 | - */ |
|
39 | - public static $schemaTypeName = 'LocationFeatureSpecification'; |
|
40 | - |
|
41 | - /** |
|
42 | - * The Schema.org Type Scope |
|
43 | - * |
|
44 | - * @var string |
|
45 | - */ |
|
46 | - public static $schemaTypeScope = 'https://schema.org/LocationFeatureSpecification'; |
|
47 | - |
|
48 | - /** |
|
49 | - * The Schema.org Type Extends |
|
50 | - * |
|
51 | - * @var string |
|
52 | - */ |
|
53 | - public static $schemaTypeExtends = 'PropertyValue'; |
|
54 | - |
|
55 | - /** |
|
56 | - * The Schema.org Type Description |
|
57 | - * |
|
58 | - * @var string |
|
59 | - */ |
|
60 | - public static $schemaTypeDescription = 'Specifies a location feature by providing a structured value representing a feature of an accommodation as a property-value pair of varying degrees of formality.'; |
|
61 | - |
|
62 | - |
|
63 | - /** |
|
64 | - * @inheritdoc |
|
65 | - */ |
|
66 | - public function getSchemaPropertyNames(): array |
|
67 | - { |
|
68 | - return array_keys($this->getSchemaPropertyExpectedTypes()); |
|
69 | - } |
|
70 | - |
|
71 | - |
|
72 | - /** |
|
73 | - * @inheritdoc |
|
74 | - */ |
|
75 | - public function getSchemaPropertyExpectedTypes(): array |
|
76 | - { |
|
77 | - return [ |
|
78 | - 'additionalType' => ['URL'], |
|
79 | - 'alternateName' => ['Text'], |
|
80 | - 'description' => ['Text'], |
|
81 | - 'disambiguatingDescription' => ['Text'], |
|
82 | - 'hoursAvailable' => ['OpeningHoursSpecification'], |
|
83 | - 'identifier' => ['PropertyValue', 'URL', 'Text'], |
|
84 | - 'image' => ['URL', 'ImageObject'], |
|
85 | - 'mainEntityOfPage' => ['URL', 'CreativeWork'], |
|
86 | - 'maxValue' => ['Number'], |
|
87 | - 'measurementTechnique' => ['URL', 'Text'], |
|
88 | - 'minValue' => ['Number'], |
|
89 | - 'name' => ['Text'], |
|
90 | - 'potentialAction' => ['Action'], |
|
91 | - 'propertyID' => ['Text', 'URL'], |
|
92 | - 'sameAs' => ['URL'], |
|
93 | - 'subjectOf' => ['Event', 'CreativeWork'], |
|
94 | - 'unitCode' => ['Text', 'URL'], |
|
95 | - 'unitText' => ['Text'], |
|
96 | - 'url' => ['URL'], |
|
97 | - 'validFrom' => ['Date', 'DateTime'], |
|
98 | - 'validThrough' => ['Date', 'DateTime'], |
|
99 | - 'value' => ['StructuredValue', 'Text', 'Boolean', 'Number'], |
|
100 | - 'valueReference' => ['Enumeration', 'QualitativeValue', 'DefinedTerm', 'StructuredValue', 'PropertyValue', 'Text', 'MeasurementTypeEnumeration', 'QuantitativeValue'] |
|
101 | - ]; |
|
102 | - } |
|
103 | - |
|
104 | - |
|
105 | - /** |
|
106 | - * @inheritdoc |
|
107 | - */ |
|
108 | - public function getSchemaPropertyDescriptions(): array |
|
109 | - { |
|
110 | - return [ |
|
111 | - 'additionalType' => 'An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the \'typeof\' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally.', |
|
112 | - 'alternateName' => 'An alias for the item.', |
|
113 | - 'description' => 'A description of the item.', |
|
114 | - 'disambiguatingDescription' => 'A sub property of description. A short description of the item used to disambiguate from other, similar items. Information from other properties (in particular, name) may be necessary for the description to be useful for disambiguation.', |
|
115 | - 'hoursAvailable' => 'The hours during which this service or contact is available.', |
|
116 | - 'identifier' => 'The identifier property represents any kind of identifier for any kind of [[Thing]], such as ISBNs, GTIN codes, UUIDs etc. Schema.org provides dedicated properties for representing many of these, either as textual strings or as URL (URI) links. See [background notes](/docs/datamodel.html#identifierBg) for more details. ', |
|
117 | - 'image' => 'An image of the item. This can be a [[URL]] or a fully described [[ImageObject]].', |
|
118 | - 'mainEntityOfPage' => 'Indicates a page (or other CreativeWork) for which this thing is the main entity being described. See [background notes](/docs/datamodel.html#mainEntityBackground) for details.', |
|
119 | - 'maxValue' => 'The upper value of some characteristic or property.', |
|
120 | - 'measurementTechnique' => 'A technique or technology used in a [[Dataset]] (or [[DataDownload]], [[DataCatalog]]), corresponding to the method used for measuring the corresponding variable(s) (described using [[variableMeasured]]). This is oriented towards scientific and scholarly dataset publication but may have broader applicability; it is not intended as a full representation of measurement, but rather as a high level summary for dataset discovery. For example, if [[variableMeasured]] is: molecule concentration, [[measurementTechnique]] could be: "mass spectrometry" or "nmr spectroscopy" or "colorimetry" or "immunofluorescence". If the [[variableMeasured]] is "depression rating", the [[measurementTechnique]] could be "Zung Scale" or "HAM-D" or "Beck Depression Inventory". If there are several [[variableMeasured]] properties recorded for some given data object, use a [[PropertyValue]] for each [[variableMeasured]] and attach the corresponding [[measurementTechnique]]. ', |
|
121 | - 'minValue' => 'The lower value of some characteristic or property.', |
|
122 | - 'name' => 'The name of the item.', |
|
123 | - 'potentialAction' => 'Indicates a potential Action, which describes an idealized action in which this thing would play an \'object\' role.', |
|
124 | - 'propertyID' => 'A commonly used identifier for the characteristic represented by the property, e.g. a manufacturer or a standard code for a property. propertyID can be (1) a prefixed string, mainly meant to be used with standards for product properties; (2) a site-specific, non-prefixed string (e.g. the primary key of the property or the vendor-specific ID of the property), or (3) a URL indicating the type of the property, either pointing to an external vocabulary, or a Web resource that describes the property (e.g. a glossary entry). Standards bodies should promote a standard prefix for the identifiers of properties from their standards.', |
|
125 | - 'sameAs' => 'URL of a reference Web page that unambiguously indicates the item\'s identity. E.g. the URL of the item\'s Wikipedia page, Wikidata entry, or official website.', |
|
126 | - 'subjectOf' => 'A CreativeWork or Event about this Thing.', |
|
127 | - 'unitCode' => 'The unit of measurement given using the UN/CEFACT Common Code (3 characters) or a URL. Other codes than the UN/CEFACT Common Code may be used with a prefix followed by a colon.', |
|
128 | - 'unitText' => 'A string or text indicating the unit of measurement. Useful if you cannot provide a standard unit code for <a href=\'unitCode\'>unitCode</a>.', |
|
129 | - 'url' => 'URL of the item.', |
|
130 | - 'validFrom' => 'The date when the item becomes valid.', |
|
131 | - 'validThrough' => 'The date after when the item is not valid. For example the end of an offer, salary period, or a period of opening hours.', |
|
132 | - 'value' => 'The value of the quantitative value or property value node. * For [[QuantitativeValue]] and [[MonetaryAmount]], the recommended type for values is \'Number\'. * For [[PropertyValue]], it can be \'Text\', \'Number\', \'Boolean\', or \'StructuredValue\'. * Use values from 0123456789 (Unicode \'DIGIT ZERO\' (U+0030) to \'DIGIT NINE\' (U+0039)) rather than superficially similar Unicode symbols. * Use \'.\' (Unicode \'FULL STOP\' (U+002E)) rather than \',\' to indicate a decimal point. Avoid using these symbols as a readability separator.', |
|
133 | - 'valueReference' => 'A secondary value that provides additional information on the original value, e.g. a reference temperature or a type of measurement.' |
|
134 | - ]; |
|
135 | - } |
|
136 | - |
|
137 | - |
|
138 | - /** |
|
139 | - * @inheritdoc |
|
140 | - */ |
|
141 | - public function getGoogleRequiredSchema(): array |
|
142 | - { |
|
143 | - return ['description', 'name']; |
|
144 | - } |
|
145 | - |
|
146 | - |
|
147 | - /** |
|
148 | - * @inheritdoc |
|
149 | - */ |
|
150 | - public function getGoogleRecommendedSchema(): array |
|
151 | - { |
|
152 | - return ['image', 'url']; |
|
153 | - } |
|
154 | - |
|
155 | - |
|
156 | - /** |
|
157 | - * @inheritdoc |
|
158 | - */ |
|
159 | - public function defineRules(): array |
|
160 | - { |
|
161 | - $rules = parent::defineRules(); |
|
162 | - $rules = array_merge($rules, [ |
|
163 | - [$this->getSchemaPropertyNames(), 'validateJsonSchema'], |
|
164 | - [$this->getGoogleRequiredSchema(), 'required', 'on' => ['google'], 'message' => 'This property is required by Google.'], |
|
165 | - [$this->getGoogleRecommendedSchema(), 'required', 'on' => ['google'], 'message' => 'This property is recommended by Google.'] |
|
166 | - ]); |
|
167 | - |
|
168 | - return $rules; |
|
169 | - } |
|
28 | + use LocationFeatureSpecificationTrait; |
|
29 | + use PropertyValueTrait; |
|
30 | + use StructuredValueTrait; |
|
31 | + use IntangibleTrait; |
|
32 | + use ThingTrait; |
|
33 | + |
|
34 | + /** |
|
35 | + * The Schema.org Type Name |
|
36 | + * |
|
37 | + * @var string |
|
38 | + */ |
|
39 | + public static $schemaTypeName = 'LocationFeatureSpecification'; |
|
40 | + |
|
41 | + /** |
|
42 | + * The Schema.org Type Scope |
|
43 | + * |
|
44 | + * @var string |
|
45 | + */ |
|
46 | + public static $schemaTypeScope = 'https://schema.org/LocationFeatureSpecification'; |
|
47 | + |
|
48 | + /** |
|
49 | + * The Schema.org Type Extends |
|
50 | + * |
|
51 | + * @var string |
|
52 | + */ |
|
53 | + public static $schemaTypeExtends = 'PropertyValue'; |
|
54 | + |
|
55 | + /** |
|
56 | + * The Schema.org Type Description |
|
57 | + * |
|
58 | + * @var string |
|
59 | + */ |
|
60 | + public static $schemaTypeDescription = 'Specifies a location feature by providing a structured value representing a feature of an accommodation as a property-value pair of varying degrees of formality.'; |
|
61 | + |
|
62 | + |
|
63 | + /** |
|
64 | + * @inheritdoc |
|
65 | + */ |
|
66 | + public function getSchemaPropertyNames(): array |
|
67 | + { |
|
68 | + return array_keys($this->getSchemaPropertyExpectedTypes()); |
|
69 | + } |
|
70 | + |
|
71 | + |
|
72 | + /** |
|
73 | + * @inheritdoc |
|
74 | + */ |
|
75 | + public function getSchemaPropertyExpectedTypes(): array |
|
76 | + { |
|
77 | + return [ |
|
78 | + 'additionalType' => ['URL'], |
|
79 | + 'alternateName' => ['Text'], |
|
80 | + 'description' => ['Text'], |
|
81 | + 'disambiguatingDescription' => ['Text'], |
|
82 | + 'hoursAvailable' => ['OpeningHoursSpecification'], |
|
83 | + 'identifier' => ['PropertyValue', 'URL', 'Text'], |
|
84 | + 'image' => ['URL', 'ImageObject'], |
|
85 | + 'mainEntityOfPage' => ['URL', 'CreativeWork'], |
|
86 | + 'maxValue' => ['Number'], |
|
87 | + 'measurementTechnique' => ['URL', 'Text'], |
|
88 | + 'minValue' => ['Number'], |
|
89 | + 'name' => ['Text'], |
|
90 | + 'potentialAction' => ['Action'], |
|
91 | + 'propertyID' => ['Text', 'URL'], |
|
92 | + 'sameAs' => ['URL'], |
|
93 | + 'subjectOf' => ['Event', 'CreativeWork'], |
|
94 | + 'unitCode' => ['Text', 'URL'], |
|
95 | + 'unitText' => ['Text'], |
|
96 | + 'url' => ['URL'], |
|
97 | + 'validFrom' => ['Date', 'DateTime'], |
|
98 | + 'validThrough' => ['Date', 'DateTime'], |
|
99 | + 'value' => ['StructuredValue', 'Text', 'Boolean', 'Number'], |
|
100 | + 'valueReference' => ['Enumeration', 'QualitativeValue', 'DefinedTerm', 'StructuredValue', 'PropertyValue', 'Text', 'MeasurementTypeEnumeration', 'QuantitativeValue'] |
|
101 | + ]; |
|
102 | + } |
|
103 | + |
|
104 | + |
|
105 | + /** |
|
106 | + * @inheritdoc |
|
107 | + */ |
|
108 | + public function getSchemaPropertyDescriptions(): array |
|
109 | + { |
|
110 | + return [ |
|
111 | + 'additionalType' => 'An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the \'typeof\' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally.', |
|
112 | + 'alternateName' => 'An alias for the item.', |
|
113 | + 'description' => 'A description of the item.', |
|
114 | + 'disambiguatingDescription' => 'A sub property of description. A short description of the item used to disambiguate from other, similar items. Information from other properties (in particular, name) may be necessary for the description to be useful for disambiguation.', |
|
115 | + 'hoursAvailable' => 'The hours during which this service or contact is available.', |
|
116 | + 'identifier' => 'The identifier property represents any kind of identifier for any kind of [[Thing]], such as ISBNs, GTIN codes, UUIDs etc. Schema.org provides dedicated properties for representing many of these, either as textual strings or as URL (URI) links. See [background notes](/docs/datamodel.html#identifierBg) for more details. ', |
|
117 | + 'image' => 'An image of the item. This can be a [[URL]] or a fully described [[ImageObject]].', |
|
118 | + 'mainEntityOfPage' => 'Indicates a page (or other CreativeWork) for which this thing is the main entity being described. See [background notes](/docs/datamodel.html#mainEntityBackground) for details.', |
|
119 | + 'maxValue' => 'The upper value of some characteristic or property.', |
|
120 | + 'measurementTechnique' => 'A technique or technology used in a [[Dataset]] (or [[DataDownload]], [[DataCatalog]]), corresponding to the method used for measuring the corresponding variable(s) (described using [[variableMeasured]]). This is oriented towards scientific and scholarly dataset publication but may have broader applicability; it is not intended as a full representation of measurement, but rather as a high level summary for dataset discovery. For example, if [[variableMeasured]] is: molecule concentration, [[measurementTechnique]] could be: "mass spectrometry" or "nmr spectroscopy" or "colorimetry" or "immunofluorescence". If the [[variableMeasured]] is "depression rating", the [[measurementTechnique]] could be "Zung Scale" or "HAM-D" or "Beck Depression Inventory". If there are several [[variableMeasured]] properties recorded for some given data object, use a [[PropertyValue]] for each [[variableMeasured]] and attach the corresponding [[measurementTechnique]]. ', |
|
121 | + 'minValue' => 'The lower value of some characteristic or property.', |
|
122 | + 'name' => 'The name of the item.', |
|
123 | + 'potentialAction' => 'Indicates a potential Action, which describes an idealized action in which this thing would play an \'object\' role.', |
|
124 | + 'propertyID' => 'A commonly used identifier for the characteristic represented by the property, e.g. a manufacturer or a standard code for a property. propertyID can be (1) a prefixed string, mainly meant to be used with standards for product properties; (2) a site-specific, non-prefixed string (e.g. the primary key of the property or the vendor-specific ID of the property), or (3) a URL indicating the type of the property, either pointing to an external vocabulary, or a Web resource that describes the property (e.g. a glossary entry). Standards bodies should promote a standard prefix for the identifiers of properties from their standards.', |
|
125 | + 'sameAs' => 'URL of a reference Web page that unambiguously indicates the item\'s identity. E.g. the URL of the item\'s Wikipedia page, Wikidata entry, or official website.', |
|
126 | + 'subjectOf' => 'A CreativeWork or Event about this Thing.', |
|
127 | + 'unitCode' => 'The unit of measurement given using the UN/CEFACT Common Code (3 characters) or a URL. Other codes than the UN/CEFACT Common Code may be used with a prefix followed by a colon.', |
|
128 | + 'unitText' => 'A string or text indicating the unit of measurement. Useful if you cannot provide a standard unit code for <a href=\'unitCode\'>unitCode</a>.', |
|
129 | + 'url' => 'URL of the item.', |
|
130 | + 'validFrom' => 'The date when the item becomes valid.', |
|
131 | + 'validThrough' => 'The date after when the item is not valid. For example the end of an offer, salary period, or a period of opening hours.', |
|
132 | + 'value' => 'The value of the quantitative value or property value node. * For [[QuantitativeValue]] and [[MonetaryAmount]], the recommended type for values is \'Number\'. * For [[PropertyValue]], it can be \'Text\', \'Number\', \'Boolean\', or \'StructuredValue\'. * Use values from 0123456789 (Unicode \'DIGIT ZERO\' (U+0030) to \'DIGIT NINE\' (U+0039)) rather than superficially similar Unicode symbols. * Use \'.\' (Unicode \'FULL STOP\' (U+002E)) rather than \',\' to indicate a decimal point. Avoid using these symbols as a readability separator.', |
|
133 | + 'valueReference' => 'A secondary value that provides additional information on the original value, e.g. a reference temperature or a type of measurement.' |
|
134 | + ]; |
|
135 | + } |
|
136 | + |
|
137 | + |
|
138 | + /** |
|
139 | + * @inheritdoc |
|
140 | + */ |
|
141 | + public function getGoogleRequiredSchema(): array |
|
142 | + { |
|
143 | + return ['description', 'name']; |
|
144 | + } |
|
145 | + |
|
146 | + |
|
147 | + /** |
|
148 | + * @inheritdoc |
|
149 | + */ |
|
150 | + public function getGoogleRecommendedSchema(): array |
|
151 | + { |
|
152 | + return ['image', 'url']; |
|
153 | + } |
|
154 | + |
|
155 | + |
|
156 | + /** |
|
157 | + * @inheritdoc |
|
158 | + */ |
|
159 | + public function defineRules(): array |
|
160 | + { |
|
161 | + $rules = parent::defineRules(); |
|
162 | + $rules = array_merge($rules, [ |
|
163 | + [$this->getSchemaPropertyNames(), 'validateJsonSchema'], |
|
164 | + [$this->getGoogleRequiredSchema(), 'required', 'on' => ['google'], 'message' => 'This property is required by Google.'], |
|
165 | + [$this->getGoogleRecommendedSchema(), 'required', 'on' => ['google'], 'message' => 'This property is recommended by Google.'] |
|
166 | + ]); |
|
167 | + |
|
168 | + return $rules; |
|
169 | + } |
|
170 | 170 | } |
@@ -23,127 +23,127 @@ |
||
23 | 23 | */ |
24 | 24 | class Online extends MetaJsonLd implements OnlineInterface, GameServerStatusInterface, StatusEnumerationInterface, EnumerationInterface, IntangibleInterface, ThingInterface |
25 | 25 | { |
26 | - use OnlineTrait; |
|
27 | - use GameServerStatusTrait; |
|
28 | - use StatusEnumerationTrait; |
|
29 | - use EnumerationTrait; |
|
30 | - use IntangibleTrait; |
|
31 | - use ThingTrait; |
|
32 | - |
|
33 | - /** |
|
34 | - * The Schema.org Type Name |
|
35 | - * |
|
36 | - * @var string |
|
37 | - */ |
|
38 | - public static $schemaTypeName = 'Online'; |
|
39 | - |
|
40 | - /** |
|
41 | - * The Schema.org Type Scope |
|
42 | - * |
|
43 | - * @var string |
|
44 | - */ |
|
45 | - public static $schemaTypeScope = 'https://schema.org/Online'; |
|
46 | - |
|
47 | - /** |
|
48 | - * The Schema.org Type Extends |
|
49 | - * |
|
50 | - * @var string |
|
51 | - */ |
|
52 | - public static $schemaTypeExtends = 'GameServerStatus'; |
|
53 | - |
|
54 | - /** |
|
55 | - * The Schema.org Type Description |
|
56 | - * |
|
57 | - * @var string |
|
58 | - */ |
|
59 | - public static $schemaTypeDescription = 'Game server status: Online. Server is available.'; |
|
60 | - |
|
61 | - |
|
62 | - /** |
|
63 | - * @inheritdoc |
|
64 | - */ |
|
65 | - public function getSchemaPropertyNames(): array |
|
66 | - { |
|
67 | - return array_keys($this->getSchemaPropertyExpectedTypes()); |
|
68 | - } |
|
69 | - |
|
70 | - |
|
71 | - /** |
|
72 | - * @inheritdoc |
|
73 | - */ |
|
74 | - public function getSchemaPropertyExpectedTypes(): array |
|
75 | - { |
|
76 | - return [ |
|
77 | - 'additionalType' => ['URL'], |
|
78 | - 'alternateName' => ['Text'], |
|
79 | - 'description' => ['Text'], |
|
80 | - 'disambiguatingDescription' => ['Text'], |
|
81 | - 'identifier' => ['PropertyValue', 'URL', 'Text'], |
|
82 | - 'image' => ['URL', 'ImageObject'], |
|
83 | - 'mainEntityOfPage' => ['URL', 'CreativeWork'], |
|
84 | - 'name' => ['Text'], |
|
85 | - 'potentialAction' => ['Action'], |
|
86 | - 'sameAs' => ['URL'], |
|
87 | - 'subjectOf' => ['Event', 'CreativeWork'], |
|
88 | - 'supersededBy' => ['Class', 'Property', 'Enumeration'], |
|
89 | - 'url' => ['URL'] |
|
90 | - ]; |
|
91 | - } |
|
92 | - |
|
93 | - |
|
94 | - /** |
|
95 | - * @inheritdoc |
|
96 | - */ |
|
97 | - public function getSchemaPropertyDescriptions(): array |
|
98 | - { |
|
99 | - return [ |
|
100 | - 'additionalType' => 'An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the \'typeof\' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally.', |
|
101 | - 'alternateName' => 'An alias for the item.', |
|
102 | - 'description' => 'A description of the item.', |
|
103 | - 'disambiguatingDescription' => 'A sub property of description. A short description of the item used to disambiguate from other, similar items. Information from other properties (in particular, name) may be necessary for the description to be useful for disambiguation.', |
|
104 | - 'identifier' => 'The identifier property represents any kind of identifier for any kind of [[Thing]], such as ISBNs, GTIN codes, UUIDs etc. Schema.org provides dedicated properties for representing many of these, either as textual strings or as URL (URI) links. See [background notes](/docs/datamodel.html#identifierBg) for more details. ', |
|
105 | - 'image' => 'An image of the item. This can be a [[URL]] or a fully described [[ImageObject]].', |
|
106 | - 'mainEntityOfPage' => 'Indicates a page (or other CreativeWork) for which this thing is the main entity being described. See [background notes](/docs/datamodel.html#mainEntityBackground) for details.', |
|
107 | - 'name' => 'The name of the item.', |
|
108 | - 'potentialAction' => 'Indicates a potential Action, which describes an idealized action in which this thing would play an \'object\' role.', |
|
109 | - 'sameAs' => 'URL of a reference Web page that unambiguously indicates the item\'s identity. E.g. the URL of the item\'s Wikipedia page, Wikidata entry, or official website.', |
|
110 | - 'subjectOf' => 'A CreativeWork or Event about this Thing.', |
|
111 | - 'supersededBy' => 'Relates a term (i.e. a property, class or enumeration) to one that supersedes it.', |
|
112 | - 'url' => 'URL of the item.' |
|
113 | - ]; |
|
114 | - } |
|
115 | - |
|
116 | - |
|
117 | - /** |
|
118 | - * @inheritdoc |
|
119 | - */ |
|
120 | - public function getGoogleRequiredSchema(): array |
|
121 | - { |
|
122 | - return ['description', 'name']; |
|
123 | - } |
|
124 | - |
|
125 | - |
|
126 | - /** |
|
127 | - * @inheritdoc |
|
128 | - */ |
|
129 | - public function getGoogleRecommendedSchema(): array |
|
130 | - { |
|
131 | - return ['image', 'url']; |
|
132 | - } |
|
133 | - |
|
134 | - |
|
135 | - /** |
|
136 | - * @inheritdoc |
|
137 | - */ |
|
138 | - public function defineRules(): array |
|
139 | - { |
|
140 | - $rules = parent::defineRules(); |
|
141 | - $rules = array_merge($rules, [ |
|
142 | - [$this->getSchemaPropertyNames(), 'validateJsonSchema'], |
|
143 | - [$this->getGoogleRequiredSchema(), 'required', 'on' => ['google'], 'message' => 'This property is required by Google.'], |
|
144 | - [$this->getGoogleRecommendedSchema(), 'required', 'on' => ['google'], 'message' => 'This property is recommended by Google.'] |
|
145 | - ]); |
|
146 | - |
|
147 | - return $rules; |
|
148 | - } |
|
26 | + use OnlineTrait; |
|
27 | + use GameServerStatusTrait; |
|
28 | + use StatusEnumerationTrait; |
|
29 | + use EnumerationTrait; |
|
30 | + use IntangibleTrait; |
|
31 | + use ThingTrait; |
|
32 | + |
|
33 | + /** |
|
34 | + * The Schema.org Type Name |
|
35 | + * |
|
36 | + * @var string |
|
37 | + */ |
|
38 | + public static $schemaTypeName = 'Online'; |
|
39 | + |
|
40 | + /** |
|
41 | + * The Schema.org Type Scope |
|
42 | + * |
|
43 | + * @var string |
|
44 | + */ |
|
45 | + public static $schemaTypeScope = 'https://schema.org/Online'; |
|
46 | + |
|
47 | + /** |
|
48 | + * The Schema.org Type Extends |
|
49 | + * |
|
50 | + * @var string |
|
51 | + */ |
|
52 | + public static $schemaTypeExtends = 'GameServerStatus'; |
|
53 | + |
|
54 | + /** |
|
55 | + * The Schema.org Type Description |
|
56 | + * |
|
57 | + * @var string |
|
58 | + */ |
|
59 | + public static $schemaTypeDescription = 'Game server status: Online. Server is available.'; |
|
60 | + |
|
61 | + |
|
62 | + /** |
|
63 | + * @inheritdoc |
|
64 | + */ |
|
65 | + public function getSchemaPropertyNames(): array |
|
66 | + { |
|
67 | + return array_keys($this->getSchemaPropertyExpectedTypes()); |
|
68 | + } |
|
69 | + |
|
70 | + |
|
71 | + /** |
|
72 | + * @inheritdoc |
|
73 | + */ |
|
74 | + public function getSchemaPropertyExpectedTypes(): array |
|
75 | + { |
|
76 | + return [ |
|
77 | + 'additionalType' => ['URL'], |
|
78 | + 'alternateName' => ['Text'], |
|
79 | + 'description' => ['Text'], |
|
80 | + 'disambiguatingDescription' => ['Text'], |
|
81 | + 'identifier' => ['PropertyValue', 'URL', 'Text'], |
|
82 | + 'image' => ['URL', 'ImageObject'], |
|
83 | + 'mainEntityOfPage' => ['URL', 'CreativeWork'], |
|
84 | + 'name' => ['Text'], |
|
85 | + 'potentialAction' => ['Action'], |
|
86 | + 'sameAs' => ['URL'], |
|
87 | + 'subjectOf' => ['Event', 'CreativeWork'], |
|
88 | + 'supersededBy' => ['Class', 'Property', 'Enumeration'], |
|
89 | + 'url' => ['URL'] |
|
90 | + ]; |
|
91 | + } |
|
92 | + |
|
93 | + |
|
94 | + /** |
|
95 | + * @inheritdoc |
|
96 | + */ |
|
97 | + public function getSchemaPropertyDescriptions(): array |
|
98 | + { |
|
99 | + return [ |
|
100 | + 'additionalType' => 'An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the \'typeof\' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally.', |
|
101 | + 'alternateName' => 'An alias for the item.', |
|
102 | + 'description' => 'A description of the item.', |
|
103 | + 'disambiguatingDescription' => 'A sub property of description. A short description of the item used to disambiguate from other, similar items. Information from other properties (in particular, name) may be necessary for the description to be useful for disambiguation.', |
|
104 | + 'identifier' => 'The identifier property represents any kind of identifier for any kind of [[Thing]], such as ISBNs, GTIN codes, UUIDs etc. Schema.org provides dedicated properties for representing many of these, either as textual strings or as URL (URI) links. See [background notes](/docs/datamodel.html#identifierBg) for more details. ', |
|
105 | + 'image' => 'An image of the item. This can be a [[URL]] or a fully described [[ImageObject]].', |
|
106 | + 'mainEntityOfPage' => 'Indicates a page (or other CreativeWork) for which this thing is the main entity being described. See [background notes](/docs/datamodel.html#mainEntityBackground) for details.', |
|
107 | + 'name' => 'The name of the item.', |
|
108 | + 'potentialAction' => 'Indicates a potential Action, which describes an idealized action in which this thing would play an \'object\' role.', |
|
109 | + 'sameAs' => 'URL of a reference Web page that unambiguously indicates the item\'s identity. E.g. the URL of the item\'s Wikipedia page, Wikidata entry, or official website.', |
|
110 | + 'subjectOf' => 'A CreativeWork or Event about this Thing.', |
|
111 | + 'supersededBy' => 'Relates a term (i.e. a property, class or enumeration) to one that supersedes it.', |
|
112 | + 'url' => 'URL of the item.' |
|
113 | + ]; |
|
114 | + } |
|
115 | + |
|
116 | + |
|
117 | + /** |
|
118 | + * @inheritdoc |
|
119 | + */ |
|
120 | + public function getGoogleRequiredSchema(): array |
|
121 | + { |
|
122 | + return ['description', 'name']; |
|
123 | + } |
|
124 | + |
|
125 | + |
|
126 | + /** |
|
127 | + * @inheritdoc |
|
128 | + */ |
|
129 | + public function getGoogleRecommendedSchema(): array |
|
130 | + { |
|
131 | + return ['image', 'url']; |
|
132 | + } |
|
133 | + |
|
134 | + |
|
135 | + /** |
|
136 | + * @inheritdoc |
|
137 | + */ |
|
138 | + public function defineRules(): array |
|
139 | + { |
|
140 | + $rules = parent::defineRules(); |
|
141 | + $rules = array_merge($rules, [ |
|
142 | + [$this->getSchemaPropertyNames(), 'validateJsonSchema'], |
|
143 | + [$this->getGoogleRequiredSchema(), 'required', 'on' => ['google'], 'message' => 'This property is required by Google.'], |
|
144 | + [$this->getGoogleRecommendedSchema(), 'required', 'on' => ['google'], 'message' => 'This property is recommended by Google.'] |
|
145 | + ]); |
|
146 | + |
|
147 | + return $rules; |
|
148 | + } |
|
149 | 149 | } |
@@ -25,158 +25,158 @@ |
||
25 | 25 | */ |
26 | 26 | class ReplyAction extends MetaJsonLd implements ReplyActionInterface, CommunicateActionInterface, InteractActionInterface, ActionInterface, ThingInterface |
27 | 27 | { |
28 | - use ReplyActionTrait; |
|
29 | - use CommunicateActionTrait; |
|
30 | - use InteractActionTrait; |
|
31 | - use ActionTrait; |
|
32 | - use ThingTrait; |
|
33 | - |
|
34 | - /** |
|
35 | - * The Schema.org Type Name |
|
36 | - * |
|
37 | - * @var string |
|
38 | - */ |
|
39 | - public static $schemaTypeName = 'ReplyAction'; |
|
40 | - |
|
41 | - /** |
|
42 | - * The Schema.org Type Scope |
|
43 | - * |
|
44 | - * @var string |
|
45 | - */ |
|
46 | - public static $schemaTypeScope = 'https://schema.org/ReplyAction'; |
|
47 | - |
|
48 | - /** |
|
49 | - * The Schema.org Type Extends |
|
50 | - * |
|
51 | - * @var string |
|
52 | - */ |
|
53 | - public static $schemaTypeExtends = 'CommunicateAction'; |
|
54 | - |
|
55 | - /** |
|
56 | - * The Schema.org Type Description |
|
57 | - * |
|
58 | - * @var string |
|
59 | - */ |
|
60 | - public static $schemaTypeDescription = 'The act of responding to a question/message asked/sent by the object. Related to [[AskAction]].\n\nRelated actions:\n\n* [[AskAction]]: Appears generally as an origin of a ReplyAction.'; |
|
61 | - |
|
62 | - |
|
63 | - /** |
|
64 | - * @inheritdoc |
|
65 | - */ |
|
66 | - public function getSchemaPropertyNames(): array |
|
67 | - { |
|
68 | - return array_keys($this->getSchemaPropertyExpectedTypes()); |
|
69 | - } |
|
70 | - |
|
71 | - |
|
72 | - /** |
|
73 | - * @inheritdoc |
|
74 | - */ |
|
75 | - public function getSchemaPropertyExpectedTypes(): array |
|
76 | - { |
|
77 | - return [ |
|
78 | - 'about' => ['Thing'], |
|
79 | - 'actionStatus' => ['ActionStatusType'], |
|
80 | - 'additionalType' => ['URL'], |
|
81 | - 'agent' => ['Organization', 'Person'], |
|
82 | - 'alternateName' => ['Text'], |
|
83 | - 'description' => ['Text'], |
|
84 | - 'disambiguatingDescription' => ['Text'], |
|
85 | - 'endTime' => ['DateTime', 'Time'], |
|
86 | - 'error' => ['Thing'], |
|
87 | - 'identifier' => ['PropertyValue', 'URL', 'Text'], |
|
88 | - 'image' => ['URL', 'ImageObject'], |
|
89 | - 'inLanguage' => ['Text', 'Language'], |
|
90 | - 'instrument' => ['Thing'], |
|
91 | - 'language' => ['Language'], |
|
92 | - 'location' => ['Place', 'Text', 'VirtualLocation', 'PostalAddress'], |
|
93 | - 'mainEntityOfPage' => ['URL', 'CreativeWork'], |
|
94 | - 'name' => ['Text'], |
|
95 | - 'object' => ['Thing'], |
|
96 | - 'participant' => ['Organization', 'Person'], |
|
97 | - 'potentialAction' => ['Action'], |
|
98 | - 'provider' => ['Organization', 'Person'], |
|
99 | - 'recipient' => ['Organization', 'ContactPoint', 'Person', 'Audience'], |
|
100 | - 'result' => ['Thing'], |
|
101 | - 'resultComment' => ['Comment'], |
|
102 | - 'sameAs' => ['URL'], |
|
103 | - 'startTime' => ['Time', 'DateTime'], |
|
104 | - 'subjectOf' => ['Event', 'CreativeWork'], |
|
105 | - 'target' => ['URL', 'EntryPoint'], |
|
106 | - 'url' => ['URL'] |
|
107 | - ]; |
|
108 | - } |
|
109 | - |
|
110 | - |
|
111 | - /** |
|
112 | - * @inheritdoc |
|
113 | - */ |
|
114 | - public function getSchemaPropertyDescriptions(): array |
|
115 | - { |
|
116 | - return [ |
|
117 | - 'about' => 'The subject matter of the content.', |
|
118 | - 'actionStatus' => 'Indicates the current disposition of the Action.', |
|
119 | - 'additionalType' => 'An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the \'typeof\' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally.', |
|
120 | - 'agent' => 'The direct performer or driver of the action (animate or inanimate). E.g. *John* wrote a book.', |
|
121 | - 'alternateName' => 'An alias for the item.', |
|
122 | - 'description' => 'A description of the item.', |
|
123 | - 'disambiguatingDescription' => 'A sub property of description. A short description of the item used to disambiguate from other, similar items. Information from other properties (in particular, name) may be necessary for the description to be useful for disambiguation.', |
|
124 | - 'endTime' => 'The endTime of something. For a reserved event or service (e.g. FoodEstablishmentReservation), the time that it is expected to end. For actions that span a period of time, when the action was performed. E.g. John wrote a book from January to *December*. For media, including audio and video, it\'s the time offset of the end of a clip within a larger file. Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions.', |
|
125 | - 'error' => 'For failed actions, more information on the cause of the failure.', |
|
126 | - 'identifier' => 'The identifier property represents any kind of identifier for any kind of [[Thing]], such as ISBNs, GTIN codes, UUIDs etc. Schema.org provides dedicated properties for representing many of these, either as textual strings or as URL (URI) links. See [background notes](/docs/datamodel.html#identifierBg) for more details. ', |
|
127 | - 'image' => 'An image of the item. This can be a [[URL]] or a fully described [[ImageObject]].', |
|
128 | - 'inLanguage' => 'The language of the content or performance or used in an action. Please use one of the language codes from the [IETF BCP 47 standard](http://tools.ietf.org/html/bcp47). See also [[availableLanguage]].', |
|
129 | - 'instrument' => 'The object that helped the agent perform the action. E.g. John wrote a book with *a pen*.', |
|
130 | - 'language' => 'A sub property of instrument. The language used on this action.', |
|
131 | - 'location' => 'The location of, for example, where an event is happening, where an organization is located, or where an action takes place.', |
|
132 | - 'mainEntityOfPage' => 'Indicates a page (or other CreativeWork) for which this thing is the main entity being described. See [background notes](/docs/datamodel.html#mainEntityBackground) for details.', |
|
133 | - 'name' => 'The name of the item.', |
|
134 | - 'object' => 'The object upon which the action is carried out, whose state is kept intact or changed. Also known as the semantic roles patient, affected or undergoer (which change their state) or theme (which doesn\'t). E.g. John read *a book*.', |
|
135 | - 'participant' => 'Other co-agents that participated in the action indirectly. E.g. John wrote a book with *Steve*.', |
|
136 | - 'potentialAction' => 'Indicates a potential Action, which describes an idealized action in which this thing would play an \'object\' role.', |
|
137 | - 'provider' => 'The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller.', |
|
138 | - 'recipient' => 'A sub property of participant. The participant who is at the receiving end of the action.', |
|
139 | - 'result' => 'The result produced in the action. E.g. John wrote *a book*.', |
|
140 | - 'resultComment' => 'A sub property of result. The Comment created or sent as a result of this action.', |
|
141 | - 'sameAs' => 'URL of a reference Web page that unambiguously indicates the item\'s identity. E.g. the URL of the item\'s Wikipedia page, Wikidata entry, or official website.', |
|
142 | - 'startTime' => 'The startTime of something. For a reserved event or service (e.g. FoodEstablishmentReservation), the time that it is expected to start. For actions that span a period of time, when the action was performed. E.g. John wrote a book from *January* to December. For media, including audio and video, it\'s the time offset of the start of a clip within a larger file. Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions.', |
|
143 | - 'subjectOf' => 'A CreativeWork or Event about this Thing.', |
|
144 | - 'target' => 'Indicates a target EntryPoint, or url, for an Action.', |
|
145 | - 'url' => 'URL of the item.' |
|
146 | - ]; |
|
147 | - } |
|
148 | - |
|
149 | - |
|
150 | - /** |
|
151 | - * @inheritdoc |
|
152 | - */ |
|
153 | - public function getGoogleRequiredSchema(): array |
|
154 | - { |
|
155 | - return ['description', 'name']; |
|
156 | - } |
|
157 | - |
|
158 | - |
|
159 | - /** |
|
160 | - * @inheritdoc |
|
161 | - */ |
|
162 | - public function getGoogleRecommendedSchema(): array |
|
163 | - { |
|
164 | - return ['image', 'url']; |
|
165 | - } |
|
166 | - |
|
167 | - |
|
168 | - /** |
|
169 | - * @inheritdoc |
|
170 | - */ |
|
171 | - public function defineRules(): array |
|
172 | - { |
|
173 | - $rules = parent::defineRules(); |
|
174 | - $rules = array_merge($rules, [ |
|
175 | - [$this->getSchemaPropertyNames(), 'validateJsonSchema'], |
|
176 | - [$this->getGoogleRequiredSchema(), 'required', 'on' => ['google'], 'message' => 'This property is required by Google.'], |
|
177 | - [$this->getGoogleRecommendedSchema(), 'required', 'on' => ['google'], 'message' => 'This property is recommended by Google.'] |
|
178 | - ]); |
|
179 | - |
|
180 | - return $rules; |
|
181 | - } |
|
28 | + use ReplyActionTrait; |
|
29 | + use CommunicateActionTrait; |
|
30 | + use InteractActionTrait; |
|
31 | + use ActionTrait; |
|
32 | + use ThingTrait; |
|
33 | + |
|
34 | + /** |
|
35 | + * The Schema.org Type Name |
|
36 | + * |
|
37 | + * @var string |
|
38 | + */ |
|
39 | + public static $schemaTypeName = 'ReplyAction'; |
|
40 | + |
|
41 | + /** |
|
42 | + * The Schema.org Type Scope |
|
43 | + * |
|
44 | + * @var string |
|
45 | + */ |
|
46 | + public static $schemaTypeScope = 'https://schema.org/ReplyAction'; |
|
47 | + |
|
48 | + /** |
|
49 | + * The Schema.org Type Extends |
|
50 | + * |
|
51 | + * @var string |
|
52 | + */ |
|
53 | + public static $schemaTypeExtends = 'CommunicateAction'; |
|
54 | + |
|
55 | + /** |
|
56 | + * The Schema.org Type Description |
|
57 | + * |
|
58 | + * @var string |
|
59 | + */ |
|
60 | + public static $schemaTypeDescription = 'The act of responding to a question/message asked/sent by the object. Related to [[AskAction]].\n\nRelated actions:\n\n* [[AskAction]]: Appears generally as an origin of a ReplyAction.'; |
|
61 | + |
|
62 | + |
|
63 | + /** |
|
64 | + * @inheritdoc |
|
65 | + */ |
|
66 | + public function getSchemaPropertyNames(): array |
|
67 | + { |
|
68 | + return array_keys($this->getSchemaPropertyExpectedTypes()); |
|
69 | + } |
|
70 | + |
|
71 | + |
|
72 | + /** |
|
73 | + * @inheritdoc |
|
74 | + */ |
|
75 | + public function getSchemaPropertyExpectedTypes(): array |
|
76 | + { |
|
77 | + return [ |
|
78 | + 'about' => ['Thing'], |
|
79 | + 'actionStatus' => ['ActionStatusType'], |
|
80 | + 'additionalType' => ['URL'], |
|
81 | + 'agent' => ['Organization', 'Person'], |
|
82 | + 'alternateName' => ['Text'], |
|
83 | + 'description' => ['Text'], |
|
84 | + 'disambiguatingDescription' => ['Text'], |
|
85 | + 'endTime' => ['DateTime', 'Time'], |
|
86 | + 'error' => ['Thing'], |
|
87 | + 'identifier' => ['PropertyValue', 'URL', 'Text'], |
|
88 | + 'image' => ['URL', 'ImageObject'], |
|
89 | + 'inLanguage' => ['Text', 'Language'], |
|
90 | + 'instrument' => ['Thing'], |
|
91 | + 'language' => ['Language'], |
|
92 | + 'location' => ['Place', 'Text', 'VirtualLocation', 'PostalAddress'], |
|
93 | + 'mainEntityOfPage' => ['URL', 'CreativeWork'], |
|
94 | + 'name' => ['Text'], |
|
95 | + 'object' => ['Thing'], |
|
96 | + 'participant' => ['Organization', 'Person'], |
|
97 | + 'potentialAction' => ['Action'], |
|
98 | + 'provider' => ['Organization', 'Person'], |
|
99 | + 'recipient' => ['Organization', 'ContactPoint', 'Person', 'Audience'], |
|
100 | + 'result' => ['Thing'], |
|
101 | + 'resultComment' => ['Comment'], |
|
102 | + 'sameAs' => ['URL'], |
|
103 | + 'startTime' => ['Time', 'DateTime'], |
|
104 | + 'subjectOf' => ['Event', 'CreativeWork'], |
|
105 | + 'target' => ['URL', 'EntryPoint'], |
|
106 | + 'url' => ['URL'] |
|
107 | + ]; |
|
108 | + } |
|
109 | + |
|
110 | + |
|
111 | + /** |
|
112 | + * @inheritdoc |
|
113 | + */ |
|
114 | + public function getSchemaPropertyDescriptions(): array |
|
115 | + { |
|
116 | + return [ |
|
117 | + 'about' => 'The subject matter of the content.', |
|
118 | + 'actionStatus' => 'Indicates the current disposition of the Action.', |
|
119 | + 'additionalType' => 'An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the \'typeof\' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally.', |
|
120 | + 'agent' => 'The direct performer or driver of the action (animate or inanimate). E.g. *John* wrote a book.', |
|
121 | + 'alternateName' => 'An alias for the item.', |
|
122 | + 'description' => 'A description of the item.', |
|
123 | + 'disambiguatingDescription' => 'A sub property of description. A short description of the item used to disambiguate from other, similar items. Information from other properties (in particular, name) may be necessary for the description to be useful for disambiguation.', |
|
124 | + 'endTime' => 'The endTime of something. For a reserved event or service (e.g. FoodEstablishmentReservation), the time that it is expected to end. For actions that span a period of time, when the action was performed. E.g. John wrote a book from January to *December*. For media, including audio and video, it\'s the time offset of the end of a clip within a larger file. Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions.', |
|
125 | + 'error' => 'For failed actions, more information on the cause of the failure.', |
|
126 | + 'identifier' => 'The identifier property represents any kind of identifier for any kind of [[Thing]], such as ISBNs, GTIN codes, UUIDs etc. Schema.org provides dedicated properties for representing many of these, either as textual strings or as URL (URI) links. See [background notes](/docs/datamodel.html#identifierBg) for more details. ', |
|
127 | + 'image' => 'An image of the item. This can be a [[URL]] or a fully described [[ImageObject]].', |
|
128 | + 'inLanguage' => 'The language of the content or performance or used in an action. Please use one of the language codes from the [IETF BCP 47 standard](http://tools.ietf.org/html/bcp47). See also [[availableLanguage]].', |
|
129 | + 'instrument' => 'The object that helped the agent perform the action. E.g. John wrote a book with *a pen*.', |
|
130 | + 'language' => 'A sub property of instrument. The language used on this action.', |
|
131 | + 'location' => 'The location of, for example, where an event is happening, where an organization is located, or where an action takes place.', |
|
132 | + 'mainEntityOfPage' => 'Indicates a page (or other CreativeWork) for which this thing is the main entity being described. See [background notes](/docs/datamodel.html#mainEntityBackground) for details.', |
|
133 | + 'name' => 'The name of the item.', |
|
134 | + 'object' => 'The object upon which the action is carried out, whose state is kept intact or changed. Also known as the semantic roles patient, affected or undergoer (which change their state) or theme (which doesn\'t). E.g. John read *a book*.', |
|
135 | + 'participant' => 'Other co-agents that participated in the action indirectly. E.g. John wrote a book with *Steve*.', |
|
136 | + 'potentialAction' => 'Indicates a potential Action, which describes an idealized action in which this thing would play an \'object\' role.', |
|
137 | + 'provider' => 'The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller.', |
|
138 | + 'recipient' => 'A sub property of participant. The participant who is at the receiving end of the action.', |
|
139 | + 'result' => 'The result produced in the action. E.g. John wrote *a book*.', |
|
140 | + 'resultComment' => 'A sub property of result. The Comment created or sent as a result of this action.', |
|
141 | + 'sameAs' => 'URL of a reference Web page that unambiguously indicates the item\'s identity. E.g. the URL of the item\'s Wikipedia page, Wikidata entry, or official website.', |
|
142 | + 'startTime' => 'The startTime of something. For a reserved event or service (e.g. FoodEstablishmentReservation), the time that it is expected to start. For actions that span a period of time, when the action was performed. E.g. John wrote a book from *January* to December. For media, including audio and video, it\'s the time offset of the start of a clip within a larger file. Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions.', |
|
143 | + 'subjectOf' => 'A CreativeWork or Event about this Thing.', |
|
144 | + 'target' => 'Indicates a target EntryPoint, or url, for an Action.', |
|
145 | + 'url' => 'URL of the item.' |
|
146 | + ]; |
|
147 | + } |
|
148 | + |
|
149 | + |
|
150 | + /** |
|
151 | + * @inheritdoc |
|
152 | + */ |
|
153 | + public function getGoogleRequiredSchema(): array |
|
154 | + { |
|
155 | + return ['description', 'name']; |
|
156 | + } |
|
157 | + |
|
158 | + |
|
159 | + /** |
|
160 | + * @inheritdoc |
|
161 | + */ |
|
162 | + public function getGoogleRecommendedSchema(): array |
|
163 | + { |
|
164 | + return ['image', 'url']; |
|
165 | + } |
|
166 | + |
|
167 | + |
|
168 | + /** |
|
169 | + * @inheritdoc |
|
170 | + */ |
|
171 | + public function defineRules(): array |
|
172 | + { |
|
173 | + $rules = parent::defineRules(); |
|
174 | + $rules = array_merge($rules, [ |
|
175 | + [$this->getSchemaPropertyNames(), 'validateJsonSchema'], |
|
176 | + [$this->getGoogleRequiredSchema(), 'required', 'on' => ['google'], 'message' => 'This property is required by Google.'], |
|
177 | + [$this->getGoogleRecommendedSchema(), 'required', 'on' => ['google'], 'message' => 'This property is recommended by Google.'] |
|
178 | + ]); |
|
179 | + |
|
180 | + return $rules; |
|
181 | + } |
|
182 | 182 | } |