Skip to content
This repository has been archived by the owner on Jan 24, 2023. It is now read-only.

dkd/hosted_solr-php-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hosted-solr.com PHP Api Client

Build Status

With this php library you can list, created and delete solr cores on hosted-solr.com with your PHP Application.

The API-Client comes with some PHP Classes that are usefull to communicate with the api

HostedSolr\ApiClient\Domain\Api\Client\Solr\CoreRepository:

Used to create, retrieve and delete cores.

HostedSolr\ApiClient\Domain\Api\Client\Solr\Core:

The object representation of a core, you can use it to visualize all information that is retrieved by the api.

HostedSolr\ApiClient\Service:

Toplevel service object that can be used to do the most common tasks.

You can use all Classes of the ApiClient in your Application but it's recommended to use the service class only.

Example:

Install all composer dependencies:

curl -sS https://getcomposer.org/installer | php
php composer.php install
touch test.php

Explorer the api service an execute your operations (Add the following to your test.php file):

    require_once 'vendor/autoload.php';

    $service    = \HostedSolr\ApiClient\Factory::getApiService('<your-api-token>','<your-secret-token>');
    $allCores   = $service->getAllCores();