public function setDriver(\BearFramework\App\IDataDriver $driver): self
    {
        if ($this->driver !== null) {
            throw new \Exception('A data driver is already set!');
        }
        $this->driver = $driver;
        if ($this->filenameProtocol !== null) {
            \BearFramework\Internal\DataItemStreamWrapper::$environment[$this->filenameProtocol] = [$this, $driver];
        }
        return $this;
    }