Gets an extension by name.
string $name The extension name:
Twig_ExtensionInterface A Twig_ExtensionInterface instance
public function getExtension($name) {
if (!isset($this->extensions[$name])) {
throw new Twig_Error_Runtime(sprintf('The "%s" extension is not enabled.', $name));
}
return $this->extensions[$name];
}