php-scalar-objects icon indicating copy to clipboard operation
php-scalar-objects copied to clipboard

ArrayHandler and StringHandler interface

Open eborden opened this issue 11 years ago • 1 comments

Arrays and Strings can share some common ground in implementation details. For in reality a string is just a list of characters. This means many Array methods would have common application on strings.

ArrayHandler and StringHandler should share a common interface of ArrayLikeInterface. I'll put together a pull request for illustration.

eborden avatar Jan 22 '14 21:01 eborden

By unifying these two APIs with an interface we decrease complexity in the often common verbiage we use to affect strings and arrays. IE has/contains, count/length, etc.

eborden avatar Jan 22 '14 21:01 eborden