original_string: public static function getSignedPolicyURL($policy)
  	{
  		$data = json_encode($policy);
  		$signature = '';
  		if (!openssl_sign($data, $signature, self::$__signingKeyResource)) return false;
  
  		$encoded = str_replace(array('+', '='), array('-', '_', '~'), base64_encode($data));
  		$signature = str_replace(array('+', '='), array('-', '_', '~'), base64_encode($signature));
  
  		$url = $policy['Statement'][0]['Resource'] . '?';
  		foreach (array('Policy' => $encoded, 'Signature' => $signature, 'Key-Pair-Id' => self::$__signingKeyPairId) as $k => $v)
  			$url .= $k.'='.str_replace('%2F', '/', rawurlencode($v)).'&';
  		return substr($url, 0, -1);
  	}
code: public static function getSignedPolicyURL($policy)
  	{
  		$data = json_encode($policy);
  		$signature = '';
  		if (!openssl_sign($data, $signature, self::$__signingKeyResource)) return false;
  
  		$encoded = str_replace(array('+', '='), array('-', '_', '~'), base64_encode($data));
  		$signature = str_replace(array('+', '='), array('-', '_', '~'), base64_encode($signature));
  
  		$url = $policy['Statement'][0]['Resource'] . '?';
  		foreach (array('Policy' => $encoded, 'Signature' => $signature, 'Key-Pair-Id' => self::$__signingKeyPairId) as $k => $v)
  			$url .= $k.'='.str_replace('%2F', '/', rawurlencode($v)).'&';
  		return substr($url, 0, -1);
  	}
code_tokens: public static function getSignedPolicyURL ( $ policy ) { $ data = json_encode ( $ policy ) ; $ signature = '' ; if ( ! openssl_sign ( $ data , $ signature , self :: $ __signingKeyResource ) ) return false ; $ encoded = str_replace ( array ( '+' , '=' ) , array ( '-' , '_' , '~' ) , base64_encode ( $ data ) ) ; $ signature = str_replace ( array ( '+' , '=' ) , array ( '-' , '_' , '~' ) , base64_encode ( $ signature ) ) ; $ url = $ policy [ 'Statement' ] [ 0 ] [ 'Resource' ] . '?' ; foreach ( array ( 'Policy' => $ encoded , 'Signature' => $ signature , 'Key-Pair-Id' => self :: $ __signingKeyPairId ) as $ k => $ v ) $ url .= $ k . '=' . str_replace ( '%2F' , '/' , rawurlencode ( $ v ) ) . '&' ; return substr ( $ url , 0 , - 1 ) ; }
docstring: Get a CloudFront signed policy URL
  
  @param array $policy Policy
  @return string
docstring_tokens: Get a CloudFront signed policy URL