[ Index ] |
PHP Cross Reference of Phabricator |
[Summary view] [Print] [Text view]
1 <?php 2 3 /** 4 * Handlers are used to parse and serialize payloads for specific 5 * mime types. You can register a custom handler via the register 6 * method. You can also override a default parser in this way. 7 */ 8 9 namespace Httpful\Handlers; 10 11 class MimeHandlerAdapter 12 { 13 public function __construct(array $args = array()) 14 { 15 $this->init($args); 16 } 17 18 /** 19 * Initial setup of 20 * @param array $args 21 */ 22 public function init(array $args) 23 { 24 } 25 26 /** 27 * @param string $body 28 * @return mixed 29 */ 30 public function parse($body) 31 { 32 return $body; 33 } 34 35 /** 36 * @param mixed $payload 37 * @return string 38 */ 39 function serialize($payload) 40 { 41 return (string) $payload; 42 } 43 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Sun Nov 30 09:20:46 2014 | Cross-referenced by PHPXref 0.7.1 |