[CLEANUP] Adjust code to coding guidelines
[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 shouldMap($propertyName);
39
40 /**
41 * Returns the sub-configuration for the passed $propertyName. Must ALWAYS return a valid configuration object!
42 *
43 * @param string $propertyName
44 * @return \TYPO3\CMS\Extbase\Property\PropertyMappingConfigurationInterface the property mapping configuration for the given $propertyName.
45 * @api
46 */
47 public function getConfigurationFor($propertyName);
48
49 /**
50 * Maps the given $sourcePropertyName to a target property name.
51 * Can be used to rename properties from source to target.
52 *
53 * @param string $sourcePropertyName
54 * @return string property name of target
55 * @api
56 */
57 public function getTargetPropertyName($sourcePropertyName);
58
59 /**
60 * @param string $typeConverterClassName
61 * @param string $key
62 * @return mixed configuration value for the specific $typeConverterClassName. Can be used by Type Converters to fetch converter-specific configuration
63 * @api
64 */
65 public function getConfigurationValue($typeConverterClassName, $key);
66
67 /**
68 * This method can be used to explicitely force a TypeConverter to be used for this Configuration.
69 *
70 * @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.
71 * @api
72 */
73 public function getTypeConverter();
74 }
75
76 ?>