本文整理匯總了PHP中Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract::noRetry方法的典型用法代碼示例。如果您正苦於以下問題:PHP Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract::noRetry方法的具體用法?PHP Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract::noRetry怎麽用?PHP Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract::noRetry使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract
的用法示例。
在下文中一共展示了Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract::noRetry方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: testNoRetry
/**
* Test retry policy - noRetry
*/
public function testNoRetry()
{
$this->_executedRetries = 0;
$policy = Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract::noRetry();
$retries = $policy->execute(array($this, '_countRetries'));
$this->assertEquals(1, $retries);
}
示例2: setRetryPolicy
/**
* Set retry policy to use when making requests
*
* @param Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract $retryPolicy Retry policy to use when making requests
*/
public function setRetryPolicy(Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract $retryPolicy = null)
{
$this->_retryPolicy = $retryPolicy;
if (is_null($this->_retryPolicy)) {
$this->_retryPolicy = Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract::noRetry();
}
}
示例3: __construct
/**
* Creates a new Zend_Service_WindowsAzure_Management instance
*
* @param string $subscriptionId Subscription ID
* @param string $certificatePath Management certificate path (.PEM)
* @param string $certificatePassphrase Management certificate passphrase
* @param Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract $retryPolicy Retry policy to use when making requests
*/
public function __construct($subscriptionId, $certificatePath, $certificatePassphrase, Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract $retryPolicy = null)
{
$this->_subscriptionId = $subscriptionId;
$this->_certificatePath = $certificatePath;
$this->_certificatePassphrase = $certificatePassphrase;
$this->_retryPolicy = $retryPolicy;
if (is_null($this->_retryPolicy)) {
$this->_retryPolicy = Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract::noRetry();
}
// Setup default Zend_Http_Client channel
$options = array('adapter' => 'Zend_Http_Client_Adapter_Socket', 'ssltransport' => 'ssl', 'sslcert' => $this->_certificatePath, 'sslpassphrase' => $this->_certificatePassphrase, 'sslusecontext' => true);
if (function_exists('curl_init')) {
// Set cURL options if cURL is used afterwards
$options['curloptions'] = array(CURLOPT_FOLLOWLOCATION => true, CURLOPT_TIMEOUT => 120);
}
$this->_httpClientChannel = new Zend_Http_Client(null, $options);
}