| @@ 419-425 (lines=7) @@ | ||
| 416 | elseif ($value instanceof Expression) { |
|
| 417 | throw new RuntimeException('Unable to use expressions as the Symfony ExpressionLanguage component is not installed.'); |
|
| 418 | } |
|
| 419 | elseif (is_object($value)) { |
|
| 420 | // Drupal specific: Instantiated objects have a _serviceId parameter. |
|
| 421 | if (isset($value->_serviceId)) { |
|
| 422 | return $this->getReferenceCall($value->_serviceId); |
|
| 423 | } |
|
| 424 | throw new RuntimeException('Unable to dump a service container if a parameter is an object without _serviceId.'); |
|
| 425 | } |
|
| 426 | elseif (is_resource($value)) { |
|
| 427 | throw new RuntimeException('Unable to dump a service container if a parameter is a resource.'); |
|
| 428 | } |
|
| @@ 307-312 (lines=6) @@ | ||
| 304 | return $this->getParameterCall((string) $value); |
|
| 305 | } elseif ($value instanceof Expression) { |
|
| 306 | return $this->getExpressionCall((string) $value); |
|
| 307 | } elseif (is_object($value)) { |
|
| 308 | if (isset($value->_serviceId)) { |
|
| 309 | return '@' . $value->_serviceId; |
|
| 310 | } |
|
| 311 | throw new RuntimeException('Unable to dump a service container if a parameter is an object without _serviceId.'); |
|
| 312 | } elseif (is_resource($value)) { |
|
| 313 | throw new RuntimeException('Unable to dump a service container if a parameter is a resource.'); |
|
| 314 | } |
|
| 315 | ||