private function getStatus()
    {
        if (!($statusArray = preg_grep('/^HTTP\/(1.0|1.1)\s+(\d+)\s+(.+)/', $this->headers))) {
            throw new \RuntimeException('Could not determine HTTP status from API response');
        }

        if (!preg_match('/^HTTP\/(1.0|1.1)\s+(\d+)\s+(.+)/', $statusArray[0], $matchesArray)) {
            throw new \RuntimeException('Could not determine HTTP status from API response');
        }

        return array(
            'code' => $matchesArray[2],
            'message' => $matchesArray[3],
        );
    }
private function getStatus()
    {
        if (!($statusArray = preg_grep('/^HTTP\/(1.0|1.1)\s+(\d+)\s+(.+)/', $this->headers))) {
            throw new \RuntimeException('Could not determine HTTP status from API response');
        }

        if (!preg_match('/^HTTP\/(1.0|1.1)\s+(\d+)\s+(.+)/', $statusArray[0], $matchesArray)) {
            throw new \RuntimeException('Could not determine HTTP status from API response');
        }

        return array(
            'code' => $matchesArray[2],
            'message' => $matchesArray[3],
        );
    }
private function getStatus ( ) { if ( ! ( $ statusArray = preg_grep ( '/^HTTP\/(1.0|1.1)\s+(\d+)\s+(.+)/' , $ this -> headers ) ) ) { throw new \ RuntimeException ( 'Could not determine HTTP status from API response' ) ; } if ( ! preg_match ( '/^HTTP\/(1.0|1.1)\s+(\d+)\s+(.+)/' , $ statusArray [ 0 ] , $ matchesArray ) ) { throw new \ RuntimeException ( 'Could not determine HTTP status from API response' ) ; } return array ( 'code' => $ matchesArray [ 2 ] , 'message' => $ matchesArray [ 3 ] , ) ; }
Extract the HTTP status code and message
from the Response headers
@param void
@return mixed[]
Extract the HTTP status code and message from the Response headers