A Silex Service Provider for the official Elasticsearch Client.
{
"require": {
"prigornitskiy/elasticsearch-service-provider": "master"
}
}
use Silex\Application;
use xmarcos\Silex\ElasticsearchServiceProvider
$app = new Application();
$app->register(new ElasticsearchServiceProvider(), [
'elasticsearch.params' => [
'hosts' => [
'127.0.0.1:9200'
],
'logging' => false
]
]);
$app['elasticsearch']->ping();
MIT License