private function getHeaderValue($response, $name)
    {
        $header = $response->getHeader($name);

        if (! $header || ! count($header)) {
            return 0;
        }

        return (int) array_shift($header);
    }
private function getHeaderValue($response, $name)
    {
        $header = $response->getHeader($name);

        if (! $header || ! count($header)) {
            return 0;
        }

        return (int) array_shift($header);
    }
private function getHeaderValue ( $ response , $ name ) { $ header = $ response -> getHeader ( $ name ) ; if ( ! $ header || ! count ( $ header ) ) { return 0 ; } return ( int ) array_shift ( $ header ) ; }
Get first array value from specified header as integer.

@param mixed  $response API response.
@param string $name     Header name.

@return int
Get first array value from specified header as integer .