private function createHeader()
    {
        $headers = $this->headers;

        $username = $this->getUsername();
        $auth_type = $this->getAuthType();

        if ('hash' == $auth_type) {
            $headers['Authorization'] = 'WHM ' . $username . ':' . preg_replace("'(\r|\n|\s|\t)'", '', $this->getPassword());
        } elseif ('password' == $auth_type) {
            $headers['Authorization'] = 'Basic ' . base64_encode($username . ':' .$this->getPassword());
        }
        return $headers;
    }
private function createHeader()
    {
        $headers = $this->headers;

        $username = $this->getUsername();
        $auth_type = $this->getAuthType();

        if ('hash' == $auth_type) {
            $headers['Authorization'] = 'WHM ' . $username . ':' . preg_replace("'(\r|\n|\s|\t)'", '', $this->getPassword());
        } elseif ('password' == $auth_type) {
            $headers['Authorization'] = 'Basic ' . base64_encode($username . ':' .$this->getPassword());
        }
        return $headers;
    }
private function createHeader ( ) { $ headers = $ this -> headers ; $ username = $ this -> getUsername ( ) ; $ auth_type = $ this -> getAuthType ( ) ; if ( 'hash' == $ auth_type ) { $ headers [ 'Authorization' ] = 'WHM ' . $ username . ':' . preg_replace ( "'(\r|\n|\s|\t)'" , '' , $ this -> getPassword ( ) ) ; } elseif ( 'password' == $ auth_type ) { $ headers [ 'Authorization' ] = 'Basic ' . base64_encode ( $ username . ':' . $ this -> getPassword ( ) ) ; } return $ headers ; }
Extend HTTP headers that will be sent.

@return array list of headers that will be sent

@since v1.0.0
Extend HTTP headers that will be sent .