public function setResource($resource)
    {
        $res = $this->driverInstance->setResource($resource);
        if (!$this->isInstanceOf($res, YamlInterface::class)) {
            throw new YamlException('YamlInterface method setSource() must return YamlInterface object.');
        }

        return $this;
    }