GithubHelp home page GithubHelp logo

sitnikovik / flex-array Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 52 KB

A powerful lightweight tool for representing an array as an object collection for reading and modifying it.

License: MIT License

PHP 100.00%
array arrays php tool toolkit

flex-array's Introduction

flex-array's People

Contributors

sitnikovik avatar

Watchers

 avatar

flex-array's Issues

Add new features

  • Add Sequence class stores list of elements but could not be changed after created

Add stack iterator method

Add the method to iterate all stack items and implement provided callback (2nd arg for example) to each item

Add new methods

  • getInteger() - returns value cast to integer on found by key
  • getFloat() - returns value cast to float on found by key
  • getString() - returns value cast to string on found by key
  • getBoolean() - returns value cast to boolean on found by key
  • getAny() - returns value first matched by list of keys provided
  • countByKey() - counts array elems quantity keyed by

Map implementation

Add map implementation with string keys and mixed values.
under the hood it should look like dynamic array with only string keys.
This data structure will be useful to implement some cache actual in runtime.

Отрефачить flex-array

Сделать версию для PHP 7.3, переписать тесты из скрипта на PHPUnit и просто пройтись по коду и обновить если нужно

Add type maps

It is need to implement type maps that can store only one type data.
For the first it can implement scalar type such as integer, float, string, bool.
When this library has type list implementation you may use it to implement for the next version.

Update readme

Since there are map and type list implemented the readme.md is not updated

New features

add:

  • checking of non-empty fields by one method or by list

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.