JInstaller/setupInstall: Difference between revisions
From Joomla! Documentation
New page: ===Description===
Prepare for installation: this method sets the installation directory, finds and checks the installation file and verifies the installation type
<span class="editsecti... |
m preparing for archive only |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 2: | Line 2: | ||
Prepare for installation: this method sets the installation directory, finds and checks the installation file and verifies the installation type | Prepare for installation: this method sets the installation directory, finds and checks the installation file and verifies the installation type | ||
<! removed transcluded page call, red link never existed > | |||
===Syntax=== | ===Syntax=== | ||
| Line 44: | Line 42: | ||
</source> | </source> | ||
<! removed transcluded page call, red link never existed > | |||
< | |||
===Examples=== | ===Examples=== | ||
=== Code Examples === | |||
<dpl> | <dpl> | ||
noresultsheader=\n | noresultsheader=\n | ||
category=setupInstall | category=setupInstall | ||
category=JInstaller | category=JInstaller | ||
namespace=CodeExample | |||
category=MethodExample | category=MethodExample | ||
include=* | include=* | ||
format= ,,, | format= ,,, | ||
</dpl> | </dpl> | ||
[[Category:Archived pages API16]] | |||
Latest revision as of 01:48, 25 March 2017
Description
Prepare for installation: this method sets the installation directory, finds and checks the installation file and verifies the installation type
<! removed transcluded page call, red link never existed >
Syntax
setupInstall()
Returns
boolean True on success
Defined in
libraries/joomla/installer/installer.php
Importing
jimport( 'joomla.installer.installer' );
Source Body
public function setupInstall()
{
// We need to find the installation manifest file
if (!$this->findManifest()) {
return false;
}
// Load the adapter(s) for the install manifest
$type = (string)$this->manifest->attributes()->type;
// Lazy load the adapter
if (!isset($this->_adapters[$type]) || !is_object($this->_adapters[$type]))
{
if (!$this->setAdapter($type)) {
return false;
}
}
return true;
}
<! removed transcluded page call, red link never existed >
Examples
Code Examples