本文整理汇总了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);
}