public function init($param)
    {

        if (empty($param)) return false;

        $this->header = '';

        $param_list = new ParamList();
        foreach ($param as $key => $value) {
            if (property_exists($this, $key)) $this->$key = $value;
            elseif (property_exists($param_list, strtolower(str_replace('-', '_', $key)))) {
                if (is_string($value)) {
                    $this->header[] = new SingleParam($key, $value);
                } elseif (is_array($value)) {
                    $this->header[] = new MultiParam($key, $value);
                }
            }

        }


        return true;
    }
public function init($param)
    {

        if (empty($param)) return false;

        $this->header = '';

        $param_list = new ParamList();
        foreach ($param as $key => $value) {
            if (property_exists($this, $key)) $this->$key = $value;
            elseif (property_exists($param_list, strtolower(str_replace('-', '_', $key)))) {
                if (is_string($value)) {
                    $this->header[] = new SingleParam($key, $value);
                } elseif (is_array($value)) {
                    $this->header[] = new MultiParam($key, $value);
                }
            }

        }


        return true;
    }
public function init ( $ param ) { if ( empty ( $ param ) ) return false ; $ this -> header = '' ; $ param_list = new ParamList ( ) ; foreach ( $ param as $ key => $ value ) { if ( property_exists ( $ this , $ key ) ) $ this -> $ key = $ value ; elseif ( property_exists ( $ param_list , strtolower ( str_replace ( '-' , '_' , $ key ) ) ) ) { if ( is_string ( $ value ) ) { $ this -> header [ ] = new SingleParam ( $ key , $ value ) ; } elseif ( is_array ( $ value ) ) { $ this -> header [ ] = new MultiParam ( $ key , $ value ) ; } } } return true ; }
set the parameters

@param $param

@return bool
set the parameters