public function getPathObject($name)
{
$name = str_replace('\\', '/', $name);
$parts = [];
if (strpos($name, '/') !== false) {
$parts = explode('/', $name);
$name = array_shift($parts);
}
if (array_key_exists($name . 'path', $this->paths)) {
$path = $this->paths[$name . 'path'];
} elseif (array_key_exists($name, $this->paths)) {
$path = $this->paths[$name];
} else {
throw new \InvalidArgumentException("Requested path {$name} is not available", 1);
}
if (!empty($parts)) {
$path = $path->joinAtomSequence($parts);
}
return $path;
}