public function getResourceByPath($path)
    {
        // get rid of everything after the ?
        $path = \strtok($path, '?');

        $resources = $this->getResourcesAsArray($this->resources);
        foreach ($resources as $resource) {
            if ($path === $resource->getUri()) {
                return $resource;
            }
        }
        // we never returned so throw exception
        throw new ResourceNotFoundException($path);
    }
public function getResourceByPath($path)
    {
        // get rid of everything after the ?
        $path = \strtok($path, '?');

        $resources = $this->getResourcesAsArray($this->resources);
        foreach ($resources as $resource) {
            if ($path === $resource->getUri()) {
                return $resource;
            }
        }
        // we never returned so throw exception
        throw new ResourceNotFoundException($path);
    }
public function getResourceByPath ( $ path ) { // get rid of everything after the ? $ path = \ strtok ( $ path , '?' ) ; $ resources = $ this -> getResourcesAsArray ( $ this -> resources ) ; foreach ( $ resources as $ resource ) { if ( $ path === $ resource -> getUri ( ) ) { return $ resource ; } } // we never returned so throw exception throw new ResourceNotFoundException ( $ path ) ; }
Get a resource by a path

@param string $path
@return resource

@throws ResourceNotFoundException
Get a resource by a path