At the moment I think the only way to use it in this way is to extend the Jinstaller class and add a new setAdapter function with the modified path.
an example:
Code: Select all
$installer =& JInstaller::getInstance( array(
'adapter_path' => JPATH_COMPONENT .DS. 'adapters'
) );
Code: Select all
function setAdapter($name, $adapter = null)
{
if (!is_object($adapter))
{
// Try to load the 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;
}