本文整理匯總了PHP中phpiredis_reader_set_status_handler函數的典型用法代碼示例。如果您正苦於以下問題:PHP phpiredis_reader_set_status_handler函數的具體用法?PHP phpiredis_reader_set_status_handler怎麽用?PHP phpiredis_reader_set_status_handler使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了phpiredis_reader_set_status_handler函數的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: initializeReader
/**
* Initializes the protocol reader resource.
*/
protected function initializeReader()
{
$reader = phpiredis_reader_create();
phpiredis_reader_set_status_handler($reader, $this->getStatusHandler());
phpiredis_reader_set_error_handler($reader, $this->getErrorHandler());
$this->reader = $reader;
}
示例2: initializeReader
/**
* Initializes the protocol reader resource.
*
* @param Boolean $throw_errors Specify if Redis errors throw exceptions.
*/
private function initializeReader($throw_errors = true)
{
if (!function_exists('phpiredis_reader_create')) {
throw new ClientException('The phpiredis extension must be loaded in order to be able to ' . 'use this connection class');
}
$reader = phpiredis_reader_create();
phpiredis_reader_set_status_handler($reader, $this->getStatusHandler());
phpiredis_reader_set_error_handler($reader, $this->getErrorHandler($throw_errors));
$this->_reader = $reader;
}
示例3: initializeReader
/**
* Initializes phpiredis' protocol reader.
*
* @param IConnectionParameters $parameters Parameters used to initialize the connection.
* @return resource
*/
private function initializeReader(IConnectionParameters $parameters)
{
$reader = phpiredis_reader_create();
phpiredis_reader_set_status_handler($reader, $this->getStatusHandler());
phpiredis_reader_set_error_handler($reader, $this->getErrorHandler($parameters->throw_errors));
return $reader;
}
示例4: createReader
/**
* Creates a new instance of the protocol reader resource.
*
* @return resource
*/
private function createReader()
{
$reader = phpiredis_reader_create();
phpiredis_reader_set_status_handler($reader, $this->getStatusHandler());
phpiredis_reader_set_error_handler($reader, $this->getErrorHandler());
return $reader;
}