original_string: protected function getClient($uri)
  	{
  		// TODO For some reason the Alfresco client goes into an infinite loop when returning
  		// the children of an item (when you call getChildren on the company home)
  		// it returns itself as its own child, unless you recreate the client. It seems
  		// to maintain all the request body... or something weird.
  		if (!$this->httpClient || !$this->maintainSession) {
  			$this->httpClient = new Zend_Http_Client($uri, array(
  	    			'maxredirects' => 0,
  	    			'timeout'      => 10
  				)
  			);
  
  			if ($this->useCookies) {
  				$this->httpClient->setCookieJar();
  			}
  		} else {
  			$this->httpClient->setUri($uri);
  		}
  
  		// clear it out
  		if ($this->maintainSession) {
  			$this->httpClient->resetParameters();
  		}
  
  		if ($this->authInfo) {
  			$this->httpClient->setAuth($this->authInfo['user'], $this->authInfo['pass']);
  		}
  
  		return $this->httpClient;
  	}
code: protected function getClient($uri)
  	{
  		// TODO For some reason the Alfresco client goes into an infinite loop when returning
  		// the children of an item (when you call getChildren on the company home)
  		// it returns itself as its own child, unless you recreate the client. It seems
  		// to maintain all the request body... or something weird.
  		if (!$this->httpClient || !$this->maintainSession) {
  			$this->httpClient = new Zend_Http_Client($uri, array(
  	    			'maxredirects' => 0,
  	    			'timeout'      => 10
  				)
  			);
  
  			if ($this->useCookies) {
  				$this->httpClient->setCookieJar();
  			}
  		} else {
  			$this->httpClient->setUri($uri);
  		}
  
  		// clear it out
  		if ($this->maintainSession) {
  			$this->httpClient->resetParameters();
  		}
  
  		if ($this->authInfo) {
  			$this->httpClient->setAuth($this->authInfo['user'], $this->authInfo['pass']);
  		}
  
  		return $this->httpClient;
  	}
code_tokens: protected function getClient ( $ uri ) { // TODO For some reason the Alfresco client goes into an infinite loop when returning // the children of an item (when you call getChildren on the company home) // it returns itself as its own child, unless you recreate the client. It seems // to maintain all the request body... or something weird. if ( ! $ this -> httpClient || ! $ this -> maintainSession ) { $ this -> httpClient = new Zend_Http_Client ( $ uri , array ( 'maxredirects' => 0 , 'timeout' => 10 ) ) ; if ( $ this -> useCookies ) { $ this -> httpClient -> setCookieJar ( ) ; } } else { $ this -> httpClient -> setUri ( $ uri ) ; } // clear it out if ( $ this -> maintainSession ) { $ this -> httpClient -> resetParameters ( ) ; } if ( $ this -> authInfo ) { $ this -> httpClient -> setAuth ( $ this -> authInfo [ 'user' ] , $ this -> authInfo [ 'pass' ] ) ; } return $ this -> httpClient ; }
docstring: Create and return the http client, defined in a separate method
  for testing purposes
  
  @return Zend_Http_Client
docstring_tokens: Create and return the http client defined in a separate method for testing purposes