JInstaller/install
From Joomla! Documentation
< API15:JInstallerRevision as of 17:23, 22 March 2010 by Doxiki (talk | contribs) (New page: ===Description===
Package installation method
<span class="editsection" style="font-size:76%;">
<nowiki>[</nowiki>Edit Descripton<nowiki>]</nowiki>
...)
Revision as of 17:23, 22 March 2010 by Doxiki (talk | contribs) (New page: ===Description===
Package installation method
<span class="editsection" style="font-size:76%;">
<nowiki>[</nowiki>Edit Descripton<nowiki>]</nowiki>
...)
The "API15" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.
Description[edit]
Package installation method
Template:Description:JInstaller/install
Syntax[edit]
install($path=null)
Parameter Name | Default Value | Description |
---|---|---|
$path | null | $path Path to package source folder |
Returns[edit]
boolean True if successful
Defined in[edit]
libraries/joomla/installer/installer.php
Importing[edit]
jimport( 'joomla.installer.installer' );
Source Body[edit]
function install($path=null)
{
if ($path && JFolder::exists($path)) {
$this->setPath('source', $path);
} else {
$this->abort(JText::_('Install path does not exist'));
return false;
}
if (!$this->setupInstall()) {
$this->abort(JText::_('Unable to detect manifest file'));
return false;
}
/*
* LEGACY CHECK
*/
$root =& $this->_manifest->document;
$version = $root->attributes('version');
$rootName = $root->name();
$config = &JFactory::getConfig();
if ((version_compare($version, '1.5', '<') || $rootName == 'mosinstall') && !$config->getValue('config.legacy')) {
$this->abort(JText::_('MUSTENABLELEGACY'));
return false;
}
$type = $root->attributes('type');
// Needed for legacy reasons ... to be deprecated in next minor release
if ($type == 'mambot') {
$type = 'plugin';
}
if (is_object($this->_adapters[$type])) {
return $this->_adapters[$type]->install();
}
return false;
}
[Edit See Also] Template:SeeAlso:JInstaller/install
Examples[edit]
<CodeExamplesForm />