public relativePath ( string $url ) : string | ||
$url | string | url or path |
return | string |
public function relativePath($url)
{
$path = $this->toPath($url);
if (!preg_match('#' . $this->config['path'] . '#', $path, $matches)) {
throw new Exception("{$url} doesn't match `{$this->config['path']}`");
}
return $matches[1];
}