Bkwld\Croppa\URL::relativePath PHP Метод

relativePath() публичный Метод

Take a URL or path to an image and get the path relative to the src and crops dirs by using the path config regex
public relativePath ( string $url ) : string
$url string url or path
Результат 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];
    }