Feature #6390

ObjectAccess::getPropertyPath doesn't support Arrays

Added by Marc Neuhaus over 5 years ago. Updated almost 5 years ago.

Status:Resolved Start date:2010-04-16
Priority:Should have Due date:
Assigned To:Karsten Dambekalns % Done:

100%

Category:Reflection
Target version:TYPO3 Flow Base Distribution - 1.0 alpha 8 Estimated time:1.00 hour
PHP Version: Complexity:
Has patch:

Description

Would be great to enable the Access of Arrays through the getPropertyPath.

It already used to work with this old implementation of the getProperty function:
static public function getPropertyPath($object, $propertyPath) {
$propertyPathSegments = explode('.', $propertyPath);
foreach ($propertyPathSegments as $pathSegment) {
$object = self::getProperty($object, $pathSegment);
if ($object === NULL) return NULL;
}
return $object;
}

Main Problem seems the isPropertyGettable function because it only checks the Objects getters and doesn't consider all Possibilities supported by the getProperty function.

ObjectAccess.diff Magnifier (420 Bytes) Marc Neuhaus, 2010-03-12 15:35


Related issues

related to TYPO3.Fluid - Feature #7203: Object accessor could work for associative arrays Resolved 2010-04-10

Associated revisions

Revision 075204e3
Added by Karsten Dambekalns over 5 years ago

[+FEATURE] FLOW3 (Reflection): ObjectAccess::getPropertyPath does support Arrays now, resolves #6390, relates to #7203.

History

#1 Updated by Karsten Dambekalns over 5 years ago

  • Category set to Reflection

#2 Updated by Marc Neuhaus over 5 years ago

Here is a Diff(Based on current trunk) to enable the Access of Arrays through ObjectAccess

#3 Updated by Karsten Dambekalns over 5 years ago

  • Tracker changed from Bug to Feature

#4 Updated by Karsten Dambekalns over 5 years ago

  • Status changed from New to Accepted
  • Assigned To set to Karsten Dambekalns
  • Target version set to 1.0 alpha 8
  • Start date changed from 2010-02-07 to 2010-04-16
  • Estimated time set to 1.00

#5 Updated by Karsten Dambekalns over 5 years ago

  • Status changed from Accepted to Resolved
  • % Done changed from 0 to 100

Applied in changeset r4185.

Also available in: Atom PDF