for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* This file is part of graze/dynamark3-client.
*
* Copyright (c) 2016 Nature Delivered Ltd. <https://www.graze.com>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
* @license https://github.com/graze/dynamark3-client/blob/master/LICENSE.md
* @link https://github.com/graze/dynamark3-client
*/
namespace Graze\Dynamark3Client;
use Graze\Dynamark3Client\Dynamark3ResponseInterface;
class Dynamark3Response implements Dynamark3ResponseInterface
{
* @var string
protected $responseText;
* @var int
protected $errorCode;
* @param string $responseText
* @param int $errorCode
public function __construct($responseText, $errorCode = null)
$this->setResponseText($responseText);
$this->setErrorCode($errorCode);
}
public function setResponseText($responseText)
$this->responseText = $responseText;
public function setErrorCode($errorCode)
$this->errorCode = (int) $errorCode;
* @return string
public function getResponseText()
return $this->responseText;
* @return bool
public function isError()
return (bool) $this->errorCode;
* @return int
public function getErrorCode()
return $this->errorCode;