[TASK] Re-work/simplify copyright header in PHP files - Part 8
[Packages/TYPO3.CMS.git] / typo3 / sysext / extbase / Classes / Validation / Validator / ObjectValidatorInterface.php
1 <?php
2 namespace TYPO3\CMS\Extbase\Validation\Validator;
3
4 /**
5 * This file is part of the TYPO3 CMS project.
6 *
7 * It is free software; you can redistribute it and/or modify it under
8 * the terms of the GNU General Public License, either version 2
9 * of the License, or any later version.
10 *
11 * For the full copyright and license information, please read the
12 * LICENSE.txt file that was distributed with this source code.
13 *
14 * The TYPO3 project - inspiring people to share!
15 */
16 /**
17 * Contract for a validator
18 *
19 * @api
20 */
21 interface ObjectValidatorInterface extends ValidatorInterface {
22
23 /**
24 * Checks the given object can be validated by the validator implementation
25 *
26 * @param object $object The object to be checked
27 * @return boolean TRUE if this validator can validate instances of the given object or FALSE if it can't
28 *
29 * @deprecated since Extbase 1.4.0, will be removed two versions after Extbase 6.1
30 */
31 public function canValidate($object);
32
33 /**
34 * Checks if the specified property of the given object is valid.
35 *
36 * If at least one error occurred, the result is FALSE.
37 *
38 * @param object $object The object containing the property to validate
39 * @param string $propertyName Name of the property to validate
40 * @return boolean TRUE if the property value is valid, FALSE if an error occurred
41 *
42 * @deprecated since Extbase 1.4.0, will be removed two versions after Extbase 6.1
43 */
44 public function isPropertyValid($object, $propertyName);
45
46 /**
47 * Allows to set a container to keep track of validated instances.
48 *
49 * @param \SplObjectStorage $validatedInstancesContainer A container to keep track of validated instances
50 * @return void
51 * @api
52 */
53 public function setValidatedInstancesContainer(\SplObjectStorage $validatedInstancesContainer);
54 }