/** * @param $body HTTP POST body data * @param $type content type, e.g. 'text/xml; charset=UTF-8'. Replaces any value for the * 'Content-Type' header that may have been set by another method. */ public function setBody($body, $type) { PhpUtil::assertString($body, 'body'); PhpUtil::assertString($type, 'type'); $this->body = $body; $this->headers['Content-Type'] = $type; }
/** * @param $cookieFile The name of the file containing the cookie data. * See CURLOPT_COOKIEFILE on http://php.net/curl_setopt . */ public function setCookieFile($cookieFile) { PhpUtil::assertString($cookieFile, 'cookieFile'); $this->cookieFile = $cookieFile; }
/** * @param $file (string) file path */ public function __construct($file) { PhpUtil::assertString($file, 'file'); $this->file = $file; }