JInstaller adapter path option - Joomla! Forum - community, help and support


i think idea have config option jinstaller class, when creating new instance, set adapter path. allow me use installer class own custom installer, keep adapters outside of core libraries folders.

at moment think way use in way extend jinstaller class , add new setadapter function modified  path.

an example:

code: select all

$installer =& jinstaller::getinstance( array(
    'adapter_path' => jpath_component .ds. 'adapters'
) ); 


then setadapter function in jinstaller class:

code: select all

function setadapter($name, $adapter = null)
{
    if (!is_object($adapter))
    {         
        // try load adapter object
        require_once($this->adapter_path.ds.strtolower($name).'.php');
        $class = 'jinstaller'.ucfirst($name);
        if (!class_exists($class)) {
            return false;
        }
        $adapter = new $class($this);
        $adapter->parent =& $this;
    }
    $this->_adapters[$name] =& $adapter;
    return true;
}


any other suggestions?






Comments

Popular posts from this blog

Error compiling for board Arduino/Genuino Uno.

Installation database is corrupt

RFID-RC522 with Arduino Pro Micro project. Error on the code?