1<?php
2
3namespace Elastica\Processor;
4
5use Elastica\Param;
6use Elastica\Util;
7
8/**
9 * Elastica Processor object.
10 *
11 * @author Federico Panini <fpanini@gmail.com>
12 *
13 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ingest-processors.html
14 */
15abstract class AbstractProcessor extends Param
16{
17    protected function _getBaseName()
18    {
19        $shortName = (new \ReflectionClass($this))->getShortName();
20        $shortName = \preg_replace('/Processor$/', '', $shortName);
21
22        return Util::toSnakeCase($shortName);
23    }
24}
25