public function getAllowedMethods($path)
    {
        $methods = [
            'OPTIONS',
            'GET',
            'HEAD',
            'DELETE',
            'PROPFIND',
            'PUT',
            'PROPPATCH',
            'COPY',
            'MOVE',
            'REPORT',
        ];

        // The MKCOL is only allowed on an unmapped uri
        try {
            $this->tree->getNodeForPath($path);
        } catch (Exception\NotFound $e) {
            $methods[] = 'MKCOL';
        }

        // We're also checking if any of the plugins register any new methods
        foreach ($this->plugins as $plugin) {
            $methods = array_merge($methods, $plugin->getHTTPMethods($path));
        }
        array_unique($methods);

        return $methods;
    }
public function getAllowedMethods($path)
    {
        $methods = [
            'OPTIONS',
            'GET',
            'HEAD',
            'DELETE',
            'PROPFIND',
            'PUT',
            'PROPPATCH',
            'COPY',
            'MOVE',
            'REPORT',
        ];

        // The MKCOL is only allowed on an unmapped uri
        try {
            $this->tree->getNodeForPath($path);
        } catch (Exception\NotFound $e) {
            $methods[] = 'MKCOL';
        }

        // We're also checking if any of the plugins register any new methods
        foreach ($this->plugins as $plugin) {
            $methods = array_merge($methods, $plugin->getHTTPMethods($path));
        }
        array_unique($methods);

        return $methods;
    }
public function getAllowedMethods ( $ path ) { $ methods = [ 'OPTIONS' , 'GET' , 'HEAD' , 'DELETE' , 'PROPFIND' , 'PUT' , 'PROPPATCH' , 'COPY' , 'MOVE' , 'REPORT' , ] ; // The MKCOL is only allowed on an unmapped uri try { $ this -> tree -> getNodeForPath ( $ path ) ; } catch ( Exception \ NotFound $ e ) { $ methods [ ] = 'MKCOL' ; } // We're also checking if any of the plugins register any new methods foreach ( $ this -> plugins as $ plugin ) { $ methods = array_merge ( $ methods , $ plugin -> getHTTPMethods ( $ path ) ) ; } array_unique ( $ methods ) ; return $ methods ; }
Returns an array with all the supported HTTP methods for a specific uri.

@param string $path

@return array
Returns an array with all the supported HTTP methods for a specific uri .