API15

JInstaller/setupInstall

From Joomla! Documentation

< API15:JInstaller
Revision as of 17:23, 22 March 2010 by Doxiki (talk | contribs) (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...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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]

Prepare for installation: this method sets the installation directory, finds and checks the installation file and verifies the installation type

[Edit Descripton]

Template:Description:JInstaller/setupInstall

Syntax[edit]

setupInstall()


Returns[edit]

boolean True on success

Defined in[edit]

libraries/joomla/installer/installer.php

Importing[edit]

jimport( 'joomla.installer.installer' );

Source Body[edit]

function setupInstall()
{
        // We need to find the installation manifest file
        if (!$this->_findManifest()) {
                return false;
        }

        // Load the adapter(s) for the install manifest
        $root =& $this->_manifest->document;
        $type = $root->attributes('type');

        // Needed for legacy reasons ... to be deprecated in next minor release
        if ($type == 'mambot') {
                $type = 'plugin';
        }

        // Lazy load the adapter
        if (!isset($this->_adapters[$type]) || !is_object($this->_adapters[$type])) {
                if (!$this->setAdapter($type)) {
                        return false;
                }
        }

        return true;
}

[Edit See Also] Template:SeeAlso:JInstaller/setupInstall

Examples[edit]

<CodeExamplesForm />