Phergie_Plugin_Http_Response::getCode PHP Method

getCode() public method

Returns the HTTP response code.
public getCode ( ) : string
return string Response code
    public function getCode()
    {
        return $this->code;
    }

Usage Example

コード例 #1
0
ファイル: Gscio.php プロジェクト: phergie/phergie
 /**
  * Callback for when the URL has been shortened. Checks for error messages.
  *
  * @param Phergie_Plugin_Http_Response $response the response object
  *
  * @return string|bool the shortened url or false on failure
  */
 protected function onComplete($response)
 {
     if ($response->getCode() == 201) {
         return $response->getContent();
     }
     return false;
 }