Mercurial > hg > isophonics-drupal-site
comparison vendor/zendframework/zend-feed/src/PubSubHubbub/AbstractCallback.php @ 16:c2387f117808
Routine composer update
author | Chris Cannam |
---|---|
date | Tue, 10 Jul 2018 15:07:59 +0100 |
parents | 7a779792577d |
children | 129ea1e6d783 |
comparison
equal
deleted
inserted
replaced
15:e200cb7efeb3 | 16:c2387f117808 |
---|---|
30 * (i.e. not inherited from) Zend\Controller\Response\Http. | 30 * (i.e. not inherited from) Zend\Controller\Response\Http. |
31 * | 31 * |
32 * @var HttpResponse|PhpResponse | 32 * @var HttpResponse|PhpResponse |
33 */ | 33 */ |
34 protected $httpResponse = null; | 34 protected $httpResponse = null; |
35 | |
36 /** | |
37 * The input stream to use when retrieving the request body. Defaults to | |
38 * php://input, but can be set to another value in order to force usage | |
39 * of another input method. This should primarily be used for testing | |
40 * purposes. | |
41 * | |
42 * @var string|resource String indicates a filename or stream to open; | |
43 * resource indicates an already created stream to use. | |
44 */ | |
45 protected $inputStream = 'php://input'; | |
35 | 46 |
36 /** | 47 /** |
37 * The number of Subscribers for which any updates are on behalf of. | 48 * The number of Subscribers for which any updates are on behalf of. |
38 * | 49 * |
39 * @var int | 50 * @var int |
285 */ | 296 */ |
286 // @codingStandardsIgnoreStart | 297 // @codingStandardsIgnoreStart |
287 protected function _getRawBody() | 298 protected function _getRawBody() |
288 { | 299 { |
289 // @codingStandardsIgnoreEnd | 300 // @codingStandardsIgnoreEnd |
290 $body = file_get_contents('php://input'); | 301 $body = is_resource($this->inputStream) |
291 if (strlen(trim($body)) == 0 && isset($GLOBALS['HTTP_RAW_POST_DATA'])) { | 302 ? stream_get_contents($this->inputStream) |
292 $body = $GLOBALS['HTTP_RAW_POST_DATA']; | 303 : file_get_contents($this->inputStream); |
293 } | 304 |
294 if (strlen(trim($body)) > 0) { | 305 return strlen(trim($body)) > 0 ? $body : false; |
295 return $body; | |
296 } | |
297 return false; | |
298 } | 306 } |
299 } | 307 } |