2017 © Pedro Peláez
 

library walker

Easily and securely retrieve some values in datas

image

x-o-r/walker

Easily and securely retrieve some values in datas

  • Friday, December 1, 2017
  • by x-o-r
  • Repository
  • 2 Watchers
  • 1 Stars
  • 2 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

Walker

Build Status Code Coverage Scrutinizer Code Quality, (*1)

Easily and securely access all targeted data nodes at different depths in data !, (*2)

Usage

Retrieve Foo->Bar, (*3)

(new Walker)
    ->from(
        (object)["Foo" =>
            (object)["Bar" => "Value"]
        ])
    ->with('Foo->Bar')
    ->asString();

/* Will return 'Value' */

Retrieve Foo->Bar in JSON stream, (*4)


(new Walker) ->fromJson('{ "Foo": { "Bar": "Value" } }') ->with('Foo->Bar') ->asString(); /* Will return 'Value' */

Retrieve Foo->Bar and Walker->Texas->Ranger, (*5)


(new Walker) ->from([ (object)["Foo" =>(object)["Bar" => "Some"]], (object)["Walker" =>(object)["Texas" => (object)["Ranger" => "values"]]] ]) ->with('Foo->Bar') ->with('Walker->Texas->Ranger') ->asString(); /* Will return 'Some, values' */

With values located at different depths, (*6)


(new Walker) ->from([ (object)["Walker" => (object)["Texas" => (object) ['Ranger' => 'All'] ] ], (object)["Walker" => [ (object)["Texas" => (object)["Ranger" => "targets"]], (object)['Texas' => (object)['Ranger' => 'are']], ] ], (object)['Walker' => (object)['Texas' => (object)['Ranger' => 'retrieved']]] ]) ->with('Walker->Texas->Ranger') ->asString(function($founds) { return join(' ', $founds); }); /* Will return 'All targets are retrieved' */

The Versions

01/12 2017

dev-master

9999999-dev https://github.com/x-o-r/walker

Easily and securely retrieve some values in datas

  Sources   Download

MIT

The Requires

  • php >=7.1

 

The Development Requires

by Vincent Ravier

01/12 2017

1.0.2

1.0.2.0 https://github.com/x-o-r/walker

Easily and securely retrieve some values in datas

  Sources   Download

MIT

The Requires

  • php >=7.1

 

The Development Requires

by Vincent Ravier

29/11 2017

1.0.1

1.0.1.0 https://github.com/x-o-r/walker

Easily and securely retrieve some values in datas

  Sources   Download

MIT

The Requires

  • php >=7.1

 

The Development Requires

by Vincent Ravier

29/11 2017

1.0.0

1.0.0.0

Easily and securely retrieve some values in datas

  Sources   Download

MIT

The Development Requires

by Vincent Ravier