Mercurial > hg > isophonics-drupal-site
comparison vendor/zendframework/zend-stdlib/src/AbstractOptions.php @ 12:7a779792577d
Update Drupal core to v8.4.5 (via Composer)
author | Chris Cannam |
---|---|
date | Fri, 23 Feb 2018 15:52:07 +0000 |
parents | 4c8ae668cc8c |
children |
comparison
equal
deleted
inserted
replaced
11:bfffd8d7479a | 12:7a779792577d |
---|---|
11 | 11 |
12 use Traversable; | 12 use Traversable; |
13 | 13 |
14 abstract class AbstractOptions implements ParameterObjectInterface | 14 abstract class AbstractOptions implements ParameterObjectInterface |
15 { | 15 { |
16 // @codingStandardsIgnoreStart | |
16 /** | 17 /** |
17 * We use the __ prefix to avoid collisions with properties in | 18 * We use the __ prefix to avoid collisions with properties in |
18 * user-implementations. | 19 * user-implementations. |
19 * | 20 * |
20 * @var bool | 21 * @var bool |
21 */ | 22 */ |
22 protected $__strictMode__ = true; | 23 protected $__strictMode__ = true; |
24 // @codingStandardsIgnoreEnd | |
23 | 25 |
24 /** | 26 /** |
25 * Constructor | 27 * Constructor |
26 * | 28 * |
27 * @param array|Traversable|null $options | 29 * @param array|Traversable|null $options |
44 { | 46 { |
45 if ($options instanceof self) { | 47 if ($options instanceof self) { |
46 $options = $options->toArray(); | 48 $options = $options->toArray(); |
47 } | 49 } |
48 | 50 |
49 if (!is_array($options) && !$options instanceof Traversable) { | 51 if (! is_array($options) && ! $options instanceof Traversable) { |
50 throw new Exception\InvalidArgumentException( | 52 throw new Exception\InvalidArgumentException( |
51 sprintf( | 53 sprintf( |
52 'Parameter provided to %s must be an %s, %s or %s', | 54 'Parameter provided to %s must be an %s, %s or %s', |
53 __METHOD__, | 55 __METHOD__, |
54 'array', | 56 'array', |