JInstaller adapter path option

User avatar
Joomla! Guru
Joomla! Guru
Posts: 692
Joined: Thu Aug 18, 2005 10:32 am
Location: United Kingdom

JInstaller adapter path option

Postby happy_noodle_boy » Wed Jan 30, 2008 9:50 am

I think it would be a good idea to have a config option for the JInstaller class, when creating a new instance, to set the adapter path. This would allow me to use the installer class for my own custom installer, but keep its adapters outside of the core libraries folders.

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'
) ); 

then the setAdapter function in Jinstaller class:

Code: Select all

function setAdapter($name, $adapter = null)
    if (!is_object($adapter))
        // Try to load the adapter object
        $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?
just because you're not paranoid, doesn't mean everybody isn't out to get you.

Return to “Wishlists and Feature Requests - Archive”

Who is online

Users browsing this forum: No registered users and 3 guests