_debug()) { $this->_log("Instantiated new Consumer"); } } protected function _encode($params) { return base64_encode(json_encode($params)); } protected function _handleError($code, $msg) { if (isset($this->_options['error_callback'])) { $handler = $this->_options['error_callback']; call_user_func($handler, $code, $msg); } if ($this->_debug()) { $arr = debug_backtrace(); $class = get_class($arr[0]['object']); $line = $arr[0]['line']; error_log ( "[ $class - line $line ] : " . print_r($msg, true) ); } } public function getNumThreads() { return 1; } abstract function persist($batch); }