API15:JInstaller/setAdapter
From Joomla! Documentation
This Namespace has been archived - Please Do Not Edit or Create Pages in this namespace. Pages contain information for a Joomla! version which is no longer supported. It exists only as a historical reference, will not be improved and its content may be incomplete.
Contents |
Description
Set an installer adapter by name
Description:JInstaller/setAdapter
Syntax
setAdapter($name, $adapter=null)
| Parameter Name | Default Value | Description |
|---|---|---|
| $name | $name Adapter name | |
| $adapter | null | $adapter Installer adapter object |
Returns
boolean True if successful
Defined in
libraries/joomla/installer/installer.php
Importing
jimport( 'joomla.installer.installer' );
Source Body
function setAdapter($name, $adapter = null) { if (!is_object($adapter)) { // Try to load the adapter object require_once(dirname(__FILE__).DS.'adapters'.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; }
[Edit See Also] SeeAlso:JInstaller/setAdapter
Examples
<CodeExamplesForm />
