2017 © Pedro Peláez
 

library array-updater

Library allows easily update multidimensional arrays

image

kozz/array-updater

Library allows easily update multidimensional arrays

  • Wednesday, January 14, 2015
  • by urakozz
  • Repository
  • 2 Watchers
  • 1 Stars
  • 5,129 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 7 Versions
  • 0 % Grown

The README.md

PHP Array Updater

Build Status Coverage Status Scrutinizer Code Quality Latest Stable Version Latest Unstable Version License, (*1)

Recursive Array Updater

Update One

  $source = ['this' => ['is' => ['the' => ['path' => [
    1,2,3,4,5
  ]]]]];

  $array = 
    ArrayUpdater::from($source)
    ->node('this')->node('is')->node('the')->node('path')->all()
    ->replace(1, 100);

  /**
   * $array = ['this' => ['is' => ['the' => ['path' => [
   *   100,2,3,4,5
   * ]]]]];
   */

Update Multiple

  $source = ['this' => [
    ['the' => ['path' => [
      1,2,3,4,5
    ]]],
    ['the' => ['path' => [
      1,2,3,4,5
    ]]]
  ]];

  $array = 
    ArrayUpdater::from($array)
    ->node('this')->all()->node('the')->node('path')->all()
    ->replaceAssoc([1=>100, 3=>300]);

  /**
   *
   * $array = ['this' => [
   *  ['the' => ['path' => [
   *    100,2,300,4,5
   *  ]]],
   *  ['the' => ['path' => [
   *    100,2,300,4,5
   *  ]]]
   * ]];
   */
   *

The Versions

14/01 2015

dev-master

9999999-dev http://github.com/urakozz/php-array-updater

Library allows easily update multidimensional arrays

  Sources   Download

MIT

The Requires

 

The Development Requires

merge data

14/01 2015

1.2.1

1.2.1.0 http://github.com/urakozz/php-array-updater

Library allows easily update multidimensional arrays

  Sources   Download

MIT

The Requires

 

The Development Requires

merge data

26/08 2014

1.0.1

1.0.1.0 http://github.com/urakozz/php-array-updater

Library allows easily update multidimensional arrays

  Sources   Download

MIT

The Requires

 

The Development Requires

merge data

26/08 2014

1.0.2

1.0.2.0 http://github.com/urakozz/php-array-updater

Library allows easily update multidimensional arrays

  Sources   Download

MIT

The Requires

 

The Development Requires

merge data

26/08 2014

1.2.0

1.2.0.0 http://github.com/urakozz/php-array-updater

Library allows easily update multidimensional arrays

  Sources   Download

MIT

The Requires

 

The Development Requires

merge data

26/08 2014

1.1.0

1.1.0.0 http://github.com/urakozz/php-array-updater

Library allows easily update multidimensional arrays

  Sources   Download

MIT

The Requires

 

The Development Requires

merge data

26/08 2014

1.0.0

1.0.0.0 http://github.com/urakozz/php-array-updater

Library allows easily update multidimensional arrays

  Sources   Download

MIT

The Requires

 

The Development Requires

merge data