2 namespace Consolidation\OutputFormatters\Validate;
5 * Formatters may implement ValidDataTypesInterface in order to indicate
6 * exactly which formats they support. The validDataTypes method can be
7 * called to retrieve a list of data types useful in providing hints in
8 * exception messages about which data types can be used with the formatter.
10 * Note that it is OPTIONAL for formatters to implement this interface.
11 * If a formatter implements only ValidationInterface, then clients that
12 * request the formatter via FormatterManager::write() will still get a list
13 * (via an InvalidFormatException) of all of the formats that are usable
14 * with the provided data type. Implementing ValidDataTypesInterface is
15 * benefitial to clients who instantiate a formatter directly (via `new`).
17 * Formatters that implement ValidDataTypesInterface may wish to use
18 * ValidDataTypesTrait.
20 interface ValidDataTypesInterface extends ValidationInterface
23 * Return the list of data types acceptable to this formatter
25 * @return \ReflectionClass[]
27 public function validDataTypes();