[FEATURE] Allow calling toArray() on ObjectStorage using name getArray() 61/46961/3
authorClaus Due <claus@namelesscoder.net>
Mon, 29 Feb 2016 14:17:41 +0000 (15:17 +0100)
committerBenni Mack <benni@typo3.org>
Sat, 5 Mar 2016 19:48:10 +0000 (20:48 +0100)
commitb867832b9c15cf6c3ecd9a63ada8235605c23176
tree2c2040baa1f0959873b038d494f176b63ad58b74
parent5f0224c84e9da0a4660a3b7ebbcc0b450cee8501
[FEATURE] Allow calling toArray() on ObjectStorage using name getArray()

This change adds an alias method which allows ObjectStorage's
values to be accessed using a "get"-prefixed method name which
in turn allows the values to be addressed using numerical
indices or converted to arrays on-the-fly by adding an ".array"
segment to the property path.

Change-Id: Ibe94910d6043a52c7ef330e18e0330021ecbb325
Resolves: #73752
Releases: master
Reviewed-on: https://review.typo3.org/46961
Reviewed-by: Oliver Hader <oliver.hader@typo3.org>
Tested-by: Oliver Hader <oliver.hader@typo3.org>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
typo3/sysext/core/Documentation/Changelog/master/Feature-73752-AllowAccessingObjectStorageAsArrayInFluidAndOtherPlaces.rst [new file with mode: 0644]
typo3/sysext/extbase/Classes/Persistence/ObjectStorage.php
typo3/sysext/extbase/Tests/Unit/Persistence/ObjectStorageTest.php