1<?php 2 3namespace Elastica\Query; 4 5use Elastica\Param; 6use Elastica\Util; 7 8/** 9 * Abstract query object. Should be extended by all query types. 10 * 11 * @author Nicolas Ruflin <spam@ruflin.com> 12 */ 13abstract class AbstractQuery extends Param 14{ 15 protected function _getBaseName() 16 { 17 $shortName = (new \ReflectionClass($this))->getShortName(); 18 $shortName = \preg_replace('/Query$/', '', $shortName); 19 20 return Util::toSnakeCase($shortName); 21 } 22} 23