[TYPO3-dev] CONTENT: add support for virtual table

Martin Kutschker masi-no at spam-typo3.org
Thu Oct 21 16:09:41 CEST 2010


Am 21.10.2010 15:41, schrieb Steffen Kamper:
> Hi,
> 
> i discussed array handling in TS with Joey as it was also a request from our talk at T3Con10.
> One big problem is that TS has it's own syntax with arrays (property.) which makes it really hard to
> parse, though array handling in php is very easy.

While I said "yes" I don't think that it is essential that the whole PHP array is transformed to TS.
The main issue in my projects was that I have data structured in an array (or an objcet implementing
the Iterator interface) that I wanted to use in a way like CONTENT.

Why would you need functions like array_shift in a template? Looks like business logic to me :)

Maybe this could work:

myAssocArray = MAP
myAssocArray.keyA = value
myAssocArray := pushItem(keyB,another value)

I'm using MAP (short for key-value-map) instead of ARRAY to make clear that this structire has no
numeric keys, but avoid the long ASSOCIATIVE_ARRAY.

Masi




More information about the TYPO3-dev mailing list