public function addDefinitions($definitions)
{
$this->ensureNotLocked();
if (is_string($definitions)) {
// File
$definitions = new DefinitionFile($definitions);
} elseif (is_array($definitions)) {
$definitions = new DefinitionArray($definitions);
} elseif (!$definitions instanceof DefinitionSource) {
throw new InvalidArgumentException(sprintf('%s parameter must be a string, an array or a DefinitionSource object, %s given', 'ContainerBuilder::addDefinitions()', is_object($definitions) ? get_class($definitions) : gettype($definitions)));
}
$this->definitionSources[] = $definitions;
return $this;
}