當前位置: 首頁>>代碼示例>>PHP>>正文


PHP phpiredis_reader_set_error_handler函數代碼示例

本文整理匯總了PHP中phpiredis_reader_set_error_handler函數的典型用法代碼示例。如果您正苦於以下問題:PHP phpiredis_reader_set_error_handler函數的具體用法?PHP phpiredis_reader_set_error_handler怎麽用?PHP phpiredis_reader_set_error_handler使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了phpiredis_reader_set_error_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;
 }
開發者ID:tystr,項目名稱:predis-async,代碼行數:10,代碼來源:PhpiredisStreamConnection.php

示例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;
 }
開發者ID:GunioRobot,項目名稱:predis,代碼行數:15,代碼來源:PhpiredisConnection.php

示例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;
 }
開發者ID:GunioRobot,項目名稱:predis,代碼行數:13,代碼來源:WebdisConnection.php

示例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;
 }
開發者ID:sohel4r,項目名稱:wordpress_4_1_1,代碼行數:12,代碼來源:predis.php


注:本文中的phpiredis_reader_set_error_handler函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。