final public function init($sName, $xDialog)
    {
        // Set the library name
        $this->sName = $sName;
        // Set the dialog
        $this->xDialog = $xDialog;
        // Set the Response instance
        $this->setResponse($xDialog->response());
        // Set the default URI.
        $this->sUri = $this->xDialog->getOption('dialogs.lib.uri', $this->sUri);
        // Set the library URI.
        $this->sUri = rtrim($this->getOption('uri', $this->sUri), '/');
        // Set the subdir
        $this->sSubDir = trim($this->getOption('subdir', $this->sSubDir), '/');
        // Set the version number
        $this->sVersion = trim($this->getOption('version', $this->sVersion), '/');
    }