adhocore / plastic
Fund package maintenance!
adhocore
paypal.me/ji10
Requires
- php: >=7.0.0
Requires (Dev)
- phpunit/phpunit: ^4.8 || ^5.7 || ^6.5
This package is auto-updated.
Last update: 2024-09-21 18:09:38 UTC
README
PHP elasticsearch wrapper designed to be minimal, intuitive and dependency free.
Installation
composer require adhocore/plastic
Usage
use Ahc\Plastic\Client; # Instantiate: $client = new Ahc\Plastic\Client(null, true); # Usage convention: $client->{$httpMethod}->$segment1->$segment2->$method($data, $query); # For numeric segment or method, prepend with `_`! # (this is because PHP doesnt allow numeric method or props without some hack) # Example: $client->post->articles->article->_1(['json_key' => 'value'], ['query' => 'param']);
See ./test.php for more.
API
There is none. It works analagous to the RESTful API of elasticsearch.
Contributing
Please check the guide
LICENSE
© MIT | 2019, Jitendra Adhikari