public function type($type)
    {
        $type = strtoupper($type);
        if (!in_array($type, ['CURL', 'SOCKET', 'FILE'])) {
            $type = 'CURL';
        }
        $this->def['type'] = $type;
        return $this;
    }
public function type($type)
    {
        $type = strtoupper($type);
        if (!in_array($type, ['CURL', 'SOCKET', 'FILE'])) {
            $type = 'CURL';
        }
        $this->def['type'] = $type;
        return $this;
    }
public function type ( $ type ) { $ type = strtoupper ( $ type ) ; if ( ! in_array ( $ type , [ 'CURL' , 'SOCKET' , 'FILE' ] ) ) { $ type = 'CURL' ; } $ this -> def [ 'type' ] = $ type ; return $ this ; }
set handle type, can be CURL|SOCKET|FILE
@param  string $type
@return static
set handle type can be CURL|SOCKET|FILE