New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

adhocore/plastic

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

adhocore/plastic

Source
Packagist
Version
0.1.0
Version published
Total downloads
31
Maintainers
1
Created
Source

adhocore/plastic

PHP elasticsearch wrapper designed to be minimal, intuitive and dependency free.

Latest Version Travis Build Scrutinizer CI Codecov branch StyleCI Software License

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

Keywords

php

FAQs

Package last updated on 15 Feb 2019

Related posts