Response::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 3
Bugs 1 Features 2
Metric Value
c 3
b 1
f 2
dl 0
loc 5
rs 9.4286
cc 1
eloc 3
nc 1
nop 2
1
<?php
2
namespace Cassandra\Response;
3
use Cassandra\Protocol\Frame;
4
5
class Response implements Frame{
6
	/**
7
	 * @var array
8
	 */
9
	protected $_header;
10
11
	/**
12
	 * @var
13
	 */
14
	protected $_stream;
15
	
16
	/**
17
	 * 
18
	 * @param array $header
19
	 * @param $stream
20
	 */
21
	public function __construct($header, $stream){
22
		$this->_header = $header;
23
		
24
		$this->_stream = $stream;
25
	}
26
	
27
	public function getVersion(){
28
		return $this->_header['version'];
29
	}
30
	
31
	public function getFlags(){
32
		return $this->_header['flags'];
33
	}
34
	
35
	public function getStream(){
36
		return $this->_header['stream'];
37
	}
38
	
39
	public function getOpcode(){
40
		return $this->_header['opcode'];
41
	}
42
	
43
	public function getBody(){
44
		return $this->_stream;
45
	}
46
}
47