<?php
namespace App\Services\Elastic;
use App\Extern\ExternElasticService;
use Psr\Log\LoggerInterface;
abstract class AbstractElasticService
{
/** @var ExternElasticService $elasticService */
protected $elasticService;
/** @var string $index */
protected $index;
/** @var LoggerInterface $logger */
protected $logger;
public function __construct(string $host, string $port, string $transport, LoggerInterface $logger, string $index)
{
$this->elasticService = new ExternElasticService($host, $port, $transport, $logger);
$this->elasticService->addAndSetIndex($index);
$this->logger = $logger;
$this->index = $index;
}
}