Clockwork\Request\Request::__construct PHP Method

__construct() public method

Create a new request, if optional data array argument is provided, it will be used to populate the request object, otherwise empty request with autogenerated ID will be created
public __construct ( array $data = null )
$data array
    public function __construct(array $data = null)
    {
        if ($data) {
            foreach ($data as $key => $val) {
                $this->{$key} = $val;
            }
        } else {
            $this->id = $this->generateRequestId();
        }
    }