[TYPO3-mvc] Iterate through ObjectStorage Object using offset
Thomas "Thasmo" Deinhamer
thasmo at gmail.com
Tue May 25 18:13:07 CEST 2010
That's what I meant. :>
*thumbs up*
Thomas
Am 25.05.2010 18:05, schrieb Jochen Rau:
> Hi Kevin.
>
> On 25.05.10 17:48, Kevin Ulrich Moschallski wrote:
>> i have an ObjectStorage Object ($contentelements) which contains an
>> array of objects. I now want to go through the array in the object
>> storage. When i call
>>
>> $contentelements->current()
>>
>> i get the first object. When i add
>>
>> $contentelements->next()
>>
>> before this i get the second one. So far so good, but i want to set an
>> offset, because i want to use a page browser to display the objects.
>>
>> I tried to use $contentelements->offsetSet() on the object but i can't
>> figure out how to use this properly or if this is the right way to do
>> this.
>>
>> Did somebody ever tried this, i just can't find any information on
>> google or in this mailing list.
>
> With r2287 I committed earlier today, the ObjectStorage of Extbase
> behaves exactly the same as the SplObjectStorage. You can find more
> documentation here:
>
> http://de.php.net/manual/en/class.splobjectstorage.php
>
> Regards
> Jochen
More information about the TYPO3-project-typo3v4mvc
mailing list