1. Go to this page and download the library: Download ajant/db-mock-library library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
...
// inserts both rows of index_2 and both rows of index_1, because
Elasticsearch::getInstance()->setUp(['index_2' => [0, 1]]);
// inserts all indexes
Elasticsearch::getInstance()->setUp();
// inserts only index_1
Elasticsearch::getInstance()->setUp(['index_1']);
...
...
// removes all rows inserted during set up phase, including dependencies
Elasticsearch::getInstance()->cleanUp();
// removes all indexes
Elasticsearch::getInstance()->tearDown();
// removes only index_1
Elasticsearch::getInstance()->tearDown(['index_1']);
...
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.