pssht  latest
SSH server library written in PHP
Base.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 
18 {
20  protected $channel;
21 
28  public function __construct($channel)
29  {
30  $this->channel = $channel;
31  }
32 
33  public function serialize(\fpoirotte\Pssht\Wire\Encoder $encoder)
34  {
35  $encoder->encodeUint32($this->channel);
36  return $this;
37  }
38 
39  public static function unserialize(\fpoirotte\Pssht\Wire\Decoder $decoder)
40  {
41  return new static($decoder->decodeUint32());
42  }
43 
50  public function getChannel()
51  {
52  return $this->channel;
53  }
54 }
$channel
Local channel identifier.
Definition: Base.php:20
static unserialize(\fpoirotte\Pssht\Wire\Decoder $decoder)
Definition: Base.php:39
serialize(\fpoirotte\Pssht\Wire\Encoder $encoder)
Definition: Base.php:33