public function sign($url, $expires = null, $options = [])
    {
        if (parse_url($url, PHP_URL_QUERY)) {
            throw new \InvalidArgumentException('This signer do not accept URL with query string');
        }

        if (!$expires) {
            $expires = time() + $this->options['default_age'];
        }

        return $url . '?' . $this->makeQueryString($this->makeQueryParams($url, $expires, $options));
    }
public function sign($url, $expires = null, $options = [])
    {
        if (parse_url($url, PHP_URL_QUERY)) {
            throw new \InvalidArgumentException('This signer do not accept URL with query string');
        }

        if (!$expires) {
            $expires = time() + $this->options['default_age'];
        }

        return $url . '?' . $this->makeQueryString($this->makeQueryParams($url, $expires, $options));
    }
public function sign ( $ url , $ expires = null , $ options = [ ] ) { if ( parse_url ( $ url , PHP_URL_QUERY ) ) { throw new \ InvalidArgumentException ( 'This signer do not accept URL with query string' ) ; } if ( ! $ expires ) { $ expires = time ( ) + $ this -> options [ 'default_age' ] ; } return $ url . '?' . $ this -> makeQueryString ( $ this -> makeQueryParams ( $ url , $ expires , $ options ) ) ; }
Create a new URL Signer instance.

Available signed URL options:
array['client_ip']   (Optional) Defines client IP that are allowed to access.
array['method']     (Optional) Defines HTTP method that allows to use (Default is 'GET').
array['user_agent']  (Optional) Defines user agent in header that are allowed to access.

@param  string   $url  Original URL to sign
@param  int  $expires  The time that signed URL should expires in Unix timestamp in seconds
@param  array  $options  Signed URL options (See above)
@return string  Signed URL
Create a new URL Signer instance .