/** * {@inheritdoc} */ public function setContent($content) { if (!is_array($content)) { throw new RuntimeException(sprintf('The %s only accepts arrays as content.', __CLASS__)); } return parent::setContent($content); }
public function __construct($parts, $boundary = null, $statusCode = 200, array $headers = array()) { if ($boundary === null) { $boundary = uniqid(); } $this->boundary = $boundary; $headers["content-type"] = "multipart/mixed; boundary=" . $this->boundary; if (!isset($headers["content-transfer-encoding"])) { $headers["content-transfer-encoding"] = "binary"; } parent::__construct($parts, $statusCode, $headers); }
public function __construct($url, $statusCode = 302, array $headers = array()) { $headers['location'] = $url; parent::__construct($url, $statusCode, $headers); }