if (!
$r =
$container->
getReflectionClass($class)) { throw new InvalidArgumentException(sprintf('Class "%s" used for service "%s" cannot be found.',
$class,
$id));
} // get regular public methods
$methods =
[];
$arguments =
[];
foreach ($r->
getMethods(\ReflectionMethod::IS_PUBLIC
) as $r) { if ('setContainer' ===
$r->name
) { continue;
} if (!
$r->
isConstructor() && !
$r->
isDestructor() && !
$r->
isAbstract()) { $methods[strtolower($r->name
)] =
[$r,
$r->
getParameters()];
} } // validate and collect explicit per-actions and per-arguments service references
foreach ($tags as $attributes) { if (!
isset($attributes['action'
]) && !
isset($attributes['argument'
]) && !
isset($attributes['id'
])) { $autowire = true;
continue;
} foreach (['action', 'argument', 'id'
] as $k) {