@@ 104-112 (lines=9) @@ | ||
101 | ||
102 | $chains = []; |
|
103 | foreach ($filtersConfigs as $index => $item) { |
|
104 | if (!is_array($item)) { |
|
105 | $errMsg = sprintf( |
|
106 | 'Item [%s][filters][%s] of type %s is invalid. Must array', |
|
107 | Module::CONFIG_KEY, |
|
108 | $index, |
|
109 | (is_object($item) ? get_class($item) : gettype($item)) |
|
110 | ); |
|
111 | throw new Exception\RuntimeException($errMsg); |
|
112 | } |
|
113 | ||
114 | if (!array_key_exists('name', $item)) { |
|
115 | $errMsg = sprintf( |
|
@@ 135-143 (lines=9) @@ | ||
132 | ||
133 | $name = $item['name']; |
|
134 | $options = array_key_exists('options', $item) ? $item['options'] : []; |
|
135 | if (!is_array($options)) { |
|
136 | $errMsg = sprintf( |
|
137 | 'Parameter [%s][filters][%s][\'options\'] of type %s is invalid. Must array', |
|
138 | Module::CONFIG_KEY, |
|
139 | $index, |
|
140 | (is_object($options) ? get_class($options) : gettype($options)) |
|
141 | ); |
|
142 | throw new Exception\RuntimeException($errMsg); |
|
143 | } |
|
144 | if (null !== $contextExecutor) { |
|
145 | $options['contextExecutor'] = $contextExecutor; |
|
146 | } |
@@ 97-105 (lines=9) @@ | ||
94 | ||
95 | $chains = []; |
|
96 | foreach ($loadersConfigs as $index => $item) { |
|
97 | if (!is_array($item)) { |
|
98 | $errMsg = sprintf( |
|
99 | 'Item [%s][fixtures][%s] of type %s is invalid. Must array', |
|
100 | Module::CONFIG_KEY, |
|
101 | $index, |
|
102 | (is_object($item) ? get_class($item) : gettype($item)) |
|
103 | ); |
|
104 | throw new Exception\RuntimeException($errMsg); |
|
105 | } |
|
106 | ||
107 | if (!array_key_exists('name', $item)) { |
|
108 | $errMsg = sprintf( |
|
@@ 128-136 (lines=9) @@ | ||
125 | ||
126 | $name = $item['name']; |
|
127 | $options = array_key_exists('options', $item) ? $item['options'] : []; |
|
128 | if (!is_array($options)) { |
|
129 | $errMsg = sprintf( |
|
130 | 'Parameter [%s][fixtures][%s][\'options\'] of type %s is invalid. Must array', |
|
131 | Module::CONFIG_KEY, |
|
132 | $index, |
|
133 | (is_object($options) ? get_class($options) : gettype($options)) |
|
134 | ); |
|
135 | throw new Exception\RuntimeException($errMsg); |
|
136 | } |
|
137 | ||
138 | $chains[] = $serviceLocator->get($name, $options); |
|
139 | } |