Mercurial > hg > isophonics-drupal-site
comparison vendor/zendframework/zend-diactoros/src/ServerRequest.php @ 17:129ea1e6d783
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:21:36 +0000 |
parents | c2387f117808 |
children |
comparison
equal
deleted
inserted
replaced
16:c2387f117808 | 17:129ea1e6d783 |
---|---|
178 /** | 178 /** |
179 * {@inheritdoc} | 179 * {@inheritdoc} |
180 */ | 180 */ |
181 public function withParsedBody($data) | 181 public function withParsedBody($data) |
182 { | 182 { |
183 if (! is_array($data) && ! is_object($data) && null !== $data) { | |
184 throw new InvalidArgumentException(sprintf( | |
185 '%s expects a null, array, or object argument; received %s', | |
186 __METHOD__, | |
187 gettype($data) | |
188 )); | |
189 } | |
190 | |
183 $new = clone $this; | 191 $new = clone $this; |
184 $new->parsedBody = $data; | 192 $new->parsedBody = $data; |
185 return $new; | 193 return $new; |
186 } | 194 } |
187 | 195 |