1: <?php
2:
3: namespace Guzzle\Service\Description;
4:
5: /**
6: * Validator responsible for preparing and validating parameters against the parameter's schema
7: */
8: interface ValidatorInterface
9: {
10: /**
11: * Validate a value against the acceptable types, regular expressions, minimum, maximums, instanceOf, enums, etc
12: * Add default and static values to the passed in variable. If the validation completes successfully, the input
13: * must be run correctly through the matching schema's filters attribute.
14: *
15: * @param Parameter $param Schema that is being validated against the value
16: * @param mixed $value Value to validate and process. The value may change during this process.
17: *
18: * @return bool Returns true if the input data is valid for the schema
19: */
20: public function validate(Parameter $param, &$value);
21:
22: /**
23: * Get validation errors encountered while validating
24: *
25: * @return array
26: */
27: public function getErrors();
28: }
29: