#97553Introduce string fragment extraction
Description
When working with variable interpolation and similar scenarios, in most cases variables, constants, expressions, … are embedded in a solid string and can only be identified and extracted by the corresponding “reader” or “parser”.
This string fragment splitter aims to introduce a simpler way for extracting and working with these embedded fragments.
$pattern = new StringFragmentPattern( StringFragmentSplitter::TYPE_EXPRESSION, '%[^%]+%' ); $splitter = new StringFragmentSplitter($pattern); $collection = $splitter->split( 'Hello %variable% World!' FLAG_UNMATCHED_AS_NULL | FLAG_CATCH_SPACES ); // results in having // + StringFragment(type: 'raw', value: 'Hello') // + StringFragment(type: 'expression', value: ' %variable% ') // + StringFragment(type: 'raw', value: 'World!')
Reviews 4
History 414
-
Gerrit Code Review pushed patch set 4 for main to change 74517 status
NewUnder Review 05/05/22, 06:53 -
Gerrit Code Review pushed patch set 5 for main to change 74517 06/01/22, 11:30
-
Gerrit Code Review 06/01/22, 11:33 Patch set 2 for branch *main* of project *Teams/Security/TYPO3v4-Core* has been pushed to the review server. It is available at https://review.typo3.org/c/Teams/Security/TYPO3v4-Core/+/74520
-
Oliver Hader commented and changed status
Under ReviewOn Hold 06/02/22, 11:44 -
Gerrit Code Review pushed patch set 6 for main to change 74517 status
On HoldUnder Review 12/06/22, 12:35 -
Gerrit Code Review pushed patch set 7 for main to change 74517 12/06/22, 13:34
-
Gerrit Code Review 12/07/22, 10:09 Patch set 3 for branch *main* of project *Teams/Security/TYPO3v4-Core* has been pushed to the review server. It is available at https://review.typo3.org/c/Teams/Security/TYPO3v4-Core/+/74520
-
Gerrit Code Review pushed patch set 1 for 11.5 to change 76945 12/07/22, 13:02
-
Gerrit Code Review pushed patch set 1 for 10.4 to change 76947 12/07/22, 13:11
-
Gerrit Code Review 12/07/22, 13:30 Patch set 4 for branch *main* of project *Teams/Security/TYPO3v4-Core* has been pushed to the review server. It is available at https://review.typo3.org/c/Teams/Security/TYPO3v4-Core/+/74520
-
Oliver Hader commented and changed status
Under ReviewResolved done0 %100 % 12/07/22, 13:35Applied in changeset commit:36459901858eb7ad3f2ac3789fc53c61b65c2589.
-
Gerrit Code Review pushed patch set 1 for 12.1 to change 77112 status
ResolvedUnder Review 12/13/22, 11:07 -
Oliver Hader commented and changed status
Under ReviewResolved 12/13/22, 11:20Applied in changeset commit:645c9cab2dc9431a0e940176c8754b66ccef5543.
-
Benni Mack changed status
ResolvedClosed 02/08/23, 16:05
Trapped in discussion loop