comparison vendor/symfony/routing/Loader/ObjectRouteLoader.php @ 14:1fec387a4317

Update Drupal core to 8.5.2 via Composer
author Chris Cannam
date Mon, 23 Apr 2018 09:46:53 +0100
parents 4c8ae668cc8c
children 129ea1e6d783
comparison
equal deleted inserted replaced
13:5fb285c0d0e3 14:1fec387a4317
43 * @return RouteCollection 43 * @return RouteCollection
44 */ 44 */
45 public function load($resource, $type = null) 45 public function load($resource, $type = null)
46 { 46 {
47 $parts = explode(':', $resource); 47 $parts = explode(':', $resource);
48 if (count($parts) != 2) { 48 if (2 != count($parts)) {
49 throw new \InvalidArgumentException(sprintf('Invalid resource "%s" passed to the "service" route loader: use the format "service_name:methodName"', $resource)); 49 throw new \InvalidArgumentException(sprintf('Invalid resource "%s" passed to the "service" route loader: use the format "service_name:methodName"', $resource));
50 } 50 }
51 51
52 $serviceString = $parts[0]; 52 $serviceString = $parts[0];
53 $method = $parts[1]; 53 $method = $parts[1];