public function setType($type)
    {
        switch ($type) {
            case self::TYPE_CSV:
                $this->headers->add(array('Content-Type' => 'text/csv;charset=' . self::UTF_16_LE));
                break;
            case self::TYPE_XLS:
                $this->headers->add(array("Content-Type" => "application/vnd.ms-excel"));
                break;
        }
        $this->type = $type;
    }
public function setType($type)
    {
        switch ($type) {
            case self::TYPE_CSV:
                $this->headers->add(array('Content-Type' => 'text/csv;charset=' . self::UTF_16_LE));
                break;
            case self::TYPE_XLS:
                $this->headers->add(array("Content-Type" => "application/vnd.ms-excel"));
                break;
        }
        $this->type = $type;
    }
public function setType ( $ type ) { switch ( $ type ) { case self :: TYPE_CSV : $ this -> headers -> add ( array ( 'Content-Type' => 'text/csv;charset=' . self :: UTF_16_LE ) ) ; break ; case self :: TYPE_XLS : $ this -> headers -> add ( array ( "Content-Type" => "application/vnd.ms-excel" ) ) ; break ; } $ this -> type = $ type ; }
Set export type

@param string $type
Set export type