Request.php 1.1 KB
<?php


namespace Lackoxygen\GzCbec\Request;

use Lackoxygen\GzCbec\Contract\RequestInterface;
use Lackoxygen\GzCbec\Utils\Collection;

abstract class Request extends Collection implements RequestInterface
{
    /**
     * @var string
     */
    protected $path = '';

    /**
     * @var string
     */
    protected $method = 'POST';

    /**
     * @var string
     */
    protected $messageType = '';

    /**
     * @inheritDoc
     */
    public function getVersion(): string
    {
        return '1.0';
    }

    /**
     * @inheritDoc
     */
    public function getGuid(): string
    {
        return \Str::uuid();
    }

    /**
     * @return Packet
     */
    public function getPacket(): Packet
    {
        return new Packet($this);
    }

    /**
     * @return string
     */
    public function getPath(): string
    {
        return $this->path;
    }

    /**
     * @return string
     */
    public function getMethod(): string
    {
        return $this->method;
    }

    /**
     * @return string
     */
    public function getMessageType(): string
    {
        return $this->messageType;
    }
}