Bug #33191 ยป ArrayConverter.php

Pascal Walter, 2012-01-14 11:47

 
1
<?php
2
namespace VS\TimeSheet\Property\TypeConverter;
3

    
4
/*                                                                        *
5
 * This script belongs to the FLOW3 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, either version 3   *
9
 * of the License, or (at your option) any later version.                 *
10
 *                                                                        *
11
 * The TYPO3 project - inspiring people to share!                         *
12
 *                                                                        */
13

    
14
use TYPO3\FLOW3\Annotations as FLOW3;
15

    
16
/**
17
 * Converter which transforms arrays to arrays.
18
 *
19
 * @api
20
 * @FLOW3\Scope("singleton")
21
 */
22
class ArrayConverter extends \TYPO3\FLOW3\Property\TypeConverter\AbstractTypeConverter {
23

    
24
	/**
25
	 * @var array<string>
26
	 */
27
	protected $sourceTypes = array('string');
28

    
29
	/**
30
	 * @var string
31
	 */
32
	protected $targetType = 'array';
33

    
34
	/**
35
	 * @var integer
36
	 */
37
	protected $priority = 1;
38

    
39
	/**
40
	 * Actually convert from $source to $targetType, in fact a noop here.
41
	 *
42
	 * @param string $source
43
	 * @param string $targetType
44
	 * @param array $convertedChildProperties
45
	 * @param \TYPO3\FLOW3\Property\PropertyMappingConfigurationInterface $configuration
46
	 * @return array
47
	 * @api
48
	 */
49
	public function convertFrom($source, $targetType, array $convertedChildProperties = array(), \TYPO3\FLOW3\Property\PropertyMappingConfigurationInterface $configuration = NULL) {
50
		return array();
51
	}
52
}
53
?>
    (1-1/1)