schema icon indicating copy to clipboard operation
schema copied to clipboard

Access the $items property in the Structure class

Open ncou opened this issue 4 years ago • 3 comments
trafficstars

Hi,

Nice piece of code. Do you think there is a way to access the $items property in the Structure::class ? I use this value in 2 cases :

  1. Force the castTo('array') for all the structure and sub-structures.
  2. I need to enforce the key value used to be only in the range ['a-z0-9_'].

For the moment i do a reflection and i access the private property, but a public function getItems() could be usefull. Or perhaps an "iterator" inside the structure class.

What do you think about this feature, this could add more flexibility using this great library.

Keep up the good work.

ncou avatar Dec 12 '20 17:12 ncou

I will add an API for accessing private values in next version (it is also related to #1).

dg avatar Dec 18 '20 11:12 dg

good news ! thank you for the quick answer.

ncou avatar Dec 18 '20 11:12 ncou

Hi @dg, do we have an estimated date for this release ? Thanks. Keep up the good work.

ncou avatar May 14 '21 05:05 ncou