Pagekit\Filesystem\Filesystem::registerAdapter PHP Method

registerAdapter() public method

Registers a adapter.
public registerAdapter ( string $protocol, Pagekit\Filesystem\Adapter\AdapterInterface $adapter )
$protocol string
$adapter Pagekit\Filesystem\Adapter\AdapterInterface
    public function registerAdapter($protocol, AdapterInterface $adapter)
    {
        $this->adapters[$protocol] = $adapter;
        if ($wrapper = $adapter->getStreamWrapper()) {
            stream_wrapper_register($protocol, $wrapper);
        }
    }