sendFrom; } /** * Set sender * * @param mixed $sendFrom Sender * * @return void * * @since 1.0.0 */ public function setSendFrom($sendFrom) : void { $this->sendFrom = $sendFrom; } /** * Get receiver * * @return mixed * * @since 1.0.0 */ public function getSendTo() { return $this->sendTo; } /** * Set receiver * * @param mixed $sendTo Receiver * * @return void * * @since 1.0.0 */ public function setSendTo($sendTo) : void { $this->sendTo = $sendTo; } /** * @return int * * @since 1.0.0 */ public function getLength() { return $this->length; } /** * Set header length * * @param int $length Header length * * @return void * * @since 1.0.0 */ public function setLength($length) : void { $this->length = $length; } /** * Get package type * * @return int * * @since 1.0.0 */ public function getType() : int { return $this->type; } /** * Set package type * * @param int $type Type * * @return void * * @since 1.0.0 */ public function setType(int $type) : void { $this->type = $type; } /** * Get subtype * * @return int * * @since 1.0.0 */ public function getSubtype() : int { return $this->subtype; } /** * Set subtype * * @param int $subtype Subtype * * @return void * * @since 1.0.0 */ public function setSubtype($subtype) : void { $this->subtype = $subtype; } /** * Serializing header. * * @return string Json serialization * * @since 1.0.0 */ public function serialize() : string { return $this->__toString(); } /** * Jsonfy object. * * @return string Json serialization * * @since 1.0.0 */ public function __toString() { return ''; } /** * Unserializing json string. * * @param string $string String to unserialize * * @return void * * @since 1.0.0 */ public function unserialize($string) : void { } /** * {@inheritdoc} */ public function getProtocolVersion() : string { return 'Socket/1.1'; } /** * {@inheritdoc} */ public function set(string $key, string $header, bool $overwrite = false) : bool { return true; } /** * {@inheritdoc} */ public function get(string $key = null) : array { return $key === null ? $this->header : ($this->header[\strtolower($key)] ?? []); } /** * {@inheritdoc} */ public function has(string $key) : bool { return isset($this->header[$key]); } /** * {@inheritdoc} */ public function generate(int $code) : void { } }