2017 © Pedro Peláez
 

library selector

Get the values from an array or a json string using fluent selectors

image

rezouce/selector

Get the values from an array or a json string using fluent selectors

  • Monday, November 16, 2015
  • by Rezouce
  • Repository
  • 1 Watchers
  • 0 Stars
  • 715 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 5 % Grown

The README.md

Selector

This library allow to retrieve data from an array or a json string using selectors:, (*1)

Installation

composer require rezouce/selector, (*2)

Usage

<?php
use Selector\Selector;
use Selector\Parser\ArrayParser;

$data = [
    'users' => [
        'name' => 'Steve',
        'age' => 49,
    ],
    [
        'name' => 'Edward',
        'age' => 34,
    ],
];

$selector = new Selector($data, new ArrayParser);

$selector->get('users.name'); // return ['Steve', 'Edward']
$selector->get('users[1].name'); // return 'Edward'

License

This library is open-sourced software licensed under the MIT license, (*3)

The Versions

16/11 2015

dev-master

9999999-dev

Get the values from an array or a json string using fluent selectors

  Sources   Download

MIT

The Development Requires

by Avatar Rezouce

16/11 2015

1.0.1

1.0.1.0

Get the values from an array or a json string using fluent selectors

  Sources   Download

MIT

The Development Requires

by Avatar Rezouce

19/10 2015

1.0.0

1.0.0.0

Get the values from an array or a json string using fluent selectors

  Sources   Download

MIT

The Development Requires

by Avatar Rezouce