2525 */
2626abstract class Binding
2727{
28+ /**
29+ * The schema to be used for schema validation
30+ *
31+ * @var string
32+ */
33+ protected static string $ schemaFile = 'resources/schemas/saml-schema-protocol-2.0.xsd ' ;
34+
35+ /**
36+ * Whether or not to perform schema validation
37+ *
38+ * @var bool
39+ */
40+ protected bool $ schemaValidation = true ;
41+
2842 /**
2943 * The RelayState associated with the message.
3044 *
@@ -157,7 +171,20 @@ public function getDestination(): ?string
157171
158172
159173 /**
160- * Set the RelayState associated with he message.
174+ * Override the destination of a message.
175+ *
176+ * Set to null to use the destination set in the message.
177+ *
178+ * @param string|null $destination The destination the message should be delivered to.
179+ */
180+ public function setDestination (?string $ destination = null ): void
181+ {
182+ $ this ->destination = $ destination ;
183+ }
184+
185+
186+ /**
187+ * Set the RelayState associated with the message.
161188 *
162189 * @param string|null $relayState The RelayState.
163190 */
@@ -179,15 +206,24 @@ public function getRelayState(): ?string
179206
180207
181208 /**
182- * Override the destination of a message.
209+ * Set the schema validation for the message.
183210 *
184- * Set to null to use the destination set in the message.
211+ * @param bool $schemaValidation
212+ */
213+ public function setSchemaValidation (bool $ schemaValidation ): void
214+ {
215+ $ this ->schemaValidation = $ schemaValidation ;
216+ }
217+
218+
219+ /**
220+ * Get the schema validation setting.
185221 *
186- * @param string|null $destination The destination the message should be delivered to.
222+ * @return bool
187223 */
188- public function setDestination (? string $ destination = null ): void
224+ public function getSchemaValidation ( ): bool
189225 {
190- $ this ->destination = $ destination ;
226+ return $ this ->schemaValidation ;
191227 }
192228
193229
0 commit comments