pssht  latest
SSH server library written in PHP
ExitSignal.php
1 <?php
2 
3 /*
4 * This file is part of pssht.
5 *
6 * (c) François Poirotte <clicky@erebot.net>
7 *
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
10 */
11 
13 
19 {
21  protected $signal;
22 
24  protected $coreDumped;
25 
27  protected $error;
28 
30  protected $language;
31 
32 
54  {
55  parent::__construct($channel, $type, $wantReply);
56  $this->signal = $signal;
57  $this->coreDumped = $coreDumped;
58  $this->error = $error;
59  $this->language = $language;
60  }
61 
62  public function serialize(\fpoirotte\Pssht\Wire\Encoder $encoder)
63  {
64  parent::serialize($encoder);
65  $encoder->encodeString($this->signal);
66  $encoder->encodeBoolean($this->coreDumped);
67  $encoder->encodeString($this->error);
68  $encoder->encodeString($this->language);
69  return $this;
70  }
71 
72  protected static function unserializeSub(\fpoirotte\Pssht\Wire\Decoder $decoder)
73  {
74  return array(
75  $decoder->decodeString(),
76  $decoder->decodeBoolean(),
77  $decoder->decodeString(),
78  $decoder->decodeString(),
79  );
80  }
81 }
serialize(\fpoirotte\Pssht\Wire\Encoder $encoder)
Definition: ExitSignal.php:62
$coreDumped
Whether a core file was dumped or not.
Definition: ExitSignal.php:24
$channel
Local channel identifier.
Definition: Base.php:20
$wantReply
Whether the sender of the message wants a reply or not.
Definition: Base.php:23
$language
Language the error message in written into, in RFC 3066 format.
Definition: ExitSignal.php:30
$signal
Name of the signal that caused the process to exit.
Definition: ExitSignal.php:21
$error
Textual explanation of the error.
Definition: ExitSignal.php:27
__construct($channel, $type, $wantReply, $signal, $coreDumped, $error, $language)
Definition: ExitSignal.php:53