예제 #1
0
파일: FAILURE.php 프로젝트: fpoirotte/pssht
 /**
  * Construct a new SSH_MSG_CHANNEL_OPEN_FAILURE message.
  *
  *  \copydetails Base::__construct
  *
  *  \param int $reasonCode
  *      Reason for the failure, as a code.
  *
  *  \param string $reasonMessage
  *      Reason for the failure, as a human-readable description
  *      in RFC 3066 format.
  *
  *  \param string $language
  *      (optional) Language the message in written into,
  *      in RFC 3066 format. If omitted, the description
  *      is assumed to be language-neutral.
  */
 public function __construct($channel, $reasonCode, $reasonMessage, $language = '')
 {
     parent::__construct($channel);
     $this->reasonCode = $reasonCode;
     $this->reasonMessage = $reasonMessage;
     $this->language = $language;
 }
예제 #2
0
파일: Base.php 프로젝트: fpoirotte/pssht
 /**
  *  \copydetails fpoirotte::Pssht::Messages::CHANNEL::Base::__construct
  *
  *  \param string $type
  *      Message type.
  *
  *  \param bool $wantReply
  *      Indicates whether the sender of this message
  *      wants a reply (\b true) or not (\b false).
  */
 public function __construct($channel, $type, $wantReply)
 {
     if (!is_string($type)) {
         throw new \InvalidArgumentException();
     }
     if (!is_bool($wantReply)) {
         throw new \InvalidArgumentException();
     }
     parent::__construct($channel);
     $this->type = $type;
     $this->wantReply = $wantReply;
 }
예제 #3
0
파일: DATA.php 프로젝트: fpoirotte/pssht
 /**
  * Construct a new SSH_MSG_CHANNEL_EXTENDED_DATA message.
  *
  *  \copydetails Base::__construct
  *
  *  \param int $code
  *      Code designating the extended data stream
  *      the payload is taken from.
  *
  *  \param string $data
  *      Message's payload.
  */
 public function __construct($channel, $code, $data)
 {
     parent::__construct($channel);
     $this->code = $code;
     $this->data = $data;
 }