1: <?php
2: /**
3: * CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
4: * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
5: *
6: * Licensed under The MIT License
7: * For full copyright and license information, please see the LICENSE.txt
8: * Redistributions of files must retain the above copyright notice.
9: *
10: * @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
11: * @link https://cakephp.org CakePHP(tm) Project
12: * @since 3.2.0
13: * @license https://opensource.org/licenses/mit-license.php MIT License
14: */
15: namespace Cake\Datasource;
16:
17: /**
18: * Describes the methods that any class representing a data storage should
19: * comply with.
20: *
21: * @method array getInvalid()
22: * @method mixed getInvalidField($field)
23: * @method $this setInvalid($field, $value = null, $overwrite = false)
24: * @method $this setInvalidField($field, $value = null, $overwrite = false)
25: */
26: interface InvalidPropertyInterface
27: {
28: /**
29: * Sets a field as invalid and not patchable into the entity.
30: *
31: * This is useful for batch operations when one needs to get the original value for an error message after patching.
32: * This value could not be patched into the entity and is simply copied into the _invalid property for debugging purposes
33: * or to be able to log it away.
34: *
35: * @param string|array|null $field The field to get invalid value for, or the value to set.
36: * @param mixed|null $value The invalid value to be set for $field.
37: * @param bool $overwrite Whether or not to overwrite pre-existing values for $field.
38: * @return $this|mixed
39: * @deprecated 3.5.0 Use getInvalid()/getInvalidField() and setInvalid()/setInvalidField() instead.
40: */
41: public function invalid($field = null, $value = null, $overwrite = false);
42: }
43: