Task #39134
Task #38086: Enhance TYPO3 bootstrap mechanism
t3lib_utility_array::arrayExport should recognize int keys
Status: | Resolved | Start date: | 2012-07-20 | |
---|---|---|---|---|
Priority: | Should have | Due date: | ||
Assigned To: | - | % Done: | 100% |
|
Category: | - | Spent time: | - | |
Target version: | 6.0.0-alpha3 | |||
TYPO3 Version: | 6.0 | Complexity: | easy | |
PHP Version: | 5.3 | Sprint Focus: |
Description
psoudo code:
$lines = 'array(' . LF;
$level ++;
// determine if keys are int from 0 to n, without gaps, then $isIntKey = TRUE
foreach ($array as $key => $value) {
// if isIntKey
$lines = '';
else $lines .= str_repeat(TAB, $level) . '\'' . $key . '\' => ';
Related issues
Associated revisions
[FEATURE] arrayExport() should recognize int keys
t3lib_utility_Array::arrayExport() currently exports array keys always
as strings. With the patch integer array keys are now recognized and
written as integers. Additionally, if all array keys are integers and
consecutive from zero to n, the key is left out completly. See the
unit tests for details.
This is useful for the extListArray in LocalConfiguration, which now
misses the array key and makes the array even more easy to handle.
Change-Id: I6233798a8d22257f542c575791f95226220703ca
Resolves: #39134
Releases: 6.0
Reviewed-on: http://review.typo3.org/13317
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Susanne Moog
Tested-by: Susanne Moog
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
[FEATURE] arrayExport() should recognize int keys
t3lib_utility_Array::arrayExport() currently exports array keys always
as strings. With the patch integer array keys are now recognized and
written as integers. Additionally, if all array keys are integers and
consecutive from zero to n, the key is left out completly. See the
unit tests for details.
This is useful for the extListArray in LocalConfiguration, which now
misses the array key and makes the array even more easy to handle.
Change-Id: I6233798a8d22257f542c575791f95226220703ca
Resolves: #39134
Releases: 6.0
Reviewed-on: http://review.typo3.org/13317
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Susanne Moog
Tested-by: Susanne Moog
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
[FEATURE] arrayExport() should recognize int keys
t3lib_utility_Array::arrayExport() currently exports array keys always
as strings. With the patch integer array keys are now recognized and
written as integers. Additionally, if all array keys are integers and
consecutive from zero to n, the key is left out completly. See the
unit tests for details.
This is useful for the extListArray in LocalConfiguration, which now
misses the array key and makes the array even more easy to handle.
Change-Id: I6233798a8d22257f542c575791f95226220703ca
Resolves: #39134
Releases: 6.0
Reviewed-on: http://review.typo3.org/13317
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Susanne Moog
Tested-by: Susanne Moog
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
History
#1 Updated by Gerrit Code Review about 3 years ago
- Status changed from New to Under Review
Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/13317
#2 Updated by Gerrit Code Review about 3 years ago
Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/13317
#3 Updated by Christian Kuhn about 3 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 04857a5d14eb52e3436bfbb2e17612870654f54d.