Revert "[CLEANUP] Rework/simplify copyright header and remove @package"
[Packages/TYPO3.CMS.git] / typo3 / sysext / extbase / Classes / Property / PropertyMappingConfigurationInterface.php
1 <?php
2 namespace TYPO3\CMS\Extbase\Property;
3
4 /* *
5 * This script belongs to the Extbase framework *
6 * *
7 * It is free software; you can redistribute it and/or modify it under *
8 * the terms of the GNU Lesser General Public License as published by the *
9 * Free Software Foundation, either version 3 of the License, or (at your *
10 * option) any later version. *
11 * *
12 * This script is distributed in the hope that it will be useful, but *
13 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- *
14 * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser *
15 * General Public License for more details. *
16 * *
17 * You should have received a copy of the GNU Lesser General Public *
18 * License along with the script. *
19 * If not, see http://www.gnu.org/licenses/lgpl.html *
20 * *
21 * The TYPO3 project - inspiring people to share! *
22 * */
23 /**
24 * Configuration object for the property mapper.
25 *
26 * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
27 * @api
28 */
29 interface PropertyMappingConfigurationInterface {
30
31 /**
32 * returns TRUE if the given propertyName should be mapped, FALSE otherwise.
33 *
34 * @param string $propertyName
35 * @return boolean
36 * @api
37 */
38 public function shouldSkip($propertyName);
39
40 /**
41 * Whether unknown (unconfigured) properties should be skipped during
42 * mapping, instead if causing an error.
43 *
44 * @return boolean
45 * @api
46 */
47 public function shouldSkipUnknownProperties();
48
49 /**
50 * Returns the sub-configuration for the passed $propertyName. Must ALWAYS return a valid configuration object!
51 *
52 * @param string $propertyName
53 * @return \TYPO3\CMS\Extbase\Property\PropertyMappingConfigurationInterface the property mapping configuration for the given $propertyName.
54 * @api
55 */
56 public function getConfigurationFor($propertyName);
57
58 /**
59 * Maps the given $sourcePropertyName to a target property name.
60 * Can be used to rename properties from source to target.
61 *
62 * @param string $sourcePropertyName
63 * @return string property name of target
64 * @api
65 */
66 public function getTargetPropertyName($sourcePropertyName);
67
68 /**
69 * @param string $typeConverterClassName
70 * @param string $key
71 * @return mixed configuration value for the specific $typeConverterClassName. Can be used by Type Converters to fetch converter-specific configuration
72 * @api
73 */
74 public function getConfigurationValue($typeConverterClassName, $key);
75
76 /**
77 * This method can be used to explicitely force a TypeConverter to be used for this Configuration.
78 *
79 * @return \TYPO3\CMS\Extbase\Property\TypeConverterInterface The type converter to be used for this particular PropertyMappingConfiguration, or NULL if the system-wide configured type converter should be used.
80 * @api
81 */
82 public function getTypeConverter();
83 }