Mercurial > hg > cmmr2012-drupal-site
comparison vendor/symfony/http-kernel/DependencyInjection/RemoveEmptyControllerArgumentLocatorsPass.php @ 4:a9cd425dd02b
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:11:55 +0000 |
parents | c75dbcec494b |
children |
comparison
equal
deleted
inserted
replaced
3:307d7a7fd348 | 4:a9cd425dd02b |
---|---|
46 $reason = sprintf('Removing service-argument resolver for controller "%s": no corresponding services exist for the referenced types.', $controller); | 46 $reason = sprintf('Removing service-argument resolver for controller "%s": no corresponding services exist for the referenced types.', $controller); |
47 } else { | 47 } else { |
48 // any methods listed for call-at-instantiation cannot be actions | 48 // any methods listed for call-at-instantiation cannot be actions |
49 $reason = false; | 49 $reason = false; |
50 $action = substr(strrchr($controller, ':'), 1); | 50 $action = substr(strrchr($controller, ':'), 1); |
51 $id = substr($controller, 0, -1 - strlen($action)); | 51 $id = substr($controller, 0, -1 - \strlen($action)); |
52 $controllerDef = $container->getDefinition($id); | 52 $controllerDef = $container->getDefinition($id); |
53 foreach ($controllerDef->getMethodCalls() as list($method)) { | 53 foreach ($controllerDef->getMethodCalls() as list($method)) { |
54 if (0 === strcasecmp($action, $method)) { | 54 if (0 === strcasecmp($action, $method)) { |
55 $reason = sprintf('Removing method "%s" of service "%s" from controller candidates: the method is called at instantiation, thus cannot be an action.', $action, $id); | 55 $reason = sprintf('Removing method "%s" of service "%s" from controller candidates: the method is called at instantiation, thus cannot be an action.', $action, $id); |
56 break; | 56 break; |