original_string: public function setStreamContext($context)
      {
          if (is_resource($context) && get_resource_type($context) == 'stream-context') {
              $this->_context = $context;
  
          } elseif (is_array($context)) {
              $this->_context = stream_context_create($context);
  
          } else {
              // Invalid parameter
  
              throw new Zend_Http_Client_Adapter_Exception(
                  "Expecting either a stream context resource or array, got " . gettype($context)
              );
          }
  
          return $this;
      }
code: public function setStreamContext($context)
      {
          if (is_resource($context) && get_resource_type($context) == 'stream-context') {
              $this->_context = $context;
  
          } elseif (is_array($context)) {
              $this->_context = stream_context_create($context);
  
          } else {
              // Invalid parameter
  
              throw new Zend_Http_Client_Adapter_Exception(
                  "Expecting either a stream context resource or array, got " . gettype($context)
              );
          }
  
          return $this;
      }
code_tokens: public function setStreamContext ( $ context ) { if ( is_resource ( $ context ) && get_resource_type ( $ context ) == 'stream-context' ) { $ this -> _context = $ context ; } elseif ( is_array ( $ context ) ) { $ this -> _context = stream_context_create ( $ context ) ; } else { // Invalid parameter throw new Zend_Http_Client_Adapter_Exception ( "Expecting either a stream context resource or array, got " . gettype ( $ context ) ) ; } return $ this ; }
docstring: Set the stream context for the TCP connection to the server
  
  Can accept either a pre-existing stream context resource, or an array
  of stream options, similar to the options array passed to the
  stream_context_create() PHP function. In such case a new stream context
  will be created using the passed options.
  
  @since  Zend Framework 1.9
  
  @param  mixed $context Stream context or array of context options
  @return Zend_Http_Client_Adapter_Socket
docstring_tokens: Set the stream context for the TCP connection to the server