Webiny\Component\Router\Route\Route::setPath PHP Method

setPath() public method

Sets the route path.
public setPath ( string $path )
$path string Route path.
    public function setPath($path)
    {
        $this->path = '';
        $this->realPath = $path;
        if (!empty($path)) {
            $this->path .= $this->str($path)->trim()->trimLeft('/')->trimRight('/')->val();
        }
        return $this;
    }