public function resolveWriter(ResourceUri $resource)
    {
        if (! array_key_exists($resource->getProtocol(), $this->protocolWriterIndexes)) {
            throw new \RuntimeException('Unsupported protocol: ' . $resource->getProtocol() . '( ' . $resource  . ')');
        }

        /** @var int $index */
        $index = $this->protocolWriterIndexes[$resource->getProtocol()];

        return $this->writers[$index];
    }
public function resolveWriter(ResourceUri $resource)
    {
        if (! array_key_exists($resource->getProtocol(), $this->protocolWriterIndexes)) {
            throw new \RuntimeException('Unsupported protocol: ' . $resource->getProtocol() . '( ' . $resource  . ')');
        }

        /** @var int $index */
        $index = $this->protocolWriterIndexes[$resource->getProtocol()];

        return $this->writers[$index];
    }
public function resolveWriter ( ResourceUri $ resource ) { if ( ! array_key_exists ( $ resource -> getProtocol ( ) , $ this -> protocolWriterIndexes ) ) { throw new \ RuntimeException ( 'Unsupported protocol: ' . $ resource -> getProtocol ( ) . '( ' . $ resource . ')' ) ; } /** @var int $index */ $ index = $ this -> protocolWriterIndexes [ $ resource -> getProtocol ( ) ] ; return $ this -> writers [ $ index ] ; }
Resolves a writer for the given resource URI.

@param ResourceUri $resource
@return ResourceWriter
Resolves a writer for the given resource URI .