public function registerAdapter($protocol, AdapterInterface $adapter) { $this->adapters[$protocol] = $adapter; if ($wrapper = $adapter->getStreamWrapper()) { stream_wrapper_register($protocol, $wrapper); } }