public function mount(string $resource, string $path = '/'): void
    {
        if (isset($this->mounts[$resource])) {
            throw new \RuntimeException(\sprintf('Duplicate mount of resource: %s', $resource));
        }
        
        $this->mounts[$resource] = '/' . \trim($path, '/');
    }
public function mount(string $resource, string $path = '/'): void
    {
        if (isset($this->mounts[$resource])) {
            throw new \RuntimeException(\sprintf('Duplicate mount of resource: %s', $resource));
        }
        
        $this->mounts[$resource] = '/' . \trim($path, '/');
    }
public function mount ( string $ resource , string $ path = '/' ) : void { if ( isset ( $ this -> mounts [ $ resource ] ) ) { throw new \ RuntimeException ( \ sprintf ( 'Duplicate mount of resource: %s' , $ resource ) ) ; } $ this -> mounts [ $ resource ] = '/' . \ trim ( $ path , '/' ) ; }
Mount another routed resource at the given path.

@param string $resource Resource or fully-qualified name of a resource class.
@param string $prefix Path prefix to be applied to all mounted routes.

@throws \InvalidArgumentException When the given resource is not a routable resource.
Mount another routed resource at the given path .