Giter Site home page Giter Site logo

arrayzy's People

Contributors

bluemanos avatar bocharsky-bw avatar justusadam avatar m1 avatar pmysiak avatar talyssonoc avatar th3l0g4n avatar visualfanatic avatar xedinunknown avatar znck avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

arrayzy's Issues

Provide PHP 5.3 support

Based on that fact there're many projects works legacy on PHP 5.3 we definitily should provide this support with Arrayzy. Thanks @danielstjules for pointing me.

Upgrade PHPUnit

Hi,

I have a project that uses PHPUnit >= 5.4. I would like to use your library, because your require-dev PHPUnit constraint ~4.5 won't allow it. Therefore, I ask if it's possible that you could upgrade the required version of PHPUnit. I understand that you would like to be able to test the library with older versions of PHPUnit, and therefore I suggest that you specify the version for phpunit/phpunit as ~4.5 || ^5.0 or similar. I ran composer update phpunit/phpunit --with-dependencies while having the above constraint, and with PHPUnit then at 5.4 I ran phpunit in the project directory without any issues, and all tests passing.

Thanks.

Refactor constructor with variadic arguments

This Hall_of_Famer idea from his comment on reddit.com.

I see that you create your array objects by accepting a parameter of PHP array. I wonder though, why dont you just make the constructor and other factory methods variadic? So instead of this:

$immArr = new ImmutableArray([1, 2, 3]);
$mutArr = new MutableArray([1, 2, 3]);

You now have:

$immArr = new ImmutableArray(1, 2, 3);
$mutArr = new MutableArray(1, 2, 3);

This way the API looks a lot cleaner to me. Also I think it is better to separate arrays from dictionaries/hash tables. So it would be better to have separate classes that handle numeric and associative array differently, than to have one array class that does both.

API

Вітаю!
Було б непогано реєструвати свої власні методи, типу такого API, щоб на льоту визначати функції і викликати потім через __call і __callStatic

A::register('myMethod', function(){
    /* ... */
})

$ A = A :: create (['a', 'b', 'c']);
$ A -> myMethod();

Publish Interfaces Separately

Hi,

First of all, I'd like to say that I really like this project. One for its simplicity, and two for the fact that it has interfaces and traits. Thanks a lot, @bocharsky-bw!

However, having interfaces in the same repository as the implementation kind of beats the point of having interfaces, in my opinion. In my particular case, I would like to provide a padding interface that all my libraries and components can depend on, and use your implementation in the actual application. However, because you have the interfaces published together with the implementation, my libs have to depend on your implementation, whereas I would like to only depend on your interfaces.

Therefore, I would like to make a humble request that you publish the interfaces separately, and have this project depend on them. Then, I can do the same :)

Thanks again.

get and set methods

@bocharsky-bw Have you thought about having get and set methods? e.g.

$a = ImmutableArray::create(['key_1' => 'a', 'key_2' =>  'b']);
$a->get('key_1'); // a

$a->set('key_2', 'c');
$a->get('key_2'); // c

Also as for multidimensional arrays, you could possible be able to chain get e.g.

$a = ImmutableArray::create(['key_1' => ['key_2' => 'a']]);
$a->get('key_1')->get('key_2'); // a

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.