lib/Elastica/AbstractUpdateAction.php
public function setType($type)
    {
        if ($type instanceof Type) {
            $this->setIndex($type->getIndex());
            $type = $type->getName();
        }

        return $this->setParam('_type', $type);
    }
public function setType($type)
    {
        if ($type instanceof Type) {
            $this->setIndex($type->getIndex());
            $type = $type->getName();
        }

        return $this->setParam('_type', $type);
    }
public function setType ( $ type ) { if ( $ type instanceof Type ) { $ this -> setIndex ( $ type -> getIndex ( ) ) ; $ type = $ type -> getName ( ) ; } return $ this -> setParam ( '_type' , $ type ) ; }
Sets the document type name.

@param Type|string $type Type name

@return $this
Sets the document type name .