CS fixes
This commit is contained in:
@ -46,6 +46,7 @@ class MultiPart extends PartHeader
|
||||
* Construct new mime object.
|
||||
*
|
||||
* @param string $boundary Boundary string
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct($boundary = null)
|
||||
@ -64,6 +65,7 @@ class MultiPart extends PartHeader
|
||||
* Get mime message of this object (without headers).
|
||||
*
|
||||
* @param boolean $withHeaders Returned mime message contains headers
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getMimeMessage($withHeaders = false)
|
||||
@ -106,6 +108,7 @@ class MultiPart extends PartHeader
|
||||
*
|
||||
* @param \BeSimple\SoapCommon\Mime\Part $part Part that is added
|
||||
* @param boolean $isMain Is the given part the main part of mime message
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function addPart(Part $part, $isMain = false)
|
||||
@ -124,6 +127,7 @@ class MultiPart extends PartHeader
|
||||
* parameter.
|
||||
*
|
||||
* @param string $contentId Content id of desired part
|
||||
*
|
||||
* @return \BeSimple\SoapCommon\Mime\Part|null
|
||||
*/
|
||||
public function getPart($contentId = null)
|
||||
@ -141,6 +145,7 @@ class MultiPart extends PartHeader
|
||||
* Get all parts.
|
||||
*
|
||||
* @param boolean $includeMainPart Should main part be in result set
|
||||
*
|
||||
* @return array(\BeSimple\SoapCommon\Mime\Part)
|
||||
*/
|
||||
public function getParts($includeMainPart = false)
|
||||
|
@ -24,6 +24,7 @@ class Parser
|
||||
*
|
||||
* @param string $mimeMessage Mime message string
|
||||
* @param array(string=>string) $headers Array of header elements (e.g. coming from http request)
|
||||
*
|
||||
* @return \BeSimple\SoapCommon\Mime\MultiPart
|
||||
*/
|
||||
public static function parseMimeMessage($mimeMessage, array $headers = array())
|
||||
@ -133,6 +134,7 @@ class Parser
|
||||
* @param \BeSimple\SoapCommon\Mime\PartHeader $part Header part
|
||||
* @param string $headerName Header name
|
||||
* @param string $headerValue Header value
|
||||
*
|
||||
* @return null
|
||||
*/
|
||||
private static function parseContentTypeHeader(PartHeader $part, $headerName, $headerValue)
|
||||
@ -165,6 +167,7 @@ class Parser
|
||||
*
|
||||
* @param \BeSimple\SoapCommon\Mime\Part $part Part to add content
|
||||
* @param string $content Content to decode
|
||||
*
|
||||
* @return null
|
||||
*/
|
||||
private static function decodeContent(Part $part, $content)
|
||||
|
@ -68,6 +68,7 @@ class Part extends PartHeader
|
||||
* @param string $charset Charset
|
||||
* @param string $encoding Encoding
|
||||
* @param string $contentId Content id
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct($content = null, $contentType = 'application/octet-stream', $charset = null, $encoding = self::ENCODING_BINARY, $contentId = null)
|
||||
@ -76,7 +77,7 @@ class Part extends PartHeader
|
||||
$this->setHeader('Content-Type', $contentType);
|
||||
if (!is_null($charset)) {
|
||||
$this->setHeader('Content-Type', 'charset', $charset);
|
||||
} else { // if (substr($contentType, 0, 4) == 'text') {
|
||||
} else {
|
||||
$this->setHeader('Content-Type', 'charset', 'utf-8');
|
||||
}
|
||||
$this->setHeader('Content-Transfer-Encoding', $encoding);
|
||||
@ -110,6 +111,7 @@ class Part extends PartHeader
|
||||
* Set mime content.
|
||||
*
|
||||
* @param mixed $content Content to set
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setContent($content)
|
||||
|
@ -32,6 +32,7 @@ abstract class PartHeader
|
||||
* @param string $name Header name
|
||||
* @param string $value Header value
|
||||
* @param string $subValue Is sub value?
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setHeader($name, $value, $subValue = null)
|
||||
@ -57,6 +58,7 @@ abstract class PartHeader
|
||||
*
|
||||
* @param string $name Header name
|
||||
* @param string $subValue Sub value name
|
||||
*
|
||||
* @return mixed|array(mixed)
|
||||
*/
|
||||
public function getHeader($name, $subValue = null)
|
||||
@ -104,6 +106,7 @@ abstract class PartHeader
|
||||
* Generates a header field value from the given value paramater.
|
||||
*
|
||||
* @param array(string=>string)|string $value Header value
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function generateHeaderFieldValue($value)
|
||||
@ -129,6 +132,7 @@ abstract class PartHeader
|
||||
* "(" / ")" / "<" / ">" / "@" / "," / ";" / ":" / "\" / <"> / "/" / "[" / "]" / "?" / "="
|
||||
*
|
||||
* @param string $string String to quote
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private function quoteValueString($string)
|
||||
|
Reference in New Issue
Block a user