1 <?php 2 3 namespace PhpXmlRpc\Traits; 4 5 trait PayloadBearer 6 { 7 /** @var string */ 8 protected $payload; 9 /** @var string */ 10 protected $content_type = 'text/xml'; 11 12 /** 13 * @internal 14 * 15 * @param string $payload 16 * @param string $contentType 17 * @return $this 18 */ 19 public function setPayload($payload, $contentType = '') 20 { 21 $this->payload = $payload; 22 23 if ($contentType != '') { 24 $this->content_type = $contentType; 25 } 26 27 return $this; 28 } 29 30 /** 31 * @return string 32 */ 33 public function getPayload() 34 { 35 return $this->payload; 36 } 37 38 /** 39 * @return string 40 */ 41 public function getContentType() 42 { 43 return $this->content_type; 44 } 45 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body