-
Notifications
You must be signed in to change notification settings - Fork 0
/
AbstractResponse.php
79 lines (67 loc) · 1.21 KB
/
AbstractResponse.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<?php
namespace Zored\SpeechBundle\Response\Entity;
use JMS\Serializer\Annotation\SerializedName;
use JMS\Serializer\Annotation\Type;
use Symfony\Component\Validator\Constraints\EqualTo;
abstract class AbstractResponse
{
/**
* @EqualTo("2.0")
* @SerializedName("jsonrpc")
* @Type("string")
*
* @var string
*/
protected $version = '2.0';
/**
* @Type("string")
*
* @var int
*/
protected $id;
/**
* @param int $id
*/
public function __construct($id)
{
$this->id = $id;
}
/**
* @return float
*/
public function getVersion()
{
return $this->version;
}
/**
* @param float $version
*
* @return AbstractResponse
*/
public function setVersion($version)
{
$this->version = $version;
return $this;
}
/**
* @return int
*/
public function getId()
{
return $this->id;
}
/**
* @param int $id
*
* @return AbstractResponse
*/
public function setId($id)
{
$this->id = $id;
return $this;
}
/**
* @return mixed
*/
abstract public function getInfo();
}