Elastica\Type::getName PHP Method

getName() public method

Returns the type name.
public getName ( ) : string
return string Type name
    public function getName()
    {
        return $this->_name;
    }

Usage Example

 /**
  * @param string $typeName
  * @return \Elastica\Type
  * @throws \Exception
  */
 protected function deleteMapping($typeName)
 {
     $type = new Elastica\Type($this->index, $typeName);
     if ($type->exists()) {
         try {
             $type->delete();
         } catch (\Exception $e) {
             throw new \Exception('Could not delete type ' . $type->getName() . '');
         }
     }
     $type = new Elastica\Type($this->index, $typeName);
     return $type;
 }
All Usage Examples Of Elastica\Type::getName