<?php
declare (strict_types = 1);
namespace ProxyPay\Core;

class Result
{
	protected $success = true;
	protected $data    = null;
	protected $errors  = [];

	public function setData($data)
	{
		$this->data = $data;
		return $this;
	}

	public function isSuccess()
	{
		return $this->success;
	}

	public function setError($error)
	{
		$this->success = false;
		$this->errors[] = $error;
		return $this;
	}

	public function getData()
	{
		return $this->data;
	}

	public function getError()
	{
		return $this->errors;
	}
}
