ajthinking/data-query

This is my package data-query

dev-master 2022-07-04 12:33 UTC

This package is auto-updated.

Last update: 2022-08-04 12:44:11 UTC


README

Access properties and methods in uncertain PHP data structures. Supports object and array access and can forward method calls. It automatically interprets the underlying data structure (JSON, array or object) and simply gives you the (nested) result.

Installation

composer require ajthinking/data-query

Usage

use Ajthinking\DataQuery\DataQuery;

DataQuery::in($spaghetti)
	->prop
	->method('some arg')    
	->nestedProp
	['deep nested prop with spaces']
	->get(); // result or null

License

The MIT License (MIT). Please see License File for more information.

68747470733a2f2f6769746875622d6164732e73332e65752d63656e7472616c2d312e616d617a6f6e6177732e636f6d2f737570706f72742d756b7261696e652e7376673f743d31