indexStructureFactory = $indexStructureFactory; } /** * @inheritdoc */ public function delete( $index, array $dimensions = [] ) { return $this->getEntity()->delete($index, $dimensions); } /** * @inheritdoc */ public function create( $index, array $fields, array $dimensions = [] ) { return $this->getEntity()->create($index, $fields, $dimensions); } /** * Get instance of current index structure * * @return IndexStructureInterface */ private function getEntity() { if (empty($this->indexStructureEntity)) { $this->indexStructureEntity = $this->indexStructureFactory->create(); } return $this->indexStructureEntity; } }