Author: Vincent Klaiber (hello@vinkla.com)
Inheritance: extends GrahamCampbell\Manager\AbstractManager
Exemplo n.º 1
0
 /**
  * Create a new indexer service.
  *
  * @param  AlgoliaManager  $client
  * @param  CustomParser  $markdown
  * @param  Filesystem  $files
  * @return void
  */
 public function __construct(AlgoliaManager $client, CustomParser $markdown, Filesystem $files)
 {
     $this->files = $files;
     $this->client = $client;
     $this->markdown = $markdown;
     $this->index = $client->initIndex(static::$index_name . '_tmp');
 }
Exemplo n.º 2
0
 /**
  * Index Exists.
  *
  * Does this index exist?
  *
  * @return bool
  */
 public function indexExists()
 {
     foreach (Arr::get($this->client->listIndexes(), 'items', []) as $index) {
         if ($index['name'] == $this->getConfigurator()->index()) {
             return true;
         }
     }
     return false;
 }