public function open($path, $type = null)
{
$type = $type ?: $this->getType($path);
if (!isset($this->loaders[$type])) {
throw new InvalidArgumentException(sprintf('No loader for type %s', $type));
}
return $this->loaders[$type]->open($path);
}