throw new InvalidArgumentException(sprintf('Service "_instanceof" key must be an array, "%s" given in "%s".',
get_debug_type($instanceof),
$file));
} $this->instanceof =
[];
$this->isLoadingInstanceof = true;
foreach ($instanceof as $id =>
$service) { if (!
$service || !\
is_array($service)) { throw new InvalidArgumentException(sprintf('Type definition "%s" must be a non-empty array within "_instanceof" in "%s". Check your YAML syntax.',
$id,
$file));
} if (\
is_string($service) &&
str_starts_with($service, '@'
)) { throw new InvalidArgumentException(sprintf('Type definition "%s" cannot be an alias within "_instanceof" in "%s". Check your YAML syntax.',
$id,
$file));
} $this->
parseDefinition($id,
$service,
$file,
[], false,
$trackBindings);
} } $this->isLoadingInstanceof = false;
$defaults =
$this->
parseDefaults($content,
$file);
foreach ($content['services'
] as $id =>
$service) { $this->
parseDefinition($id,
$service,
$file,
$defaults, false,
$trackBindings);
} } /**
* @throws InvalidArgumentException
*/