1 | <?php |
||
16 | class Session extends Resource |
||
17 | { |
||
18 | |||
19 | /** |
||
20 | * The unique id |
||
21 | * |
||
22 | * @var string |
||
23 | */ |
||
24 | protected $id; |
||
25 | |||
26 | /** |
||
27 | * Blocked status |
||
28 | * |
||
29 | * @var bool |
||
30 | */ |
||
31 | protected $blocked; |
||
32 | |||
33 | /** |
||
34 | * @param array|string $attributes |
||
35 | */ |
||
36 | public function __construct($attributes = null) |
||
37 | { |
||
38 | if (is_string($attributes)) { |
||
39 | $this->setId($attributes); |
||
40 | } elseif (is_array($attributes)) { |
||
41 | parent::__construct($attributes); |
||
42 | } |
||
43 | } |
||
44 | |||
45 | /* |
||
46 | * @return string|null |
||
47 | */ |
||
48 | public function getId() |
||
49 | { |
||
50 | return $this->id; |
||
51 | } |
||
52 | |||
53 | /* |
||
54 | * @param string |
||
55 | */ |
||
56 | public function setId($id) |
||
57 | { |
||
58 | $this->id = $id; |
||
59 | } |
||
60 | |||
61 | /* |
||
62 | * @return bool |
||
63 | */ |
||
64 | public function isBlocked() |
||
68 | |||
69 | /* |
||
70 | * @param bool |
||
71 | */ |
||
72 | public function setBlocked($blocked) |
||
76 | |||
77 | } |
||
78 |