@@ -23,149 +23,149 @@ |
||
23 | 23 | */ |
24 | 24 | class BloodTest extends MetaJsonLd implements BloodTestInterface, MedicalTestInterface, MedicalEntityInterface, ThingInterface |
25 | 25 | { |
26 | - use BloodTestTrait; |
|
27 | - use MedicalTestTrait; |
|
28 | - use MedicalEntityTrait; |
|
29 | - use ThingTrait; |
|
30 | - |
|
31 | - /** |
|
32 | - * The Schema.org Type Name |
|
33 | - * |
|
34 | - * @var string |
|
35 | - */ |
|
36 | - public static $schemaTypeName = 'BloodTest'; |
|
37 | - |
|
38 | - /** |
|
39 | - * The Schema.org Type Scope |
|
40 | - * |
|
41 | - * @var string |
|
42 | - */ |
|
43 | - public static $schemaTypeScope = 'https://schema.org/BloodTest'; |
|
44 | - |
|
45 | - /** |
|
46 | - * The Schema.org Type Extends |
|
47 | - * |
|
48 | - * @var string |
|
49 | - */ |
|
50 | - public static $schemaTypeExtends = 'MedicalTest'; |
|
51 | - |
|
52 | - /** |
|
53 | - * The Schema.org Type Description |
|
54 | - * |
|
55 | - * @var string |
|
56 | - */ |
|
57 | - public static $schemaTypeDescription = 'A medical test performed on a sample of a patient\'s blood.'; |
|
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 | - 'additionalType' => ['URL'], |
|
76 | - 'affectedBy' => ['Drug'], |
|
77 | - 'alternateName' => ['Text'], |
|
78 | - 'code' => ['MedicalCode'], |
|
79 | - 'description' => ['Text'], |
|
80 | - 'disambiguatingDescription' => ['Text'], |
|
81 | - 'funding' => ['Grant'], |
|
82 | - 'guideline' => ['MedicalGuideline'], |
|
83 | - 'identifier' => ['PropertyValue', 'URL', 'Text'], |
|
84 | - 'image' => ['URL', 'ImageObject'], |
|
85 | - 'legalStatus' => ['Text', 'DrugLegalStatus', 'MedicalEnumeration'], |
|
86 | - 'mainEntityOfPage' => ['URL', 'CreativeWork'], |
|
87 | - 'medicineSystem' => ['MedicineSystem'], |
|
88 | - 'name' => ['Text'], |
|
89 | - 'normalRange' => ['Text', 'MedicalEnumeration'], |
|
90 | - 'potentialAction' => ['Action'], |
|
91 | - 'recognizingAuthority' => ['Organization'], |
|
92 | - 'relevantSpecialty' => ['MedicalSpecialty'], |
|
93 | - 'sameAs' => ['URL'], |
|
94 | - 'signDetected' => ['MedicalSign'], |
|
95 | - 'study' => ['MedicalStudy'], |
|
96 | - 'subjectOf' => ['Event', 'CreativeWork'], |
|
97 | - 'url' => ['URL'], |
|
98 | - 'usedToDiagnose' => ['MedicalCondition'], |
|
99 | - 'usesDevice' => ['MedicalDevice'] |
|
100 | - ]; |
|
101 | - } |
|
102 | - |
|
103 | - |
|
104 | - /** |
|
105 | - * @inheritdoc |
|
106 | - */ |
|
107 | - public function getSchemaPropertyDescriptions(): array |
|
108 | - { |
|
109 | - return [ |
|
110 | - '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.', |
|
111 | - 'affectedBy' => 'Drugs that affect the test\'s results.', |
|
112 | - 'alternateName' => 'An alias for the item.', |
|
113 | - 'code' => 'A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc.', |
|
114 | - 'description' => 'A description of the item.', |
|
115 | - '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.', |
|
116 | - 'funding' => 'A [[Grant]] that directly or indirectly provide funding or sponsorship for this item. See also [[ownershipFundingInfo]].', |
|
117 | - 'guideline' => 'A medical guideline related to this entity.', |
|
118 | - '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. ', |
|
119 | - 'image' => 'An image of the item. This can be a [[URL]] or a fully described [[ImageObject]].', |
|
120 | - 'legalStatus' => 'The drug or supplement\'s legal status, including any controlled substance schedules that apply.', |
|
121 | - '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.', |
|
122 | - 'medicineSystem' => 'The system of medicine that includes this MedicalEntity, for example \'evidence-based\', \'homeopathic\', \'chiropractic\', etc.', |
|
123 | - 'name' => 'The name of the item.', |
|
124 | - 'normalRange' => 'Range of acceptable values for a typical patient, when applicable.', |
|
125 | - 'potentialAction' => 'Indicates a potential Action, which describes an idealized action in which this thing would play an \'object\' role.', |
|
126 | - 'recognizingAuthority' => 'If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine.', |
|
127 | - 'relevantSpecialty' => 'If applicable, a medical specialty in which this entity is relevant.', |
|
128 | - '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.', |
|
129 | - 'signDetected' => 'A sign detected by the test.', |
|
130 | - 'study' => 'A medical study or trial related to this entity.', |
|
131 | - 'subjectOf' => 'A CreativeWork or Event about this Thing.', |
|
132 | - 'url' => 'URL of the item.', |
|
133 | - 'usedToDiagnose' => 'A condition the test is used to diagnose.', |
|
134 | - 'usesDevice' => 'Device used to perform the test.' |
|
135 | - ]; |
|
136 | - } |
|
137 | - |
|
138 | - |
|
139 | - /** |
|
140 | - * @inheritdoc |
|
141 | - */ |
|
142 | - public function getGoogleRequiredSchema(): array |
|
143 | - { |
|
144 | - return ['description', 'name']; |
|
145 | - } |
|
146 | - |
|
147 | - |
|
148 | - /** |
|
149 | - * @inheritdoc |
|
150 | - */ |
|
151 | - public function getGoogleRecommendedSchema(): array |
|
152 | - { |
|
153 | - return ['image', 'url']; |
|
154 | - } |
|
155 | - |
|
156 | - |
|
157 | - /** |
|
158 | - * @inheritdoc |
|
159 | - */ |
|
160 | - public function defineRules(): array |
|
161 | - { |
|
162 | - $rules = parent::defineRules(); |
|
163 | - $rules = array_merge($rules, [ |
|
164 | - [$this->getSchemaPropertyNames(), 'validateJsonSchema'], |
|
165 | - [$this->getGoogleRequiredSchema(), 'required', 'on' => ['google'], 'message' => 'This property is required by Google.'], |
|
166 | - [$this->getGoogleRecommendedSchema(), 'required', 'on' => ['google'], 'message' => 'This property is recommended by Google.'] |
|
167 | - ]); |
|
168 | - |
|
169 | - return $rules; |
|
170 | - } |
|
26 | + use BloodTestTrait; |
|
27 | + use MedicalTestTrait; |
|
28 | + use MedicalEntityTrait; |
|
29 | + use ThingTrait; |
|
30 | + |
|
31 | + /** |
|
32 | + * The Schema.org Type Name |
|
33 | + * |
|
34 | + * @var string |
|
35 | + */ |
|
36 | + public static $schemaTypeName = 'BloodTest'; |
|
37 | + |
|
38 | + /** |
|
39 | + * The Schema.org Type Scope |
|
40 | + * |
|
41 | + * @var string |
|
42 | + */ |
|
43 | + public static $schemaTypeScope = 'https://schema.org/BloodTest'; |
|
44 | + |
|
45 | + /** |
|
46 | + * The Schema.org Type Extends |
|
47 | + * |
|
48 | + * @var string |
|
49 | + */ |
|
50 | + public static $schemaTypeExtends = 'MedicalTest'; |
|
51 | + |
|
52 | + /** |
|
53 | + * The Schema.org Type Description |
|
54 | + * |
|
55 | + * @var string |
|
56 | + */ |
|
57 | + public static $schemaTypeDescription = 'A medical test performed on a sample of a patient\'s blood.'; |
|
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 | + 'additionalType' => ['URL'], |
|
76 | + 'affectedBy' => ['Drug'], |
|
77 | + 'alternateName' => ['Text'], |
|
78 | + 'code' => ['MedicalCode'], |
|
79 | + 'description' => ['Text'], |
|
80 | + 'disambiguatingDescription' => ['Text'], |
|
81 | + 'funding' => ['Grant'], |
|
82 | + 'guideline' => ['MedicalGuideline'], |
|
83 | + 'identifier' => ['PropertyValue', 'URL', 'Text'], |
|
84 | + 'image' => ['URL', 'ImageObject'], |
|
85 | + 'legalStatus' => ['Text', 'DrugLegalStatus', 'MedicalEnumeration'], |
|
86 | + 'mainEntityOfPage' => ['URL', 'CreativeWork'], |
|
87 | + 'medicineSystem' => ['MedicineSystem'], |
|
88 | + 'name' => ['Text'], |
|
89 | + 'normalRange' => ['Text', 'MedicalEnumeration'], |
|
90 | + 'potentialAction' => ['Action'], |
|
91 | + 'recognizingAuthority' => ['Organization'], |
|
92 | + 'relevantSpecialty' => ['MedicalSpecialty'], |
|
93 | + 'sameAs' => ['URL'], |
|
94 | + 'signDetected' => ['MedicalSign'], |
|
95 | + 'study' => ['MedicalStudy'], |
|
96 | + 'subjectOf' => ['Event', 'CreativeWork'], |
|
97 | + 'url' => ['URL'], |
|
98 | + 'usedToDiagnose' => ['MedicalCondition'], |
|
99 | + 'usesDevice' => ['MedicalDevice'] |
|
100 | + ]; |
|
101 | + } |
|
102 | + |
|
103 | + |
|
104 | + /** |
|
105 | + * @inheritdoc |
|
106 | + */ |
|
107 | + public function getSchemaPropertyDescriptions(): array |
|
108 | + { |
|
109 | + return [ |
|
110 | + '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.', |
|
111 | + 'affectedBy' => 'Drugs that affect the test\'s results.', |
|
112 | + 'alternateName' => 'An alias for the item.', |
|
113 | + 'code' => 'A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc.', |
|
114 | + 'description' => 'A description of the item.', |
|
115 | + '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.', |
|
116 | + 'funding' => 'A [[Grant]] that directly or indirectly provide funding or sponsorship for this item. See also [[ownershipFundingInfo]].', |
|
117 | + 'guideline' => 'A medical guideline related to this entity.', |
|
118 | + '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. ', |
|
119 | + 'image' => 'An image of the item. This can be a [[URL]] or a fully described [[ImageObject]].', |
|
120 | + 'legalStatus' => 'The drug or supplement\'s legal status, including any controlled substance schedules that apply.', |
|
121 | + '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.', |
|
122 | + 'medicineSystem' => 'The system of medicine that includes this MedicalEntity, for example \'evidence-based\', \'homeopathic\', \'chiropractic\', etc.', |
|
123 | + 'name' => 'The name of the item.', |
|
124 | + 'normalRange' => 'Range of acceptable values for a typical patient, when applicable.', |
|
125 | + 'potentialAction' => 'Indicates a potential Action, which describes an idealized action in which this thing would play an \'object\' role.', |
|
126 | + 'recognizingAuthority' => 'If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine.', |
|
127 | + 'relevantSpecialty' => 'If applicable, a medical specialty in which this entity is relevant.', |
|
128 | + '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.', |
|
129 | + 'signDetected' => 'A sign detected by the test.', |
|
130 | + 'study' => 'A medical study or trial related to this entity.', |
|
131 | + 'subjectOf' => 'A CreativeWork or Event about this Thing.', |
|
132 | + 'url' => 'URL of the item.', |
|
133 | + 'usedToDiagnose' => 'A condition the test is used to diagnose.', |
|
134 | + 'usesDevice' => 'Device used to perform the test.' |
|
135 | + ]; |
|
136 | + } |
|
137 | + |
|
138 | + |
|
139 | + /** |
|
140 | + * @inheritdoc |
|
141 | + */ |
|
142 | + public function getGoogleRequiredSchema(): array |
|
143 | + { |
|
144 | + return ['description', 'name']; |
|
145 | + } |
|
146 | + |
|
147 | + |
|
148 | + /** |
|
149 | + * @inheritdoc |
|
150 | + */ |
|
151 | + public function getGoogleRecommendedSchema(): array |
|
152 | + { |
|
153 | + return ['image', 'url']; |
|
154 | + } |
|
155 | + |
|
156 | + |
|
157 | + /** |
|
158 | + * @inheritdoc |
|
159 | + */ |
|
160 | + public function defineRules(): array |
|
161 | + { |
|
162 | + $rules = parent::defineRules(); |
|
163 | + $rules = array_merge($rules, [ |
|
164 | + [$this->getSchemaPropertyNames(), 'validateJsonSchema'], |
|
165 | + [$this->getGoogleRequiredSchema(), 'required', 'on' => ['google'], 'message' => 'This property is required by Google.'], |
|
166 | + [$this->getGoogleRecommendedSchema(), 'required', 'on' => ['google'], 'message' => 'This property is recommended by Google.'] |
|
167 | + ]); |
|
168 | + |
|
169 | + return $rules; |
|
170 | + } |
|
171 | 171 | } |
@@ -23,234 +23,234 @@ |
||
23 | 23 | */ |
24 | 24 | class SomeProducts extends MetaJsonLd implements SomeProductsInterface, ProductInterface, ThingInterface |
25 | 25 | { |
26 | - use SomeProductsTrait; |
|
27 | - use ProductTrait; |
|
28 | - use ThingTrait; |
|
26 | + use SomeProductsTrait; |
|
27 | + use ProductTrait; |
|
28 | + use ThingTrait; |
|
29 | 29 | |
30 | - /** |
|
31 | - * The Schema.org Type Name |
|
32 | - * |
|
33 | - * @var string |
|
34 | - */ |
|
35 | - public static $schemaTypeName = 'SomeProducts'; |
|
30 | + /** |
|
31 | + * The Schema.org Type Name |
|
32 | + * |
|
33 | + * @var string |
|
34 | + */ |
|
35 | + public static $schemaTypeName = 'SomeProducts'; |
|
36 | 36 | |
37 | - /** |
|
38 | - * The Schema.org Type Scope |
|
39 | - * |
|
40 | - * @var string |
|
41 | - */ |
|
42 | - public static $schemaTypeScope = 'https://schema.org/SomeProducts'; |
|
37 | + /** |
|
38 | + * The Schema.org Type Scope |
|
39 | + * |
|
40 | + * @var string |
|
41 | + */ |
|
42 | + public static $schemaTypeScope = 'https://schema.org/SomeProducts'; |
|
43 | 43 | |
44 | - /** |
|
45 | - * The Schema.org Type Extends |
|
46 | - * |
|
47 | - * @var string |
|
48 | - */ |
|
49 | - public static $schemaTypeExtends = 'Product'; |
|
44 | + /** |
|
45 | + * The Schema.org Type Extends |
|
46 | + * |
|
47 | + * @var string |
|
48 | + */ |
|
49 | + public static $schemaTypeExtends = 'Product'; |
|
50 | 50 | |
51 | - /** |
|
52 | - * The Schema.org Type Description |
|
53 | - * |
|
54 | - * @var string |
|
55 | - */ |
|
56 | - public static $schemaTypeDescription = 'A placeholder for multiple similar products of the same kind.'; |
|
51 | + /** |
|
52 | + * The Schema.org Type Description |
|
53 | + * |
|
54 | + * @var string |
|
55 | + */ |
|
56 | + public static $schemaTypeDescription = 'A placeholder for multiple similar products of the same kind.'; |
|
57 | 57 | |
58 | 58 | |
59 | - /** |
|
60 | - * @inheritdoc |
|
61 | - */ |
|
62 | - public function getSchemaPropertyNames(): array |
|
63 | - { |
|
64 | - return array_keys($this->getSchemaPropertyExpectedTypes()); |
|
65 | - } |
|
59 | + /** |
|
60 | + * @inheritdoc |
|
61 | + */ |
|
62 | + public function getSchemaPropertyNames(): array |
|
63 | + { |
|
64 | + return array_keys($this->getSchemaPropertyExpectedTypes()); |
|
65 | + } |
|
66 | 66 | |
67 | 67 | |
68 | - /** |
|
69 | - * @inheritdoc |
|
70 | - */ |
|
71 | - public function getSchemaPropertyExpectedTypes(): array |
|
72 | - { |
|
73 | - return [ |
|
74 | - 'additionalProperty' => ['PropertyValue'], |
|
75 | - 'additionalType' => ['URL'], |
|
76 | - 'aggregateRating' => ['AggregateRating'], |
|
77 | - 'alternateName' => ['Text'], |
|
78 | - 'asin' => ['Text', 'URL'], |
|
79 | - 'audience' => ['Audience'], |
|
80 | - 'award' => ['Text'], |
|
81 | - 'awards' => ['Text'], |
|
82 | - 'brand' => ['Brand', 'Organization'], |
|
83 | - 'category' => ['URL', 'CategoryCode', 'Text', 'Thing', 'PhysicalActivityCategory'], |
|
84 | - 'color' => ['Text'], |
|
85 | - 'countryOfAssembly' => ['Text'], |
|
86 | - 'countryOfLastProcessing' => ['Text'], |
|
87 | - 'countryOfOrigin' => ['Country'], |
|
88 | - 'depth' => ['QuantitativeValue', 'Distance'], |
|
89 | - 'description' => ['Text'], |
|
90 | - 'disambiguatingDescription' => ['Text'], |
|
91 | - 'funding' => ['Grant'], |
|
92 | - 'gtin' => ['Text', 'URL'], |
|
93 | - 'gtin12' => ['Text'], |
|
94 | - 'gtin13' => ['Text'], |
|
95 | - 'gtin14' => ['Text'], |
|
96 | - 'gtin8' => ['Text'], |
|
97 | - 'hasAdultConsideration' => ['AdultOrientedEnumeration'], |
|
98 | - 'hasEnergyConsumptionDetails' => ['EnergyConsumptionDetails'], |
|
99 | - 'hasMeasurement' => ['QuantitativeValue'], |
|
100 | - 'hasMerchantReturnPolicy' => ['MerchantReturnPolicy'], |
|
101 | - 'height' => ['QuantitativeValue', 'Distance'], |
|
102 | - 'identifier' => ['PropertyValue', 'URL', 'Text'], |
|
103 | - 'image' => ['URL', 'ImageObject'], |
|
104 | - 'inProductGroupWithID' => ['Text'], |
|
105 | - 'inventoryLevel' => ['QuantitativeValue'], |
|
106 | - 'isAccessoryOrSparePartFor' => ['Product'], |
|
107 | - 'isConsumableFor' => ['Product'], |
|
108 | - 'isFamilyFriendly' => ['Boolean'], |
|
109 | - 'isRelatedTo' => ['Product', 'Service'], |
|
110 | - 'isSimilarTo' => ['Product', 'Service'], |
|
111 | - 'isVariantOf' => ['ProductModel', 'ProductGroup'], |
|
112 | - 'itemCondition' => ['OfferItemCondition'], |
|
113 | - 'keywords' => ['URL', 'DefinedTerm', 'Text'], |
|
114 | - 'logo' => ['ImageObject', 'URL'], |
|
115 | - 'mainEntityOfPage' => ['URL', 'CreativeWork'], |
|
116 | - 'manufacturer' => ['Organization'], |
|
117 | - 'material' => ['Product', 'URL', 'Text'], |
|
118 | - 'mobileUrl' => ['Text'], |
|
119 | - 'model' => ['ProductModel', 'Text'], |
|
120 | - 'mpn' => ['Text'], |
|
121 | - 'name' => ['Text'], |
|
122 | - 'negativeNotes' => ['ListItem', 'Text', 'ItemList', 'WebContent'], |
|
123 | - 'nsn' => ['Text'], |
|
124 | - 'offers' => ['Demand', 'Offer'], |
|
125 | - 'pattern' => ['DefinedTerm', 'Text'], |
|
126 | - 'positiveNotes' => ['Text', 'WebContent', 'ListItem', 'ItemList'], |
|
127 | - 'potentialAction' => ['Action'], |
|
128 | - 'productID' => ['Text'], |
|
129 | - 'productionDate' => ['Date'], |
|
130 | - 'purchaseDate' => ['Date'], |
|
131 | - 'releaseDate' => ['Date'], |
|
132 | - 'review' => ['Review'], |
|
133 | - 'reviews' => ['Review'], |
|
134 | - 'sameAs' => ['URL'], |
|
135 | - 'size' => ['DefinedTerm', 'QuantitativeValue', 'Text', 'SizeSpecification'], |
|
136 | - 'sku' => ['Text'], |
|
137 | - 'slogan' => ['Text'], |
|
138 | - 'subjectOf' => ['Event', 'CreativeWork'], |
|
139 | - 'url' => ['URL'], |
|
140 | - 'weight' => ['QuantitativeValue'], |
|
141 | - 'width' => ['Distance', 'QuantitativeValue'] |
|
142 | - ]; |
|
143 | - } |
|
68 | + /** |
|
69 | + * @inheritdoc |
|
70 | + */ |
|
71 | + public function getSchemaPropertyExpectedTypes(): array |
|
72 | + { |
|
73 | + return [ |
|
74 | + 'additionalProperty' => ['PropertyValue'], |
|
75 | + 'additionalType' => ['URL'], |
|
76 | + 'aggregateRating' => ['AggregateRating'], |
|
77 | + 'alternateName' => ['Text'], |
|
78 | + 'asin' => ['Text', 'URL'], |
|
79 | + 'audience' => ['Audience'], |
|
80 | + 'award' => ['Text'], |
|
81 | + 'awards' => ['Text'], |
|
82 | + 'brand' => ['Brand', 'Organization'], |
|
83 | + 'category' => ['URL', 'CategoryCode', 'Text', 'Thing', 'PhysicalActivityCategory'], |
|
84 | + 'color' => ['Text'], |
|
85 | + 'countryOfAssembly' => ['Text'], |
|
86 | + 'countryOfLastProcessing' => ['Text'], |
|
87 | + 'countryOfOrigin' => ['Country'], |
|
88 | + 'depth' => ['QuantitativeValue', 'Distance'], |
|
89 | + 'description' => ['Text'], |
|
90 | + 'disambiguatingDescription' => ['Text'], |
|
91 | + 'funding' => ['Grant'], |
|
92 | + 'gtin' => ['Text', 'URL'], |
|
93 | + 'gtin12' => ['Text'], |
|
94 | + 'gtin13' => ['Text'], |
|
95 | + 'gtin14' => ['Text'], |
|
96 | + 'gtin8' => ['Text'], |
|
97 | + 'hasAdultConsideration' => ['AdultOrientedEnumeration'], |
|
98 | + 'hasEnergyConsumptionDetails' => ['EnergyConsumptionDetails'], |
|
99 | + 'hasMeasurement' => ['QuantitativeValue'], |
|
100 | + 'hasMerchantReturnPolicy' => ['MerchantReturnPolicy'], |
|
101 | + 'height' => ['QuantitativeValue', 'Distance'], |
|
102 | + 'identifier' => ['PropertyValue', 'URL', 'Text'], |
|
103 | + 'image' => ['URL', 'ImageObject'], |
|
104 | + 'inProductGroupWithID' => ['Text'], |
|
105 | + 'inventoryLevel' => ['QuantitativeValue'], |
|
106 | + 'isAccessoryOrSparePartFor' => ['Product'], |
|
107 | + 'isConsumableFor' => ['Product'], |
|
108 | + 'isFamilyFriendly' => ['Boolean'], |
|
109 | + 'isRelatedTo' => ['Product', 'Service'], |
|
110 | + 'isSimilarTo' => ['Product', 'Service'], |
|
111 | + 'isVariantOf' => ['ProductModel', 'ProductGroup'], |
|
112 | + 'itemCondition' => ['OfferItemCondition'], |
|
113 | + 'keywords' => ['URL', 'DefinedTerm', 'Text'], |
|
114 | + 'logo' => ['ImageObject', 'URL'], |
|
115 | + 'mainEntityOfPage' => ['URL', 'CreativeWork'], |
|
116 | + 'manufacturer' => ['Organization'], |
|
117 | + 'material' => ['Product', 'URL', 'Text'], |
|
118 | + 'mobileUrl' => ['Text'], |
|
119 | + 'model' => ['ProductModel', 'Text'], |
|
120 | + 'mpn' => ['Text'], |
|
121 | + 'name' => ['Text'], |
|
122 | + 'negativeNotes' => ['ListItem', 'Text', 'ItemList', 'WebContent'], |
|
123 | + 'nsn' => ['Text'], |
|
124 | + 'offers' => ['Demand', 'Offer'], |
|
125 | + 'pattern' => ['DefinedTerm', 'Text'], |
|
126 | + 'positiveNotes' => ['Text', 'WebContent', 'ListItem', 'ItemList'], |
|
127 | + 'potentialAction' => ['Action'], |
|
128 | + 'productID' => ['Text'], |
|
129 | + 'productionDate' => ['Date'], |
|
130 | + 'purchaseDate' => ['Date'], |
|
131 | + 'releaseDate' => ['Date'], |
|
132 | + 'review' => ['Review'], |
|
133 | + 'reviews' => ['Review'], |
|
134 | + 'sameAs' => ['URL'], |
|
135 | + 'size' => ['DefinedTerm', 'QuantitativeValue', 'Text', 'SizeSpecification'], |
|
136 | + 'sku' => ['Text'], |
|
137 | + 'slogan' => ['Text'], |
|
138 | + 'subjectOf' => ['Event', 'CreativeWork'], |
|
139 | + 'url' => ['URL'], |
|
140 | + 'weight' => ['QuantitativeValue'], |
|
141 | + 'width' => ['Distance', 'QuantitativeValue'] |
|
142 | + ]; |
|
143 | + } |
|
144 | 144 | |
145 | 145 | |
146 | - /** |
|
147 | - * @inheritdoc |
|
148 | - */ |
|
149 | - public function getSchemaPropertyDescriptions(): array |
|
150 | - { |
|
151 | - return [ |
|
152 | - '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. ', |
|
153 | - '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.', |
|
154 | - 'aggregateRating' => 'The overall rating, based on a collection of reviews or ratings, of the item.', |
|
155 | - 'alternateName' => 'An alias for the item.', |
|
156 | - 'asin' => 'An Amazon Standard Identification Number (ASIN) is a 10-character alphanumeric unique identifier assigned by Amazon.com and its partners for product identification within the Amazon organization (summary from [Wikipedia](https://en.wikipedia.org/wiki/Amazon_Standard_Identification_Number)\'s article). Note also that this is a definition for how to include ASINs in Schema.org data, and not a definition of ASINs in general - see documentation from Amazon for authoritative details. ASINs are most commonly encoded as text strings, but the [asin] property supports URL/URI as potential values too.', |
|
157 | - 'audience' => 'An intended audience, i.e. a group for whom something was created.', |
|
158 | - 'award' => 'An award won by or for this item.', |
|
159 | - 'awards' => 'Awards won by or for this item.', |
|
160 | - 'brand' => 'The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person.', |
|
161 | - 'category' => 'A category for the item. Greater signs or slashes can be used to informally indicate a category hierarchy.', |
|
162 | - 'color' => 'The color of the product.', |
|
163 | - 'countryOfAssembly' => 'The place where the product was assembled.', |
|
164 | - 'countryOfLastProcessing' => 'The place where the item (typically [[Product]]) was last processed and tested before importation.', |
|
165 | - 'countryOfOrigin' => 'The country of origin of something, including products as well as creative works such as movie and TV content. In the case of TV and movie, this would be the country of the principle offices of the production company or individual responsible for the movie. For other kinds of [[CreativeWork]] it is difficult to provide fully general guidance, and properties such as [[contentLocation]] and [[locationCreated]] may be more applicable. In the case of products, the country of origin of the product. The exact interpretation of this may vary by context and product type, and cannot be fully enumerated here.', |
|
166 | - 'depth' => 'The depth of the item.', |
|
167 | - 'description' => 'A description of the item.', |
|
168 | - '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.', |
|
169 | - 'funding' => 'A [[Grant]] that directly or indirectly provide funding or sponsorship for this item. See also [[ownershipFundingInfo]].', |
|
170 | - 'gtin' => 'A Global Trade Item Number ([GTIN](https://www.gs1.org/standards/id-keys/gtin)). GTINs identify trade items, including products and services, using numeric identification codes. The GS1 [digital link specifications](https://www.gs1.org/standards/Digital-Link/) express GTINs as URLs (URIs, IRIs, etc.). Details including regular expression examples can be found in, Section 6 of the GS1 URI Syntax specification; see also [schema.org tracking issue](https://github.com/schemaorg/schemaorg/issues/3156#issuecomment-1209522809) for schema.org-specific discussion. A correct [[gtin]] value should be a valid GTIN, which means that it should be an all-numeric string of either 8, 12, 13 or 14 digits, or a "GS1 Digital Link" URL based on such a string. The numeric component should also have a [valid GS1 check digit](https://www.gs1.org/services/check-digit-calculator) and meet the other rules for valid GTINs. See also [GS1\'s GTIN Summary](http://www.gs1.org/barcodes/technical/idkeys/gtin) and [Wikipedia](https://en.wikipedia.org/wiki/Global_Trade_Item_Number) for more details. Left-padding of the gtin values is not required or encouraged. The [[gtin]] property generalizes the earlier [[gtin8]], [[gtin12]], [[gtin13]], and [[gtin14]] properties. Note also that this is a definition for how to include GTINs in Schema.org data, and not a definition of GTINs in general - see the GS1 documentation for authoritative details.', |
|
171 | - 'gtin12' => 'The GTIN-12 code of the product, or the product to which the offer refers. The GTIN-12 is the 12-digit GS1 Identification Key composed of a U.P.C. Company Prefix, Item Reference, and Check Digit used to identify trade items. See [GS1 GTIN Summary](http://www.gs1.org/barcodes/technical/idkeys/gtin) for more details.', |
|
172 | - 'gtin13' => 'The GTIN-13 code of the product, or the product to which the offer refers. This is equivalent to 13-digit ISBN codes and EAN UCC-13. Former 12-digit UPC codes can be converted into a GTIN-13 code by simply adding a preceding zero. See [GS1 GTIN Summary](http://www.gs1.org/barcodes/technical/idkeys/gtin) for more details.', |
|
173 | - 'gtin14' => 'The GTIN-14 code of the product, or the product to which the offer refers. See [GS1 GTIN Summary](http://www.gs1.org/barcodes/technical/idkeys/gtin) for more details.', |
|
174 | - 'gtin8' => 'The GTIN-8 code of the product, or the product to which the offer refers. This code is also known as EAN/UCC-8 or 8-digit EAN. See [GS1 GTIN Summary](http://www.gs1.org/barcodes/technical/idkeys/gtin) for more details.', |
|
175 | - 'hasAdultConsideration' => 'Used to tag an item to be intended or suitable for consumption or use by adults only.', |
|
176 | - 'hasEnergyConsumptionDetails' => 'Defines the energy efficiency Category (also known as "class" or "rating") for a product according to an international energy efficiency standard.', |
|
177 | - 'hasMeasurement' => 'A product measurement, for example the inseam of pants, the wheel size of a bicycle, or the gauge of a screw. Usually an exact measurement, but can also be a range of measurements for adjustable products, for example belts and ski bindings.', |
|
178 | - 'hasMerchantReturnPolicy' => 'Specifies a MerchantReturnPolicy that may be applicable.', |
|
179 | - 'height' => 'The height of the item.', |
|
180 | - '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. ', |
|
181 | - 'image' => 'An image of the item. This can be a [[URL]] or a fully described [[ImageObject]].', |
|
182 | - 'inProductGroupWithID' => 'Indicates the [[productGroupID]] for a [[ProductGroup]] that this product [[isVariantOf]]. ', |
|
183 | - 'inventoryLevel' => 'The current approximate inventory level for the item or items.', |
|
184 | - 'isAccessoryOrSparePartFor' => 'A pointer to another product (or multiple products) for which this product is an accessory or spare part.', |
|
185 | - 'isConsumableFor' => 'A pointer to another product (or multiple products) for which this product is a consumable.', |
|
186 | - 'isFamilyFriendly' => 'Indicates whether this content is family friendly.', |
|
187 | - 'isRelatedTo' => 'A pointer to another, somehow related product (or multiple products).', |
|
188 | - 'isSimilarTo' => 'A pointer to another, functionally similar product (or multiple products).', |
|
189 | - 'isVariantOf' => 'Indicates the kind of product that this is a variant of. In the case of [[ProductModel]], this is a pointer (from a ProductModel) to a base product from which this product is a variant. It is safe to infer that the variant inherits all product features from the base model, unless defined locally. This is not transitive. In the case of a [[ProductGroup]], the group description also serves as a template, representing a set of Products that vary on explicitly defined, specific dimensions only (so it defines both a set of variants, as well as which values distinguish amongst those variants). When used with [[ProductGroup]], this property can apply to any [[Product]] included in the group.', |
|
190 | - 'itemCondition' => 'A predefined value from OfferItemCondition specifying the condition of the product or service, or the products or services included in the offer. Also used for product return policies to specify the condition of products accepted for returns.', |
|
191 | - '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.', |
|
192 | - 'logo' => 'An associated logo.', |
|
193 | - '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.', |
|
194 | - 'manufacturer' => 'The manufacturer of the product.', |
|
195 | - 'material' => 'A material that something is made from, e.g. leather, wool, cotton, paper.', |
|
196 | - 'mobileUrl' => 'The [[mobileUrl]] property is provided for specific situations in which data consumers need to determine whether one of several provided URLs is a dedicated \'mobile site\'. To discourage over-use, and reflecting intial usecases, the property is expected only on [[Product]] and [[Offer]], rather than [[Thing]]. The general trend in web technology is towards [responsive design](https://en.wikipedia.org/wiki/Responsive_web_design) in which content can be flexibly adapted to a wide range of browsing environments. Pages and sites referenced with the long-established [[url]] property should ideally also be usable on a wide variety of devices, including mobile phones. In most cases, it would be pointless and counter productive to attempt to update all [[url]] markup to use [[mobileUrl]] for more mobile-oriented pages. The property is intended for the case when items (primarily [[Product]] and [[Offer]]) have extra URLs hosted on an additional "mobile site" alongside the main one. It should not be taken as an endorsement of this publication style. ', |
|
197 | - 'model' => 'The model of the product. Use with the URL of a ProductModel or a textual representation of the model identifier. The URL of the ProductModel can be from an external source. It is recommended to additionally provide strong product identifiers via the gtin8/gtin13/gtin14 and mpn properties.', |
|
198 | - 'mpn' => 'The Manufacturer Part Number (MPN) of the product, or the product to which the offer refers.', |
|
199 | - 'name' => 'The name of the item.', |
|
200 | - 'negativeNotes' => 'Provides negative considerations regarding something, most typically in pro/con lists for reviews (alongside [[positiveNotes]]). For symmetry In the case of a [[Review]], the property describes the [[itemReviewed]] from the perspective of the review; in the case of a [[Product]], the product itself is being described. Since product descriptions tend to emphasise positive claims, it may be relatively unusual to find [[negativeNotes]] used in this way. Nevertheless for the sake of symmetry, [[negativeNotes]] can be used on [[Product]]. The property values can be expressed either as unstructured text (repeated as necessary), or if ordered, as a list (in which case the most negative is at the beginning of the list).', |
|
201 | - 'nsn' => 'Indicates the [NATO stock number](https://en.wikipedia.org/wiki/NATO_Stock_Number) (nsn) of a [[Product]]. ', |
|
202 | - 'offers' => 'An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, perform a service, or give away tickets to an event. Use [[businessFunction]] to indicate the kind of transaction offered, i.e. sell, lease, etc. This property can also be used to describe a [[Demand]]. While this property is listed as expected on a number of common types, it can be used in others. In that case, using a second type, such as Product or a subtype of Product, can clarify the nature of the offer. ', |
|
203 | - 'pattern' => 'A pattern that something has, for example \'polka dot\', \'striped\', \'Canadian flag\'. Values are typically expressed as text, although links to controlled value schemes are also supported.', |
|
204 | - 'positiveNotes' => 'Provides positive considerations regarding something, for example product highlights or (alongside [[negativeNotes]]) pro/con lists for reviews. In the case of a [[Review]], the property describes the [[itemReviewed]] from the perspective of the review; in the case of a [[Product]], the product itself is being described. The property values can be expressed either as unstructured text (repeated as necessary), or if ordered, as a list (in which case the most positive is at the beginning of the list).', |
|
205 | - 'potentialAction' => 'Indicates a potential Action, which describes an idealized action in which this thing would play an \'object\' role.', |
|
206 | - 'productID' => 'The product identifier, such as ISBN. For example: ``` meta itemprop="productID" content="isbn:123-456-789" ```.', |
|
207 | - 'productionDate' => 'The date of production of the item, e.g. vehicle.', |
|
208 | - 'purchaseDate' => 'The date the item, e.g. vehicle, was purchased by the current owner.', |
|
209 | - 'releaseDate' => 'The release date of a product or product model. This can be used to distinguish the exact variant of a product.', |
|
210 | - 'review' => 'A review of the item.', |
|
211 | - 'reviews' => 'Review of the item.', |
|
212 | - '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.', |
|
213 | - 'size' => 'A standardized size of a product or creative work, specified either through a simple textual string (for example \'XL\', \'32Wx34L\'), a QuantitativeValue with a unitCode, or a comprehensive and structured [[SizeSpecification]]; in other cases, the [[width]], [[height]], [[depth]] and [[weight]] properties may be more applicable. ', |
|
214 | - 'sku' => 'The Stock Keeping Unit (SKU), i.e. a merchant-specific identifier for a product or service, or the product to which the offer refers.', |
|
215 | - 'slogan' => 'A slogan or motto associated with the item.', |
|
216 | - 'subjectOf' => 'A CreativeWork or Event about this Thing.', |
|
217 | - 'url' => 'URL of the item.', |
|
218 | - 'weight' => 'The weight of the product or person.', |
|
219 | - 'width' => 'The width of the item.' |
|
220 | - ]; |
|
221 | - } |
|
146 | + /** |
|
147 | + * @inheritdoc |
|
148 | + */ |
|
149 | + public function getSchemaPropertyDescriptions(): array |
|
150 | + { |
|
151 | + return [ |
|
152 | + '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. ', |
|
153 | + '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.', |
|
154 | + 'aggregateRating' => 'The overall rating, based on a collection of reviews or ratings, of the item.', |
|
155 | + 'alternateName' => 'An alias for the item.', |
|
156 | + 'asin' => 'An Amazon Standard Identification Number (ASIN) is a 10-character alphanumeric unique identifier assigned by Amazon.com and its partners for product identification within the Amazon organization (summary from [Wikipedia](https://en.wikipedia.org/wiki/Amazon_Standard_Identification_Number)\'s article). Note also that this is a definition for how to include ASINs in Schema.org data, and not a definition of ASINs in general - see documentation from Amazon for authoritative details. ASINs are most commonly encoded as text strings, but the [asin] property supports URL/URI as potential values too.', |
|
157 | + 'audience' => 'An intended audience, i.e. a group for whom something was created.', |
|
158 | + 'award' => 'An award won by or for this item.', |
|
159 | + 'awards' => 'Awards won by or for this item.', |
|
160 | + 'brand' => 'The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person.', |
|
161 | + 'category' => 'A category for the item. Greater signs or slashes can be used to informally indicate a category hierarchy.', |
|
162 | + 'color' => 'The color of the product.', |
|
163 | + 'countryOfAssembly' => 'The place where the product was assembled.', |
|
164 | + 'countryOfLastProcessing' => 'The place where the item (typically [[Product]]) was last processed and tested before importation.', |
|
165 | + 'countryOfOrigin' => 'The country of origin of something, including products as well as creative works such as movie and TV content. In the case of TV and movie, this would be the country of the principle offices of the production company or individual responsible for the movie. For other kinds of [[CreativeWork]] it is difficult to provide fully general guidance, and properties such as [[contentLocation]] and [[locationCreated]] may be more applicable. In the case of products, the country of origin of the product. The exact interpretation of this may vary by context and product type, and cannot be fully enumerated here.', |
|
166 | + 'depth' => 'The depth of the item.', |
|
167 | + 'description' => 'A description of the item.', |
|
168 | + '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.', |
|
169 | + 'funding' => 'A [[Grant]] that directly or indirectly provide funding or sponsorship for this item. See also [[ownershipFundingInfo]].', |
|
170 | + 'gtin' => 'A Global Trade Item Number ([GTIN](https://www.gs1.org/standards/id-keys/gtin)). GTINs identify trade items, including products and services, using numeric identification codes. The GS1 [digital link specifications](https://www.gs1.org/standards/Digital-Link/) express GTINs as URLs (URIs, IRIs, etc.). Details including regular expression examples can be found in, Section 6 of the GS1 URI Syntax specification; see also [schema.org tracking issue](https://github.com/schemaorg/schemaorg/issues/3156#issuecomment-1209522809) for schema.org-specific discussion. A correct [[gtin]] value should be a valid GTIN, which means that it should be an all-numeric string of either 8, 12, 13 or 14 digits, or a "GS1 Digital Link" URL based on such a string. The numeric component should also have a [valid GS1 check digit](https://www.gs1.org/services/check-digit-calculator) and meet the other rules for valid GTINs. See also [GS1\'s GTIN Summary](http://www.gs1.org/barcodes/technical/idkeys/gtin) and [Wikipedia](https://en.wikipedia.org/wiki/Global_Trade_Item_Number) for more details. Left-padding of the gtin values is not required or encouraged. The [[gtin]] property generalizes the earlier [[gtin8]], [[gtin12]], [[gtin13]], and [[gtin14]] properties. Note also that this is a definition for how to include GTINs in Schema.org data, and not a definition of GTINs in general - see the GS1 documentation for authoritative details.', |
|
171 | + 'gtin12' => 'The GTIN-12 code of the product, or the product to which the offer refers. The GTIN-12 is the 12-digit GS1 Identification Key composed of a U.P.C. Company Prefix, Item Reference, and Check Digit used to identify trade items. See [GS1 GTIN Summary](http://www.gs1.org/barcodes/technical/idkeys/gtin) for more details.', |
|
172 | + 'gtin13' => 'The GTIN-13 code of the product, or the product to which the offer refers. This is equivalent to 13-digit ISBN codes and EAN UCC-13. Former 12-digit UPC codes can be converted into a GTIN-13 code by simply adding a preceding zero. See [GS1 GTIN Summary](http://www.gs1.org/barcodes/technical/idkeys/gtin) for more details.', |
|
173 | + 'gtin14' => 'The GTIN-14 code of the product, or the product to which the offer refers. See [GS1 GTIN Summary](http://www.gs1.org/barcodes/technical/idkeys/gtin) for more details.', |
|
174 | + 'gtin8' => 'The GTIN-8 code of the product, or the product to which the offer refers. This code is also known as EAN/UCC-8 or 8-digit EAN. See [GS1 GTIN Summary](http://www.gs1.org/barcodes/technical/idkeys/gtin) for more details.', |
|
175 | + 'hasAdultConsideration' => 'Used to tag an item to be intended or suitable for consumption or use by adults only.', |
|
176 | + 'hasEnergyConsumptionDetails' => 'Defines the energy efficiency Category (also known as "class" or "rating") for a product according to an international energy efficiency standard.', |
|
177 | + 'hasMeasurement' => 'A product measurement, for example the inseam of pants, the wheel size of a bicycle, or the gauge of a screw. Usually an exact measurement, but can also be a range of measurements for adjustable products, for example belts and ski bindings.', |
|
178 | + 'hasMerchantReturnPolicy' => 'Specifies a MerchantReturnPolicy that may be applicable.', |
|
179 | + 'height' => 'The height of the item.', |
|
180 | + '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. ', |
|
181 | + 'image' => 'An image of the item. This can be a [[URL]] or a fully described [[ImageObject]].', |
|
182 | + 'inProductGroupWithID' => 'Indicates the [[productGroupID]] for a [[ProductGroup]] that this product [[isVariantOf]]. ', |
|
183 | + 'inventoryLevel' => 'The current approximate inventory level for the item or items.', |
|
184 | + 'isAccessoryOrSparePartFor' => 'A pointer to another product (or multiple products) for which this product is an accessory or spare part.', |
|
185 | + 'isConsumableFor' => 'A pointer to another product (or multiple products) for which this product is a consumable.', |
|
186 | + 'isFamilyFriendly' => 'Indicates whether this content is family friendly.', |
|
187 | + 'isRelatedTo' => 'A pointer to another, somehow related product (or multiple products).', |
|
188 | + 'isSimilarTo' => 'A pointer to another, functionally similar product (or multiple products).', |
|
189 | + 'isVariantOf' => 'Indicates the kind of product that this is a variant of. In the case of [[ProductModel]], this is a pointer (from a ProductModel) to a base product from which this product is a variant. It is safe to infer that the variant inherits all product features from the base model, unless defined locally. This is not transitive. In the case of a [[ProductGroup]], the group description also serves as a template, representing a set of Products that vary on explicitly defined, specific dimensions only (so it defines both a set of variants, as well as which values distinguish amongst those variants). When used with [[ProductGroup]], this property can apply to any [[Product]] included in the group.', |
|
190 | + 'itemCondition' => 'A predefined value from OfferItemCondition specifying the condition of the product or service, or the products or services included in the offer. Also used for product return policies to specify the condition of products accepted for returns.', |
|
191 | + '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.', |
|
192 | + 'logo' => 'An associated logo.', |
|
193 | + '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.', |
|
194 | + 'manufacturer' => 'The manufacturer of the product.', |
|
195 | + 'material' => 'A material that something is made from, e.g. leather, wool, cotton, paper.', |
|
196 | + 'mobileUrl' => 'The [[mobileUrl]] property is provided for specific situations in which data consumers need to determine whether one of several provided URLs is a dedicated \'mobile site\'. To discourage over-use, and reflecting intial usecases, the property is expected only on [[Product]] and [[Offer]], rather than [[Thing]]. The general trend in web technology is towards [responsive design](https://en.wikipedia.org/wiki/Responsive_web_design) in which content can be flexibly adapted to a wide range of browsing environments. Pages and sites referenced with the long-established [[url]] property should ideally also be usable on a wide variety of devices, including mobile phones. In most cases, it would be pointless and counter productive to attempt to update all [[url]] markup to use [[mobileUrl]] for more mobile-oriented pages. The property is intended for the case when items (primarily [[Product]] and [[Offer]]) have extra URLs hosted on an additional "mobile site" alongside the main one. It should not be taken as an endorsement of this publication style. ', |
|
197 | + 'model' => 'The model of the product. Use with the URL of a ProductModel or a textual representation of the model identifier. The URL of the ProductModel can be from an external source. It is recommended to additionally provide strong product identifiers via the gtin8/gtin13/gtin14 and mpn properties.', |
|
198 | + 'mpn' => 'The Manufacturer Part Number (MPN) of the product, or the product to which the offer refers.', |
|
199 | + 'name' => 'The name of the item.', |
|
200 | + 'negativeNotes' => 'Provides negative considerations regarding something, most typically in pro/con lists for reviews (alongside [[positiveNotes]]). For symmetry In the case of a [[Review]], the property describes the [[itemReviewed]] from the perspective of the review; in the case of a [[Product]], the product itself is being described. Since product descriptions tend to emphasise positive claims, it may be relatively unusual to find [[negativeNotes]] used in this way. Nevertheless for the sake of symmetry, [[negativeNotes]] can be used on [[Product]]. The property values can be expressed either as unstructured text (repeated as necessary), or if ordered, as a list (in which case the most negative is at the beginning of the list).', |
|
201 | + 'nsn' => 'Indicates the [NATO stock number](https://en.wikipedia.org/wiki/NATO_Stock_Number) (nsn) of a [[Product]]. ', |
|
202 | + 'offers' => 'An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, perform a service, or give away tickets to an event. Use [[businessFunction]] to indicate the kind of transaction offered, i.e. sell, lease, etc. This property can also be used to describe a [[Demand]]. While this property is listed as expected on a number of common types, it can be used in others. In that case, using a second type, such as Product or a subtype of Product, can clarify the nature of the offer. ', |
|
203 | + 'pattern' => 'A pattern that something has, for example \'polka dot\', \'striped\', \'Canadian flag\'. Values are typically expressed as text, although links to controlled value schemes are also supported.', |
|
204 | + 'positiveNotes' => 'Provides positive considerations regarding something, for example product highlights or (alongside [[negativeNotes]]) pro/con lists for reviews. In the case of a [[Review]], the property describes the [[itemReviewed]] from the perspective of the review; in the case of a [[Product]], the product itself is being described. The property values can be expressed either as unstructured text (repeated as necessary), or if ordered, as a list (in which case the most positive is at the beginning of the list).', |
|
205 | + 'potentialAction' => 'Indicates a potential Action, which describes an idealized action in which this thing would play an \'object\' role.', |
|
206 | + 'productID' => 'The product identifier, such as ISBN. For example: ``` meta itemprop="productID" content="isbn:123-456-789" ```.', |
|
207 | + 'productionDate' => 'The date of production of the item, e.g. vehicle.', |
|
208 | + 'purchaseDate' => 'The date the item, e.g. vehicle, was purchased by the current owner.', |
|
209 | + 'releaseDate' => 'The release date of a product or product model. This can be used to distinguish the exact variant of a product.', |
|
210 | + 'review' => 'A review of the item.', |
|
211 | + 'reviews' => 'Review of the item.', |
|
212 | + '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.', |
|
213 | + 'size' => 'A standardized size of a product or creative work, specified either through a simple textual string (for example \'XL\', \'32Wx34L\'), a QuantitativeValue with a unitCode, or a comprehensive and structured [[SizeSpecification]]; in other cases, the [[width]], [[height]], [[depth]] and [[weight]] properties may be more applicable. ', |
|
214 | + 'sku' => 'The Stock Keeping Unit (SKU), i.e. a merchant-specific identifier for a product or service, or the product to which the offer refers.', |
|
215 | + 'slogan' => 'A slogan or motto associated with the item.', |
|
216 | + 'subjectOf' => 'A CreativeWork or Event about this Thing.', |
|
217 | + 'url' => 'URL of the item.', |
|
218 | + 'weight' => 'The weight of the product or person.', |
|
219 | + 'width' => 'The width of the item.' |
|
220 | + ]; |
|
221 | + } |
|
222 | 222 | |
223 | 223 | |
224 | - /** |
|
225 | - * @inheritdoc |
|
226 | - */ |
|
227 | - public function getGoogleRequiredSchema(): array |
|
228 | - { |
|
229 | - return ['description', 'name']; |
|
230 | - } |
|
224 | + /** |
|
225 | + * @inheritdoc |
|
226 | + */ |
|
227 | + public function getGoogleRequiredSchema(): array |
|
228 | + { |
|
229 | + return ['description', 'name']; |
|
230 | + } |
|
231 | 231 | |
232 | 232 | |
233 | - /** |
|
234 | - * @inheritdoc |
|
235 | - */ |
|
236 | - public function getGoogleRecommendedSchema(): array |
|
237 | - { |
|
238 | - return ['image', 'url']; |
|
239 | - } |
|
233 | + /** |
|
234 | + * @inheritdoc |
|
235 | + */ |
|
236 | + public function getGoogleRecommendedSchema(): array |
|
237 | + { |
|
238 | + return ['image', 'url']; |
|
239 | + } |
|
240 | 240 | |
241 | 241 | |
242 | - /** |
|
243 | - * @inheritdoc |
|
244 | - */ |
|
245 | - public function defineRules(): array |
|
246 | - { |
|
247 | - $rules = parent::defineRules(); |
|
248 | - $rules = array_merge($rules, [ |
|
249 | - [$this->getSchemaPropertyNames(), 'validateJsonSchema'], |
|
250 | - [$this->getGoogleRequiredSchema(), 'required', 'on' => ['google'], 'message' => 'This property is required by Google.'], |
|
251 | - [$this->getGoogleRecommendedSchema(), 'required', 'on' => ['google'], 'message' => 'This property is recommended by Google.'] |
|
252 | - ]); |
|
242 | + /** |
|
243 | + * @inheritdoc |
|
244 | + */ |
|
245 | + public function defineRules(): array |
|
246 | + { |
|
247 | + $rules = parent::defineRules(); |
|
248 | + $rules = array_merge($rules, [ |
|
249 | + [$this->getSchemaPropertyNames(), 'validateJsonSchema'], |
|
250 | + [$this->getGoogleRequiredSchema(), 'required', 'on' => ['google'], 'message' => 'This property is required by Google.'], |
|
251 | + [$this->getGoogleRecommendedSchema(), 'required', 'on' => ['google'], 'message' => 'This property is recommended by Google.'] |
|
252 | + ]); |
|
253 | 253 | |
254 | - return $rules; |
|
255 | - } |
|
254 | + return $rules; |
|
255 | + } |
|
256 | 256 | } |
@@ -27,132 +27,132 @@ |
||
27 | 27 | */ |
28 | 28 | class AlignmentObject extends MetaJsonLd implements AlignmentObjectInterface, IntangibleInterface, ThingInterface |
29 | 29 | { |
30 | - use AlignmentObjectTrait; |
|
31 | - use IntangibleTrait; |
|
32 | - use ThingTrait; |
|
33 | - |
|
34 | - /** |
|
35 | - * The Schema.org Type Name |
|
36 | - * |
|
37 | - * @var string |
|
38 | - */ |
|
39 | - public static $schemaTypeName = 'AlignmentObject'; |
|
40 | - |
|
41 | - /** |
|
42 | - * The Schema.org Type Scope |
|
43 | - * |
|
44 | - * @var string |
|
45 | - */ |
|
46 | - public static $schemaTypeScope = 'https://schema.org/AlignmentObject'; |
|
47 | - |
|
48 | - /** |
|
49 | - * The Schema.org Type Extends |
|
50 | - * |
|
51 | - * @var string |
|
52 | - */ |
|
53 | - public static $schemaTypeExtends = 'Intangible'; |
|
54 | - |
|
55 | - /** |
|
56 | - * The Schema.org Type Description |
|
57 | - * |
|
58 | - * @var string |
|
59 | - */ |
|
60 | - public static $schemaTypeDescription = "An intangible item that describes an alignment between a learning resource and a node in an educational framework.\n\nShould not be used where the nature of the alignment can be described using a simple property, for example to express that a resource [[teaches]] or [[assesses]] a competency."; |
|
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 | - 'alignmentType' => ['Text'], |
|
80 | - 'alternateName' => ['Text'], |
|
81 | - 'description' => ['Text'], |
|
82 | - 'disambiguatingDescription' => ['Text'], |
|
83 | - 'educationalFramework' => ['Text'], |
|
84 | - 'identifier' => ['PropertyValue', 'URL', 'Text'], |
|
85 | - 'image' => ['URL', 'ImageObject'], |
|
86 | - 'mainEntityOfPage' => ['URL', 'CreativeWork'], |
|
87 | - 'name' => ['Text'], |
|
88 | - 'potentialAction' => ['Action'], |
|
89 | - 'sameAs' => ['URL'], |
|
90 | - 'subjectOf' => ['Event', 'CreativeWork'], |
|
91 | - 'targetDescription' => ['Text'], |
|
92 | - 'targetName' => ['Text'], |
|
93 | - 'targetUrl' => ['URL'], |
|
94 | - 'url' => ['URL'] |
|
95 | - ]; |
|
96 | - } |
|
97 | - |
|
98 | - |
|
99 | - /** |
|
100 | - * @inheritdoc |
|
101 | - */ |
|
102 | - public function getSchemaPropertyDescriptions(): array |
|
103 | - { |
|
104 | - return [ |
|
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 | - 'alignmentType' => 'A category of alignment between the learning resource and the framework node. Recommended values include: \'requires\', \'textComplexity\', \'readingLevel\', and \'educationalSubject\'.', |
|
107 | - 'alternateName' => 'An alias for the item.', |
|
108 | - 'description' => 'A description of the item.', |
|
109 | - '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.', |
|
110 | - 'educationalFramework' => 'The framework to which the resource being described is aligned.', |
|
111 | - '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. ', |
|
112 | - 'image' => 'An image of the item. This can be a [[URL]] or a fully described [[ImageObject]].', |
|
113 | - '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.', |
|
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 | - 'targetDescription' => 'The description of a node in an established educational framework.', |
|
119 | - 'targetName' => 'The name of a node in an established educational framework.', |
|
120 | - 'targetUrl' => 'The URL of a node in an established educational framework.', |
|
121 | - 'url' => 'URL of the item.' |
|
122 | - ]; |
|
123 | - } |
|
124 | - |
|
125 | - |
|
126 | - /** |
|
127 | - * @inheritdoc |
|
128 | - */ |
|
129 | - public function getGoogleRequiredSchema(): array |
|
130 | - { |
|
131 | - return ['description', 'name']; |
|
132 | - } |
|
133 | - |
|
134 | - |
|
135 | - /** |
|
136 | - * @inheritdoc |
|
137 | - */ |
|
138 | - public function getGoogleRecommendedSchema(): array |
|
139 | - { |
|
140 | - return ['image', 'url']; |
|
141 | - } |
|
142 | - |
|
143 | - |
|
144 | - /** |
|
145 | - * @inheritdoc |
|
146 | - */ |
|
147 | - public function defineRules(): array |
|
148 | - { |
|
149 | - $rules = parent::defineRules(); |
|
150 | - $rules = array_merge($rules, [ |
|
151 | - [$this->getSchemaPropertyNames(), 'validateJsonSchema'], |
|
152 | - [$this->getGoogleRequiredSchema(), 'required', 'on' => ['google'], 'message' => 'This property is required by Google.'], |
|
153 | - [$this->getGoogleRecommendedSchema(), 'required', 'on' => ['google'], 'message' => 'This property is recommended by Google.'] |
|
154 | - ]); |
|
155 | - |
|
156 | - return $rules; |
|
157 | - } |
|
30 | + use AlignmentObjectTrait; |
|
31 | + use IntangibleTrait; |
|
32 | + use ThingTrait; |
|
33 | + |
|
34 | + /** |
|
35 | + * The Schema.org Type Name |
|
36 | + * |
|
37 | + * @var string |
|
38 | + */ |
|
39 | + public static $schemaTypeName = 'AlignmentObject'; |
|
40 | + |
|
41 | + /** |
|
42 | + * The Schema.org Type Scope |
|
43 | + * |
|
44 | + * @var string |
|
45 | + */ |
|
46 | + public static $schemaTypeScope = 'https://schema.org/AlignmentObject'; |
|
47 | + |
|
48 | + /** |
|
49 | + * The Schema.org Type Extends |
|
50 | + * |
|
51 | + * @var string |
|
52 | + */ |
|
53 | + public static $schemaTypeExtends = 'Intangible'; |
|
54 | + |
|
55 | + /** |
|
56 | + * The Schema.org Type Description |
|
57 | + * |
|
58 | + * @var string |
|
59 | + */ |
|
60 | + public static $schemaTypeDescription = "An intangible item that describes an alignment between a learning resource and a node in an educational framework.\n\nShould not be used where the nature of the alignment can be described using a simple property, for example to express that a resource [[teaches]] or [[assesses]] a competency."; |
|
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 | + 'alignmentType' => ['Text'], |
|
80 | + 'alternateName' => ['Text'], |
|
81 | + 'description' => ['Text'], |
|
82 | + 'disambiguatingDescription' => ['Text'], |
|
83 | + 'educationalFramework' => ['Text'], |
|
84 | + 'identifier' => ['PropertyValue', 'URL', 'Text'], |
|
85 | + 'image' => ['URL', 'ImageObject'], |
|
86 | + 'mainEntityOfPage' => ['URL', 'CreativeWork'], |
|
87 | + 'name' => ['Text'], |
|
88 | + 'potentialAction' => ['Action'], |
|
89 | + 'sameAs' => ['URL'], |
|
90 | + 'subjectOf' => ['Event', 'CreativeWork'], |
|
91 | + 'targetDescription' => ['Text'], |
|
92 | + 'targetName' => ['Text'], |
|
93 | + 'targetUrl' => ['URL'], |
|
94 | + 'url' => ['URL'] |
|
95 | + ]; |
|
96 | + } |
|
97 | + |
|
98 | + |
|
99 | + /** |
|
100 | + * @inheritdoc |
|
101 | + */ |
|
102 | + public function getSchemaPropertyDescriptions(): array |
|
103 | + { |
|
104 | + return [ |
|
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 | + 'alignmentType' => 'A category of alignment between the learning resource and the framework node. Recommended values include: \'requires\', \'textComplexity\', \'readingLevel\', and \'educationalSubject\'.', |
|
107 | + 'alternateName' => 'An alias for the item.', |
|
108 | + 'description' => 'A description of the item.', |
|
109 | + '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.', |
|
110 | + 'educationalFramework' => 'The framework to which the resource being described is aligned.', |
|
111 | + '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. ', |
|
112 | + 'image' => 'An image of the item. This can be a [[URL]] or a fully described [[ImageObject]].', |
|
113 | + '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.', |
|
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 | + 'targetDescription' => 'The description of a node in an established educational framework.', |
|
119 | + 'targetName' => 'The name of a node in an established educational framework.', |
|
120 | + 'targetUrl' => 'The URL of a node in an established educational framework.', |
|
121 | + 'url' => 'URL of the item.' |
|
122 | + ]; |
|
123 | + } |
|
124 | + |
|
125 | + |
|
126 | + /** |
|
127 | + * @inheritdoc |
|
128 | + */ |
|
129 | + public function getGoogleRequiredSchema(): array |
|
130 | + { |
|
131 | + return ['description', 'name']; |
|
132 | + } |
|
133 | + |
|
134 | + |
|
135 | + /** |
|
136 | + * @inheritdoc |
|
137 | + */ |
|
138 | + public function getGoogleRecommendedSchema(): array |
|
139 | + { |
|
140 | + return ['image', 'url']; |
|
141 | + } |
|
142 | + |
|
143 | + |
|
144 | + /** |
|
145 | + * @inheritdoc |
|
146 | + */ |
|
147 | + public function defineRules(): array |
|
148 | + { |
|
149 | + $rules = parent::defineRules(); |
|
150 | + $rules = array_merge($rules, [ |
|
151 | + [$this->getSchemaPropertyNames(), 'validateJsonSchema'], |
|
152 | + [$this->getGoogleRequiredSchema(), 'required', 'on' => ['google'], 'message' => 'This property is required by Google.'], |
|
153 | + [$this->getGoogleRecommendedSchema(), 'required', 'on' => ['google'], 'message' => 'This property is recommended by Google.'] |
|
154 | + ]); |
|
155 | + |
|
156 | + return $rules; |
|
157 | + } |
|
158 | 158 | } |
@@ -30,147 +30,147 @@ |
||
30 | 30 | */ |
31 | 31 | class OfferShippingDetails extends MetaJsonLd implements OfferShippingDetailsInterface, StructuredValueInterface, IntangibleInterface, ThingInterface |
32 | 32 | { |
33 | - use OfferShippingDetailsTrait; |
|
34 | - use StructuredValueTrait; |
|
35 | - use IntangibleTrait; |
|
36 | - use ThingTrait; |
|
37 | - |
|
38 | - /** |
|
39 | - * The Schema.org Type Name |
|
40 | - * |
|
41 | - * @var string |
|
42 | - */ |
|
43 | - public static $schemaTypeName = 'OfferShippingDetails'; |
|
44 | - |
|
45 | - /** |
|
46 | - * The Schema.org Type Scope |
|
47 | - * |
|
48 | - * @var string |
|
49 | - */ |
|
50 | - public static $schemaTypeScope = 'https://schema.org/OfferShippingDetails'; |
|
51 | - |
|
52 | - /** |
|
53 | - * The Schema.org Type Extends |
|
54 | - * |
|
55 | - * @var string |
|
56 | - */ |
|
57 | - public static $schemaTypeExtends = 'StructuredValue'; |
|
58 | - |
|
59 | - /** |
|
60 | - * The Schema.org Type Description |
|
61 | - * |
|
62 | - * @var string |
|
63 | - */ |
|
64 | - public static $schemaTypeDescription = "OfferShippingDetails represents information about shipping destinations.\n\nMultiple of these entities can be used to represent different shipping rates for different destinations:\n\nOne entity for Alaska/Hawaii. A different one for continental US. A different one for all France.\n\nMultiple of these entities can be used to represent different shipping costs and delivery times.\n\nTwo entities that are identical but differ in rate and time:\n\nE.g. Cheaper and slower: \$5 in 5-7 days\nor Fast and expensive: \$15 in 1-2 days."; |
|
65 | - |
|
66 | - |
|
67 | - /** |
|
68 | - * @inheritdoc |
|
69 | - */ |
|
70 | - public function getSchemaPropertyNames(): array |
|
71 | - { |
|
72 | - return array_keys($this->getSchemaPropertyExpectedTypes()); |
|
73 | - } |
|
74 | - |
|
75 | - |
|
76 | - /** |
|
77 | - * @inheritdoc |
|
78 | - */ |
|
79 | - public function getSchemaPropertyExpectedTypes(): array |
|
80 | - { |
|
81 | - return [ |
|
82 | - 'additionalType' => ['URL'], |
|
83 | - 'alternateName' => ['Text'], |
|
84 | - 'deliveryTime' => ['ShippingDeliveryTime'], |
|
85 | - 'depth' => ['QuantitativeValue', 'Distance'], |
|
86 | - 'description' => ['Text'], |
|
87 | - 'disambiguatingDescription' => ['Text'], |
|
88 | - 'doesNotShip' => ['Boolean'], |
|
89 | - 'height' => ['QuantitativeValue', 'Distance'], |
|
90 | - 'identifier' => ['PropertyValue', 'URL', 'Text'], |
|
91 | - 'image' => ['URL', 'ImageObject'], |
|
92 | - 'mainEntityOfPage' => ['URL', 'CreativeWork'], |
|
93 | - 'name' => ['Text'], |
|
94 | - 'potentialAction' => ['Action'], |
|
95 | - 'sameAs' => ['URL'], |
|
96 | - 'shippingDestination' => ['DefinedRegion'], |
|
97 | - 'shippingLabel' => ['Text'], |
|
98 | - 'shippingOrigin' => ['DefinedRegion'], |
|
99 | - 'shippingRate' => ['MonetaryAmount'], |
|
100 | - 'shippingSettingsLink' => ['URL'], |
|
101 | - 'subjectOf' => ['Event', 'CreativeWork'], |
|
102 | - 'transitTimeLabel' => ['Text'], |
|
103 | - 'url' => ['URL'], |
|
104 | - 'weight' => ['QuantitativeValue'], |
|
105 | - 'width' => ['Distance', 'QuantitativeValue'] |
|
106 | - ]; |
|
107 | - } |
|
108 | - |
|
109 | - |
|
110 | - /** |
|
111 | - * @inheritdoc |
|
112 | - */ |
|
113 | - public function getSchemaPropertyDescriptions(): array |
|
114 | - { |
|
115 | - return [ |
|
116 | - '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.', |
|
117 | - 'alternateName' => 'An alias for the item.', |
|
118 | - 'deliveryTime' => 'The total delay between the receipt of the order and the goods reaching the final customer.', |
|
119 | - 'depth' => 'The depth of the item.', |
|
120 | - 'description' => 'A description of the item.', |
|
121 | - '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.', |
|
122 | - 'doesNotShip' => 'Indicates when shipping to a particular [[shippingDestination]] is not available.', |
|
123 | - 'height' => 'The height of the item.', |
|
124 | - '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. ', |
|
125 | - 'image' => 'An image of the item. This can be a [[URL]] or a fully described [[ImageObject]].', |
|
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 | - 'potentialAction' => 'Indicates a potential Action, which describes an idealized action in which this thing would play an \'object\' role.', |
|
129 | - '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.', |
|
130 | - 'shippingDestination' => 'indicates (possibly multiple) shipping destinations. These can be defined in several ways, e.g. postalCode ranges.', |
|
131 | - 'shippingLabel' => 'Label to match an [[OfferShippingDetails]] with a [[ShippingRateSettings]] (within the context of a [[shippingSettingsLink]] cross-reference).', |
|
132 | - 'shippingOrigin' => 'Indicates the origin of a shipment, i.e. where it should be coming from.', |
|
133 | - 'shippingRate' => 'The shipping rate is the cost of shipping to the specified destination. Typically, the maxValue and currency values (of the [[MonetaryAmount]]) are most appropriate.', |
|
134 | - 'shippingSettingsLink' => 'Link to a page containing [[ShippingRateSettings]] and [[DeliveryTimeSettings]] details.', |
|
135 | - 'subjectOf' => 'A CreativeWork or Event about this Thing.', |
|
136 | - 'transitTimeLabel' => 'Label to match an [[OfferShippingDetails]] with a [[DeliveryTimeSettings]] (within the context of a [[shippingSettingsLink]] cross-reference).', |
|
137 | - 'url' => 'URL of the item.', |
|
138 | - 'weight' => 'The weight of the product or person.', |
|
139 | - 'width' => 'The width of the item.' |
|
140 | - ]; |
|
141 | - } |
|
142 | - |
|
143 | - |
|
144 | - /** |
|
145 | - * @inheritdoc |
|
146 | - */ |
|
147 | - public function getGoogleRequiredSchema(): array |
|
148 | - { |
|
149 | - return ['description', 'name']; |
|
150 | - } |
|
151 | - |
|
152 | - |
|
153 | - /** |
|
154 | - * @inheritdoc |
|
155 | - */ |
|
156 | - public function getGoogleRecommendedSchema(): array |
|
157 | - { |
|
158 | - return ['image', 'url']; |
|
159 | - } |
|
160 | - |
|
161 | - |
|
162 | - /** |
|
163 | - * @inheritdoc |
|
164 | - */ |
|
165 | - public function defineRules(): array |
|
166 | - { |
|
167 | - $rules = parent::defineRules(); |
|
168 | - $rules = array_merge($rules, [ |
|
169 | - [$this->getSchemaPropertyNames(), 'validateJsonSchema'], |
|
170 | - [$this->getGoogleRequiredSchema(), 'required', 'on' => ['google'], 'message' => 'This property is required by Google.'], |
|
171 | - [$this->getGoogleRecommendedSchema(), 'required', 'on' => ['google'], 'message' => 'This property is recommended by Google.'] |
|
172 | - ]); |
|
173 | - |
|
174 | - return $rules; |
|
175 | - } |
|
33 | + use OfferShippingDetailsTrait; |
|
34 | + use StructuredValueTrait; |
|
35 | + use IntangibleTrait; |
|
36 | + use ThingTrait; |
|
37 | + |
|
38 | + /** |
|
39 | + * The Schema.org Type Name |
|
40 | + * |
|
41 | + * @var string |
|
42 | + */ |
|
43 | + public static $schemaTypeName = 'OfferShippingDetails'; |
|
44 | + |
|
45 | + /** |
|
46 | + * The Schema.org Type Scope |
|
47 | + * |
|
48 | + * @var string |
|
49 | + */ |
|
50 | + public static $schemaTypeScope = 'https://schema.org/OfferShippingDetails'; |
|
51 | + |
|
52 | + /** |
|
53 | + * The Schema.org Type Extends |
|
54 | + * |
|
55 | + * @var string |
|
56 | + */ |
|
57 | + public static $schemaTypeExtends = 'StructuredValue'; |
|
58 | + |
|
59 | + /** |
|
60 | + * The Schema.org Type Description |
|
61 | + * |
|
62 | + * @var string |
|
63 | + */ |
|
64 | + public static $schemaTypeDescription = "OfferShippingDetails represents information about shipping destinations.\n\nMultiple of these entities can be used to represent different shipping rates for different destinations:\n\nOne entity for Alaska/Hawaii. A different one for continental US. A different one for all France.\n\nMultiple of these entities can be used to represent different shipping costs and delivery times.\n\nTwo entities that are identical but differ in rate and time:\n\nE.g. Cheaper and slower: \$5 in 5-7 days\nor Fast and expensive: \$15 in 1-2 days."; |
|
65 | + |
|
66 | + |
|
67 | + /** |
|
68 | + * @inheritdoc |
|
69 | + */ |
|
70 | + public function getSchemaPropertyNames(): array |
|
71 | + { |
|
72 | + return array_keys($this->getSchemaPropertyExpectedTypes()); |
|
73 | + } |
|
74 | + |
|
75 | + |
|
76 | + /** |
|
77 | + * @inheritdoc |
|
78 | + */ |
|
79 | + public function getSchemaPropertyExpectedTypes(): array |
|
80 | + { |
|
81 | + return [ |
|
82 | + 'additionalType' => ['URL'], |
|
83 | + 'alternateName' => ['Text'], |
|
84 | + 'deliveryTime' => ['ShippingDeliveryTime'], |
|
85 | + 'depth' => ['QuantitativeValue', 'Distance'], |
|
86 | + 'description' => ['Text'], |
|
87 | + 'disambiguatingDescription' => ['Text'], |
|
88 | + 'doesNotShip' => ['Boolean'], |
|
89 | + 'height' => ['QuantitativeValue', 'Distance'], |
|
90 | + 'identifier' => ['PropertyValue', 'URL', 'Text'], |
|
91 | + 'image' => ['URL', 'ImageObject'], |
|
92 | + 'mainEntityOfPage' => ['URL', 'CreativeWork'], |
|
93 | + 'name' => ['Text'], |
|
94 | + 'potentialAction' => ['Action'], |
|
95 | + 'sameAs' => ['URL'], |
|
96 | + 'shippingDestination' => ['DefinedRegion'], |
|
97 | + 'shippingLabel' => ['Text'], |
|
98 | + 'shippingOrigin' => ['DefinedRegion'], |
|
99 | + 'shippingRate' => ['MonetaryAmount'], |
|
100 | + 'shippingSettingsLink' => ['URL'], |
|
101 | + 'subjectOf' => ['Event', 'CreativeWork'], |
|
102 | + 'transitTimeLabel' => ['Text'], |
|
103 | + 'url' => ['URL'], |
|
104 | + 'weight' => ['QuantitativeValue'], |
|
105 | + 'width' => ['Distance', 'QuantitativeValue'] |
|
106 | + ]; |
|
107 | + } |
|
108 | + |
|
109 | + |
|
110 | + /** |
|
111 | + * @inheritdoc |
|
112 | + */ |
|
113 | + public function getSchemaPropertyDescriptions(): array |
|
114 | + { |
|
115 | + return [ |
|
116 | + '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.', |
|
117 | + 'alternateName' => 'An alias for the item.', |
|
118 | + 'deliveryTime' => 'The total delay between the receipt of the order and the goods reaching the final customer.', |
|
119 | + 'depth' => 'The depth of the item.', |
|
120 | + 'description' => 'A description of the item.', |
|
121 | + '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.', |
|
122 | + 'doesNotShip' => 'Indicates when shipping to a particular [[shippingDestination]] is not available.', |
|
123 | + 'height' => 'The height of the item.', |
|
124 | + '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. ', |
|
125 | + 'image' => 'An image of the item. This can be a [[URL]] or a fully described [[ImageObject]].', |
|
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 | + 'potentialAction' => 'Indicates a potential Action, which describes an idealized action in which this thing would play an \'object\' role.', |
|
129 | + '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.', |
|
130 | + 'shippingDestination' => 'indicates (possibly multiple) shipping destinations. These can be defined in several ways, e.g. postalCode ranges.', |
|
131 | + 'shippingLabel' => 'Label to match an [[OfferShippingDetails]] with a [[ShippingRateSettings]] (within the context of a [[shippingSettingsLink]] cross-reference).', |
|
132 | + 'shippingOrigin' => 'Indicates the origin of a shipment, i.e. where it should be coming from.', |
|
133 | + 'shippingRate' => 'The shipping rate is the cost of shipping to the specified destination. Typically, the maxValue and currency values (of the [[MonetaryAmount]]) are most appropriate.', |
|
134 | + 'shippingSettingsLink' => 'Link to a page containing [[ShippingRateSettings]] and [[DeliveryTimeSettings]] details.', |
|
135 | + 'subjectOf' => 'A CreativeWork or Event about this Thing.', |
|
136 | + 'transitTimeLabel' => 'Label to match an [[OfferShippingDetails]] with a [[DeliveryTimeSettings]] (within the context of a [[shippingSettingsLink]] cross-reference).', |
|
137 | + 'url' => 'URL of the item.', |
|
138 | + 'weight' => 'The weight of the product or person.', |
|
139 | + 'width' => 'The width of the item.' |
|
140 | + ]; |
|
141 | + } |
|
142 | + |
|
143 | + |
|
144 | + /** |
|
145 | + * @inheritdoc |
|
146 | + */ |
|
147 | + public function getGoogleRequiredSchema(): array |
|
148 | + { |
|
149 | + return ['description', 'name']; |
|
150 | + } |
|
151 | + |
|
152 | + |
|
153 | + /** |
|
154 | + * @inheritdoc |
|
155 | + */ |
|
156 | + public function getGoogleRecommendedSchema(): array |
|
157 | + { |
|
158 | + return ['image', 'url']; |
|
159 | + } |
|
160 | + |
|
161 | + |
|
162 | + /** |
|
163 | + * @inheritdoc |
|
164 | + */ |
|
165 | + public function defineRules(): array |
|
166 | + { |
|
167 | + $rules = parent::defineRules(); |
|
168 | + $rules = array_merge($rules, [ |
|
169 | + [$this->getSchemaPropertyNames(), 'validateJsonSchema'], |
|
170 | + [$this->getGoogleRequiredSchema(), 'required', 'on' => ['google'], 'message' => 'This property is required by Google.'], |
|
171 | + [$this->getGoogleRecommendedSchema(), 'required', 'on' => ['google'], 'message' => 'This property is recommended by Google.'] |
|
172 | + ]); |
|
173 | + |
|
174 | + return $rules; |
|
175 | + } |
|
176 | 176 | } |
@@ -23,126 +23,126 @@ |
||
23 | 23 | */ |
24 | 24 | class MobileWebPlatform extends MetaJsonLd implements MobileWebPlatformInterface, DigitalPlatformEnumerationInterface, EnumerationInterface, IntangibleInterface, ThingInterface |
25 | 25 | { |
26 | - use MobileWebPlatformTrait; |
|
27 | - use DigitalPlatformEnumerationTrait; |
|
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 = 'MobileWebPlatform'; |
|
38 | - |
|
39 | - /** |
|
40 | - * The Schema.org Type Scope |
|
41 | - * |
|
42 | - * @var string |
|
43 | - */ |
|
44 | - public static $schemaTypeScope = 'https://schema.org/MobileWebPlatform'; |
|
45 | - |
|
46 | - /** |
|
47 | - * The Schema.org Type Extends |
|
48 | - * |
|
49 | - * @var string |
|
50 | - */ |
|
51 | - public static $schemaTypeExtends = 'DigitalPlatformEnumeration'; |
|
52 | - |
|
53 | - /** |
|
54 | - * The Schema.org Type Description |
|
55 | - * |
|
56 | - * @var string |
|
57 | - */ |
|
58 | - public static $schemaTypeDescription = 'Represents the broad notion of \'mobile\' browsers as a Web Platform.'; |
|
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 MobileWebPlatformTrait; |
|
27 | + use DigitalPlatformEnumerationTrait; |
|
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 = 'MobileWebPlatform'; |
|
38 | + |
|
39 | + /** |
|
40 | + * The Schema.org Type Scope |
|
41 | + * |
|
42 | + * @var string |
|
43 | + */ |
|
44 | + public static $schemaTypeScope = 'https://schema.org/MobileWebPlatform'; |
|
45 | + |
|
46 | + /** |
|
47 | + * The Schema.org Type Extends |
|
48 | + * |
|
49 | + * @var string |
|
50 | + */ |
|
51 | + public static $schemaTypeExtends = 'DigitalPlatformEnumeration'; |
|
52 | + |
|
53 | + /** |
|
54 | + * The Schema.org Type Description |
|
55 | + * |
|
56 | + * @var string |
|
57 | + */ |
|
58 | + public static $schemaTypeDescription = 'Represents the broad notion of \'mobile\' browsers as a Web Platform.'; |
|
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,126 +23,126 @@ |
||
23 | 23 | */ |
24 | 24 | class ItemListOrderDescending extends MetaJsonLd implements ItemListOrderDescendingInterface, ItemListOrderTypeInterface, EnumerationInterface, IntangibleInterface, ThingInterface |
25 | 25 | { |
26 | - use ItemListOrderDescendingTrait; |
|
27 | - use ItemListOrderTypeTrait; |
|
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 = 'ItemListOrderDescending'; |
|
38 | - |
|
39 | - /** |
|
40 | - * The Schema.org Type Scope |
|
41 | - * |
|
42 | - * @var string |
|
43 | - */ |
|
44 | - public static $schemaTypeScope = 'https://schema.org/ItemListOrderDescending'; |
|
45 | - |
|
46 | - /** |
|
47 | - * The Schema.org Type Extends |
|
48 | - * |
|
49 | - * @var string |
|
50 | - */ |
|
51 | - public static $schemaTypeExtends = 'ItemListOrderType'; |
|
52 | - |
|
53 | - /** |
|
54 | - * The Schema.org Type Description |
|
55 | - * |
|
56 | - * @var string |
|
57 | - */ |
|
58 | - public static $schemaTypeDescription = 'An ItemList ordered with higher values listed first.'; |
|
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 ItemListOrderDescendingTrait; |
|
27 | + use ItemListOrderTypeTrait; |
|
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 = 'ItemListOrderDescending'; |
|
38 | + |
|
39 | + /** |
|
40 | + * The Schema.org Type Scope |
|
41 | + * |
|
42 | + * @var string |
|
43 | + */ |
|
44 | + public static $schemaTypeScope = 'https://schema.org/ItemListOrderDescending'; |
|
45 | + |
|
46 | + /** |
|
47 | + * The Schema.org Type Extends |
|
48 | + * |
|
49 | + * @var string |
|
50 | + */ |
|
51 | + public static $schemaTypeExtends = 'ItemListOrderType'; |
|
52 | + |
|
53 | + /** |
|
54 | + * The Schema.org Type Description |
|
55 | + * |
|
56 | + * @var string |
|
57 | + */ |
|
58 | + public static $schemaTypeDescription = 'An ItemList ordered with higher values listed first.'; |
|
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 | } |
@@ -30,127 +30,127 @@ |
||
30 | 30 | */ |
31 | 31 | class CaseSeries extends MetaJsonLd implements CaseSeriesInterface, MedicalObservationalStudyDesignInterface, MedicalEnumerationInterface, EnumerationInterface, IntangibleInterface, ThingInterface |
32 | 32 | { |
33 | - use CaseSeriesTrait; |
|
34 | - use MedicalObservationalStudyDesignTrait; |
|
35 | - use MedicalEnumerationTrait; |
|
36 | - use EnumerationTrait; |
|
37 | - use IntangibleTrait; |
|
38 | - use ThingTrait; |
|
39 | - |
|
40 | - /** |
|
41 | - * The Schema.org Type Name |
|
42 | - * |
|
43 | - * @var string |
|
44 | - */ |
|
45 | - public static $schemaTypeName = 'CaseSeries'; |
|
46 | - |
|
47 | - /** |
|
48 | - * The Schema.org Type Scope |
|
49 | - * |
|
50 | - * @var string |
|
51 | - */ |
|
52 | - public static $schemaTypeScope = 'https://schema.org/CaseSeries'; |
|
53 | - |
|
54 | - /** |
|
55 | - * The Schema.org Type Extends |
|
56 | - * |
|
57 | - * @var string |
|
58 | - */ |
|
59 | - public static $schemaTypeExtends = 'MedicalObservationalStudyDesign'; |
|
60 | - |
|
61 | - /** |
|
62 | - * The Schema.org Type Description |
|
63 | - * |
|
64 | - * @var string |
|
65 | - */ |
|
66 | - public static $schemaTypeDescription = 'A case series (also known as a clinical series) is a medical research study that tracks patients with a known exposure given similar treatment or examines their medical records for exposure and outcome. A case series can be retrospective or prospective and usually involves a smaller number of patients than the more powerful case-control studies or randomized controlled trials. Case series may be consecutive or non-consecutive, depending on whether all cases presenting to the reporting authors over a period of time were included, or only a selection.'; |
|
67 | - |
|
68 | - |
|
69 | - /** |
|
70 | - * @inheritdoc |
|
71 | - */ |
|
72 | - public function getSchemaPropertyNames(): array |
|
73 | - { |
|
74 | - return array_keys($this->getSchemaPropertyExpectedTypes()); |
|
75 | - } |
|
76 | - |
|
77 | - |
|
78 | - /** |
|
79 | - * @inheritdoc |
|
80 | - */ |
|
81 | - public function getSchemaPropertyExpectedTypes(): array |
|
82 | - { |
|
83 | - return [ |
|
84 | - 'additionalType' => ['URL'], |
|
85 | - 'alternateName' => ['Text'], |
|
86 | - 'description' => ['Text'], |
|
87 | - 'disambiguatingDescription' => ['Text'], |
|
88 | - 'identifier' => ['PropertyValue', 'URL', 'Text'], |
|
89 | - 'image' => ['URL', 'ImageObject'], |
|
90 | - 'mainEntityOfPage' => ['URL', 'CreativeWork'], |
|
91 | - 'name' => ['Text'], |
|
92 | - 'potentialAction' => ['Action'], |
|
93 | - 'sameAs' => ['URL'], |
|
94 | - 'subjectOf' => ['Event', 'CreativeWork'], |
|
95 | - 'supersededBy' => ['Class', 'Property', 'Enumeration'], |
|
96 | - 'url' => ['URL'] |
|
97 | - ]; |
|
98 | - } |
|
99 | - |
|
100 | - |
|
101 | - /** |
|
102 | - * @inheritdoc |
|
103 | - */ |
|
104 | - public function getSchemaPropertyDescriptions(): array |
|
105 | - { |
|
106 | - return [ |
|
107 | - '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.', |
|
108 | - 'alternateName' => 'An alias for the item.', |
|
109 | - 'description' => 'A description of the item.', |
|
110 | - '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.', |
|
111 | - '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. ', |
|
112 | - 'image' => 'An image of the item. This can be a [[URL]] or a fully described [[ImageObject]].', |
|
113 | - '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.', |
|
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 | - 'supersededBy' => 'Relates a term (i.e. a property, class or enumeration) to one that supersedes it.', |
|
119 | - 'url' => 'URL of the item.' |
|
120 | - ]; |
|
121 | - } |
|
122 | - |
|
123 | - |
|
124 | - /** |
|
125 | - * @inheritdoc |
|
126 | - */ |
|
127 | - public function getGoogleRequiredSchema(): array |
|
128 | - { |
|
129 | - return ['description', 'name']; |
|
130 | - } |
|
131 | - |
|
132 | - |
|
133 | - /** |
|
134 | - * @inheritdoc |
|
135 | - */ |
|
136 | - public function getGoogleRecommendedSchema(): array |
|
137 | - { |
|
138 | - return ['image', 'url']; |
|
139 | - } |
|
140 | - |
|
141 | - |
|
142 | - /** |
|
143 | - * @inheritdoc |
|
144 | - */ |
|
145 | - public function defineRules(): array |
|
146 | - { |
|
147 | - $rules = parent::defineRules(); |
|
148 | - $rules = array_merge($rules, [ |
|
149 | - [$this->getSchemaPropertyNames(), 'validateJsonSchema'], |
|
150 | - [$this->getGoogleRequiredSchema(), 'required', 'on' => ['google'], 'message' => 'This property is required by Google.'], |
|
151 | - [$this->getGoogleRecommendedSchema(), 'required', 'on' => ['google'], 'message' => 'This property is recommended by Google.'] |
|
152 | - ]); |
|
153 | - |
|
154 | - return $rules; |
|
155 | - } |
|
33 | + use CaseSeriesTrait; |
|
34 | + use MedicalObservationalStudyDesignTrait; |
|
35 | + use MedicalEnumerationTrait; |
|
36 | + use EnumerationTrait; |
|
37 | + use IntangibleTrait; |
|
38 | + use ThingTrait; |
|
39 | + |
|
40 | + /** |
|
41 | + * The Schema.org Type Name |
|
42 | + * |
|
43 | + * @var string |
|
44 | + */ |
|
45 | + public static $schemaTypeName = 'CaseSeries'; |
|
46 | + |
|
47 | + /** |
|
48 | + * The Schema.org Type Scope |
|
49 | + * |
|
50 | + * @var string |
|
51 | + */ |
|
52 | + public static $schemaTypeScope = 'https://schema.org/CaseSeries'; |
|
53 | + |
|
54 | + /** |
|
55 | + * The Schema.org Type Extends |
|
56 | + * |
|
57 | + * @var string |
|
58 | + */ |
|
59 | + public static $schemaTypeExtends = 'MedicalObservationalStudyDesign'; |
|
60 | + |
|
61 | + /** |
|
62 | + * The Schema.org Type Description |
|
63 | + * |
|
64 | + * @var string |
|
65 | + */ |
|
66 | + public static $schemaTypeDescription = 'A case series (also known as a clinical series) is a medical research study that tracks patients with a known exposure given similar treatment or examines their medical records for exposure and outcome. A case series can be retrospective or prospective and usually involves a smaller number of patients than the more powerful case-control studies or randomized controlled trials. Case series may be consecutive or non-consecutive, depending on whether all cases presenting to the reporting authors over a period of time were included, or only a selection.'; |
|
67 | + |
|
68 | + |
|
69 | + /** |
|
70 | + * @inheritdoc |
|
71 | + */ |
|
72 | + public function getSchemaPropertyNames(): array |
|
73 | + { |
|
74 | + return array_keys($this->getSchemaPropertyExpectedTypes()); |
|
75 | + } |
|
76 | + |
|
77 | + |
|
78 | + /** |
|
79 | + * @inheritdoc |
|
80 | + */ |
|
81 | + public function getSchemaPropertyExpectedTypes(): array |
|
82 | + { |
|
83 | + return [ |
|
84 | + 'additionalType' => ['URL'], |
|
85 | + 'alternateName' => ['Text'], |
|
86 | + 'description' => ['Text'], |
|
87 | + 'disambiguatingDescription' => ['Text'], |
|
88 | + 'identifier' => ['PropertyValue', 'URL', 'Text'], |
|
89 | + 'image' => ['URL', 'ImageObject'], |
|
90 | + 'mainEntityOfPage' => ['URL', 'CreativeWork'], |
|
91 | + 'name' => ['Text'], |
|
92 | + 'potentialAction' => ['Action'], |
|
93 | + 'sameAs' => ['URL'], |
|
94 | + 'subjectOf' => ['Event', 'CreativeWork'], |
|
95 | + 'supersededBy' => ['Class', 'Property', 'Enumeration'], |
|
96 | + 'url' => ['URL'] |
|
97 | + ]; |
|
98 | + } |
|
99 | + |
|
100 | + |
|
101 | + /** |
|
102 | + * @inheritdoc |
|
103 | + */ |
|
104 | + public function getSchemaPropertyDescriptions(): array |
|
105 | + { |
|
106 | + return [ |
|
107 | + '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.', |
|
108 | + 'alternateName' => 'An alias for the item.', |
|
109 | + 'description' => 'A description of the item.', |
|
110 | + '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.', |
|
111 | + '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. ', |
|
112 | + 'image' => 'An image of the item. This can be a [[URL]] or a fully described [[ImageObject]].', |
|
113 | + '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.', |
|
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 | + 'supersededBy' => 'Relates a term (i.e. a property, class or enumeration) to one that supersedes it.', |
|
119 | + 'url' => 'URL of the item.' |
|
120 | + ]; |
|
121 | + } |
|
122 | + |
|
123 | + |
|
124 | + /** |
|
125 | + * @inheritdoc |
|
126 | + */ |
|
127 | + public function getGoogleRequiredSchema(): array |
|
128 | + { |
|
129 | + return ['description', 'name']; |
|
130 | + } |
|
131 | + |
|
132 | + |
|
133 | + /** |
|
134 | + * @inheritdoc |
|
135 | + */ |
|
136 | + public function getGoogleRecommendedSchema(): array |
|
137 | + { |
|
138 | + return ['image', 'url']; |
|
139 | + } |
|
140 | + |
|
141 | + |
|
142 | + /** |
|
143 | + * @inheritdoc |
|
144 | + */ |
|
145 | + public function defineRules(): array |
|
146 | + { |
|
147 | + $rules = parent::defineRules(); |
|
148 | + $rules = array_merge($rules, [ |
|
149 | + [$this->getSchemaPropertyNames(), 'validateJsonSchema'], |
|
150 | + [$this->getGoogleRequiredSchema(), 'required', 'on' => ['google'], 'message' => 'This property is required by Google.'], |
|
151 | + [$this->getGoogleRecommendedSchema(), 'required', 'on' => ['google'], 'message' => 'This property is recommended by Google.'] |
|
152 | + ]); |
|
153 | + |
|
154 | + return $rules; |
|
155 | + } |
|
156 | 156 | } |
@@ -23,126 +23,126 @@ |
||
23 | 23 | */ |
24 | 24 | class MedicalProcedureType extends MetaJsonLd implements MedicalProcedureTypeInterface, MedicalEnumerationInterface, EnumerationInterface, IntangibleInterface, ThingInterface |
25 | 25 | { |
26 | - use MedicalProcedureTypeTrait; |
|
27 | - use MedicalEnumerationTrait; |
|
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 = 'MedicalProcedureType'; |
|
38 | - |
|
39 | - /** |
|
40 | - * The Schema.org Type Scope |
|
41 | - * |
|
42 | - * @var string |
|
43 | - */ |
|
44 | - public static $schemaTypeScope = 'https://schema.org/MedicalProcedureType'; |
|
45 | - |
|
46 | - /** |
|
47 | - * The Schema.org Type Extends |
|
48 | - * |
|
49 | - * @var string |
|
50 | - */ |
|
51 | - public static $schemaTypeExtends = 'MedicalEnumeration'; |
|
52 | - |
|
53 | - /** |
|
54 | - * The Schema.org Type Description |
|
55 | - * |
|
56 | - * @var string |
|
57 | - */ |
|
58 | - public static $schemaTypeDescription = 'An enumeration that describes different types of medical procedures.'; |
|
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 MedicalProcedureTypeTrait; |
|
27 | + use MedicalEnumerationTrait; |
|
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 = 'MedicalProcedureType'; |
|
38 | + |
|
39 | + /** |
|
40 | + * The Schema.org Type Scope |
|
41 | + * |
|
42 | + * @var string |
|
43 | + */ |
|
44 | + public static $schemaTypeScope = 'https://schema.org/MedicalProcedureType'; |
|
45 | + |
|
46 | + /** |
|
47 | + * The Schema.org Type Extends |
|
48 | + * |
|
49 | + * @var string |
|
50 | + */ |
|
51 | + public static $schemaTypeExtends = 'MedicalEnumeration'; |
|
52 | + |
|
53 | + /** |
|
54 | + * The Schema.org Type Description |
|
55 | + * |
|
56 | + * @var string |
|
57 | + */ |
|
58 | + public static $schemaTypeDescription = 'An enumeration that describes different types of medical procedures.'; |
|
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,126 +23,126 @@ |
||
23 | 23 | */ |
24 | 24 | class OneTimePayments extends MetaJsonLd implements OneTimePaymentsInterface, GovernmentBenefitsTypeInterface, EnumerationInterface, IntangibleInterface, ThingInterface |
25 | 25 | { |
26 | - use OneTimePaymentsTrait; |
|
27 | - use GovernmentBenefitsTypeTrait; |
|
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 = 'OneTimePayments'; |
|
38 | - |
|
39 | - /** |
|
40 | - * The Schema.org Type Scope |
|
41 | - * |
|
42 | - * @var string |
|
43 | - */ |
|
44 | - public static $schemaTypeScope = 'https://schema.org/OneTimePayments'; |
|
45 | - |
|
46 | - /** |
|
47 | - * The Schema.org Type Extends |
|
48 | - * |
|
49 | - * @var string |
|
50 | - */ |
|
51 | - public static $schemaTypeExtends = 'GovernmentBenefitsType'; |
|
52 | - |
|
53 | - /** |
|
54 | - * The Schema.org Type Description |
|
55 | - * |
|
56 | - * @var string |
|
57 | - */ |
|
58 | - public static $schemaTypeDescription = 'OneTimePayments: this is a benefit for one-time payments for individuals.'; |
|
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 OneTimePaymentsTrait; |
|
27 | + use GovernmentBenefitsTypeTrait; |
|
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 = 'OneTimePayments'; |
|
38 | + |
|
39 | + /** |
|
40 | + * The Schema.org Type Scope |
|
41 | + * |
|
42 | + * @var string |
|
43 | + */ |
|
44 | + public static $schemaTypeScope = 'https://schema.org/OneTimePayments'; |
|
45 | + |
|
46 | + /** |
|
47 | + * The Schema.org Type Extends |
|
48 | + * |
|
49 | + * @var string |
|
50 | + */ |
|
51 | + public static $schemaTypeExtends = 'GovernmentBenefitsType'; |
|
52 | + |
|
53 | + /** |
|
54 | + * The Schema.org Type Description |
|
55 | + * |
|
56 | + * @var string |
|
57 | + */ |
|
58 | + public static $schemaTypeDescription = 'OneTimePayments: this is a benefit for one-time payments for individuals.'; |
|
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 | } |