public function __construct(CoderManager $coder, Connector $connector) { $this->_host = $connector->getHost(); $this->_port = $connector->getPort(); $this->_path = $connector->getPath(); $this->_ssl = $connector->isSSL(); $this->_coder = $coder; }
/** * @param string $method * @param string $path * @param array $params * @param null|mixed $content * @param array $headers * @param string $mime * @param null|string $parser * @return Response */ protected function _send($method, $path = '', array $params = array(), $content = null, $headers = array(), $mime = CoderManager::MIME_JSON, $parser = null) { $options = array(); $request = $this->_factory->createCDBRequest($method, $path, $params, $content, $headers, $mime, $options); $response = $this->_factory->createCDBResponse($parser); return $this->_connector->send($request, $response, $options); }