Exemple #1
0
 /**
  * Sets the needed static variables
  * 
  * @return  void
  */
 private static function _setStaticVars()
 {
     // Gets the instance of the string utilities
     self::$_str = Woops_String_Utils::getInstance();
     // Static variables are set
     self::$_hasStatic = true;
 }
Exemple #2
0
 /**
  * Gets the HTTP response
  * 
  * @return  Woops_Http_Response         The HTTP response object
  * @throws  Woops_Http_Client_Exception If the connection was not established
  */
 public function getResponse()
 {
     // Checks the connect flag
     if (!$this->_connected) {
         // No connection
         throw new Woops_Http_Client_Exception('The connection has not been established yet', Woops_Http_Client_Exception::EXCEPTION_NOT_CONNECTED);
     }
     // Checks if the reponse object already exist
     if (!is_object($this->_response)) {
         // Creates the response object
         $this->_response = Woops_Http_Response::createResponseObject($this->_socket);
     }
     // Returns the response object
     return $this->_response;
 }