pssht
latest
SSH server library written in PHP
Main Page
Classes
Files
File List
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
12
namespace
fpoirotte\Pssht\Messages\SERVICE
;
13
17
abstract
class
Base
implements
\fpoirotte\Pssht\Messages\MessageInterface
18
{
20
protected
$service
;
21
29
public
function
__construct
(
$service
)
30
{
31
if
(!is_string(
$service
)) {
32
throw
new \InvalidArgumentException();
33
}
34
35
$this->service =
$service
;
36
}
37
38
public
function
serialize
(\
fpoirotte
\Pssht\Wire\
Encoder
$encoder)
39
{
40
$encoder->encodeString($this->service);
41
return
$this;
42
}
43
44
public
static
function
unserialize
(\
fpoirotte
\Pssht\Wire\
Decoder
$decoder)
45
{
46
return
new
static
($decoder->decodeString());
47
}
48
55
public
function
getServiceName
()
56
{
57
return
$this->service
;
58
}
59
}
fpoirotte\Pssht\Messages\MessageInterface
Definition:
MessageInterface.php:17
fpoirotte\Pssht\Wire\Decoder
Definition:
Decoder.php:17
fpoirotte\Pssht\Messages\SERVICE\Base\unserialize
static unserialize(\fpoirotte\Pssht\Wire\Decoder $decoder)
Definition:
Base.php:44
fpoirotte\Pssht\Messages\SERVICE
Definition:
ACCEPT.php:12
fpoirotte\Pssht\Wire\Encoder
Definition:
Encoder.php:17
fpoirotte\Pssht\Messages\SERVICE\Base\$service
$service
Name of the service to start after authentication.
Definition:
Base.php:20
fpoirotte\Pssht\Messages\SERVICE\Base\getServiceName
getServiceName()
Definition:
Base.php:55
fpoirotte\Pssht\Messages\SERVICE\Base\__construct
__construct($service)
Definition:
Base.php:29
fpoirotte\Pssht\Messages\SERVICE\Base
Definition:
Base.php:17
fpoirotte
fpoirotte\Pssht\Messages\SERVICE\Base\serialize
serialize(\fpoirotte\Pssht\Wire\Encoder $encoder)
Definition:
Base.php:38
src
Messages
SERVICE
Base.php
Generated on Tue May 9 2017 12:09:55 for pssht by
1.8.11