src/Widop/Twitter/OAuth/OAuthRequest.php
public function getSignature()
    {
        if ($this->hasFileParameters()) {
            $elements = $this->getOAuthParameters();
        } else {
            $elements = array_merge(
                $this->getOAuthParameters(),
                $this->getGetParameters(),
                $this->getPostParameters()
            );
        }

        ksort($elements);

        $stringSignature = array();
        foreach ($elements as $key => $value) {
            $stringSignature[] = sprintf('%s=%s', $key, $value);
        }

        $signature = array(
            $this->getMethod(),
            rawurlencode($this->getSignatureUrl()),
            rawurlencode(implode('&', $stringSignature)),
        );

        return implode('&', $signature);
    }
public function getSignature()
    {
        if ($this->hasFileParameters()) {
            $elements = $this->getOAuthParameters();
        } else {
            $elements = array_merge(
                $this->getOAuthParameters(),
                $this->getGetParameters(),
                $this->getPostParameters()
            );
        }

        ksort($elements);

        $stringSignature = array();
        foreach ($elements as $key => $value) {
            $stringSignature[] = sprintf('%s=%s', $key, $value);
        }

        $signature = array(
            $this->getMethod(),
            rawurlencode($this->getSignatureUrl()),
            rawurlencode(implode('&', $stringSignature)),
        );

        return implode('&', $signature);
    }
public function getSignature ( ) { if ( $ this -> hasFileParameters ( ) ) { $ elements = $ this -> getOAuthParameters ( ) ; } else { $ elements = array_merge ( $ this -> getOAuthParameters ( ) , $ this -> getGetParameters ( ) , $ this -> getPostParameters ( ) ) ; } ksort ( $ elements ) ; $ stringSignature = array ( ) ; foreach ( $ elements as $ key => $ value ) { $ stringSignature [ ] = sprintf ( '%s=%s' , $ key , $ value ) ; } $ signature = array ( $ this -> getMethod ( ) , rawurlencode ( $ this -> getSignatureUrl ( ) ) , rawurlencode ( implode ( '&' , $ stringSignature ) ) , ) ; return implode ( '&' , $ signature ) ; }
Gets the request signature.

@return string The request signature.
Gets the request signature .