Sulu\Bundle\DocumentManagerBundle\Bridge\DocumentInspector::extractWebspaceFromPath PHP Method

extractWebspaceFromPath() private method

Extracts webspace key from given path.
private extractWebspaceFromPath ( string $path ) : string
$path string path of node
return string
    private function extractWebspaceFromPath($path)
    {
        $match = preg_match(sprintf('/^\\/%s\\/([\\w\\.-]*?)\\/.*$/', $this->pathSegmentRegistry->getPathSegment('base')), $path, $matches);
        if ($match) {
            return $matches[1];
        }
        return;
    }