Debian Codegraph @

vendor/clue/redis-protocol/src/Model/StatusReply.php

raw
1 <?php
2
3 namespace Clue\Redis\Protocol\Model;
4
5 use Clue\Redis\Protocol\Serializer\SerializerInterface;
6 /**
7 *
8 * @link http://redis.io/topics/protocol#status-reply
9 */
10 class StatusReply implements ModelInterface
11 {
12 private $message;
13
14 /**
15 * create status reply (single line message)
16 *
17 * @param string $message
18 * @return string
19 */
20 public function __construct($message)
21 {
22 $this->message = $message;
23 }
24
25 public function getValueNative()
26 {
27 return $this->message;
28 }
29
30 public function getMessageSerialized(SerializerInterface $serializer)
31 {
32 return $serializer->getStatusMessage($this->message);
33 }
34 }