[TYPO3-mvc] Iterate through ObjectStorage Object using offset

Kevin Ulrich Moschallski km at 3digit.de
Tue May 25 18:27:45 CEST 2010


Hi,

please ignore my last message. After i switched my dev system to php 5.3 everything is fine. Now i try to go through my storage object.

Regards,

Kevin Moschallski

Am 25.05.2010 um 18:21 schrieb Kevin Ulrich Moschallski:

> Thanks for your reply,
> 
> i just updated to the newest revision and now i get this error:
> 
> PHP Fatal error:  Declaration of Tx_Extbase_Persistence_ObjectStorage::offsetSet() must be compatible with that of ArrayAccess::offsetSet() in /Applications/MAMP/htdocs/santen/typo3conf/ext/extbase/Classes/Persistence/ObjectStorage.php on line 35
> 
> A don't call offsetSet() myself and i can't find the reason for this error. Any hint?
> 
> Regards,
> 
> Kevin Moschallski
> 
> 
> Am 25.05.2010 um 18:13 schrieb Thomas Thasmo Deinhamer:
> 
>> 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
>> _______________________________________________
>> TYPO3-project-typo3v4mvc mailing list
>> TYPO3-project-typo3v4mvc at lists.typo3.org
>> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc
> 
> _______________________________________________
> TYPO3-project-typo3v4mvc mailing list
> TYPO3-project-typo3v4mvc at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc



More information about the TYPO3-project-typo3v4mvc mailing list