public function set_installer_instance(tool_installaddon_installer $installer) {
        if (is_null($this->installer)) {
            $this->installer = $installer;
        } else {
            throw new coding_exception('Attempting to reset the installer instance.');
        }
    }
public function set_installer_instance(tool_installaddon_installer $installer) {
        if (is_null($this->installer)) {
            $this->installer = $installer;
        } else {
            throw new coding_exception('Attempting to reset the installer instance.');
        }
    }
public function set_installer_instance ( tool_installaddon_installer $ installer ) { if ( is_null ( $ this -> installer ) ) { $ this -> installer = $ installer ; } else { throw new coding_exception ( 'Attempting to reset the installer instance.' ) ; } }
Sets the tool_installaddon_installer instance being used.

@throws coding_exception if the installer has been already set
@param tool_installaddon_installer $installer
Sets the tool_installaddon_installer instance being used .