Skip to content

Instantly share code, notes, and snippets.

@arghav
Created March 9, 2011 12:13
Show Gist options
  • Save arghav/862095 to your computer and use it in GitHub Desktop.
Save arghav/862095 to your computer and use it in GitHub Desktop.
Suppress exception if abstract
if (!$this->container->hasDefinition($parent = $definition->getParent())) {
if ($definition->isAbstract()) {
return null;
}
throw new \RuntimeException(sprintf('The parent definition "%s" defined for definition "%s" does not exist.', $parent, $id));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment