Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 292538

Create \Drupal\Component\Utility\ArrayObject

$
0
0

Problem/Motivation

Drupal has arrays.

Drupal has LOTS of arrays.

Arrays are, sometimes, quite painful to manipulate and test.

We need a base object that we can start creating other strongly typed objects on that do nothing but manipulate and extract information from arrays (at their core, no pun intended):

Additional use-cases for existing issues:

Unfortunately, the SPL \ArrayObject isn't really all that "feature rich" with all the various tasks that we commonly do with arrays.

Proposed resolution

Implement our own custom base ArrayObject class, similar to something that resembles:

https://cgit.drupalcode.org/plus/tree/src/Utility/ArrayObject.php?h=8.x-4.x

Remaining tasks

  • Create patch
  • Create tests

User interface changes

None

API changes

Utility/API addition

Data model changes

None


Viewing all articles
Browse latest Browse all 292538

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>