for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace VideoPublisher\Payload;
/**
* Class Payload.
*
* @author Bart Malestein <[email protected]>
*/
class Payload
{
* @var array
protected $data = array();
protected $headers = array();
* @var string
protected $url;
protected $method;
* Payload constructor.
* @param string $url
* @param string $method
public function __construct($url, $method = 'post')
$this->url = $url;
$this->method = $method;
}
* @param $url
* @return $this
public function setUrl($url)
return $this;
* @return string
public function getUrl()
return $this->url;
* @param $header
* @param $value
public function setHeader($header, $value)
$this->headers[$header] = $value;
* @return array
public function getHeaders()
return $this->headers;
* @param array $data
public function overwritePostData(array $data)
$this->data = $data;
* @param $key
public function setPostData($key, $value)
$this->data[$key] = $value;
public function getPostData()
return $this->data;
* @param $method
public function setMethod($method)
public function getMethod()
return $this->method;