FileAdapter

Extends \Joomla\CMS\Installer\InstallerAdapter

File installer

since

3.1

Methods

__construct

Constructor

__construct(\JAdapter $parent, \JDatabaseDriver $db, array $options = array()) 
inherited
since

1.6

Arguments

$parent

\JAdapterParent object

$db

\JDatabaseDriverDatabase object

$options

arrayConfiguration Options

canUninstallPackageChild

Check if a package extension allows its child extensions to be uninstalled individually

canUninstallPackageChild(integer $packageId) : boolean
inherited
since

3.7.0

note

This method defaults to true to emulate the behavior of 3.6 and earlier which did not support this lookup

Arguments

$packageId

integerThe extension ID of the package to check

Response

boolean

checkExistingExtension

Method to check if the extension is already present in the database

checkExistingExtension() : void
inherited
since

3.4

throws

\RuntimeException

checkExtensionInFilesystem

Method to check if the extension is present in the filesystem, flags the route as update if so

checkExtensionInFilesystem() : void
inherited
since

3.4

throws

\RuntimeException

copyBaseFiles

Method to copy the extension's base files from the <files> tag(s) and the manifest file

copyBaseFiles() : void
inherited abstract
since

3.4

throws

\RuntimeException

createExtensionRoot

Method to create the extension root path if necessary

createExtensionRoot() : void
inherited
since

3.4

throws

\RuntimeException

discover_install

Generic discover_install method for extensions

discover_install() : boolean
inherited
since

3.4

Response

booleanTrue on success

doDatabaseTransactions

Method to handle database transactions for the installer

doDatabaseTransactions() : boolean
inherited
since

3.4

throws

\RuntimeException

Response

booleanTrue on success

doLoadLanguage

Load language files

doLoadLanguage(string $extension, string $source, string $base = JPATH_ADMINISTRATOR) : void
inherited
since

3.4

Arguments

$extension

stringThe name of the extension

$source

stringPath to the extension

$base

stringBase path for the extension language

extensionExistsInSystem

Function used to check if extension is already installed

extensionExistsInSystem(string $extension = null) : boolean
since

3.1

Arguments

$extension

stringThe element name of the extension to install

Response

booleanTrue if extension exists

finaliseInstall

Method to finalise the installation processing

finaliseInstall() : void
since

3.4

throws

\RuntimeException

getDiscoverInstallSupported

Checks if the adapter supports discover_install

getDiscoverInstallSupported() : boolean
inherited
since

3.4

Response

boolean

getElement

Get the filtered extension element from the manifest

getElement(string $element = null) : string
inherited
since

3.4

Arguments

$element

stringOptional element name to be converted

Response

stringThe filtered element

getManifest

Get the manifest object.

getManifest() : \SimpleXMLElement
inherited
since

3.4

Response

\SimpleXMLElementManifest object

getName

Get the filtered component name from the manifest

getName() : string
inherited
since

3.4

Response

stringThe filtered name

getParent

Retrieves the parent object

getParent() : \Joomla\CMS\Installer\Installer
inherited

Retrieves the parent object.

Response

\Joomla\CMS\Installer\Installer

getParent

Retrieves the parent object

getParent() : \JAdapter
inherited
since

1.6

Response

\JAdapter

getRoute

Get the install route being followed

getRoute() : string
inherited
since

3.4

Response

stringThe install route

getScriptClassName

Get the class name for the install adapter script.

getScriptClassName() : string
inherited
since

3.4

Response

stringThe class name.

install

Generic install method for extensions

install() : boolean|integer
inherited
since

3.4

Response

boolean|integerThe extension ID on success, boolean false on failure

loadLanguage

Custom loadLanguage method

loadLanguage(string $path) : void
since

3.1

Arguments

$path

stringThe path on which to find language files.

parseOptionalTags

Method to parse optional tags in the manifest

parseOptionalTags() : void
inherited
since

3.1

parseQueries

Method to parse the queries specified in the <sql> tags

parseQueries() : void
inherited
since

3.4

throws

\RuntimeException

populateFilesAndFolderList

Function used to populate files and folder list

populateFilesAndFolderList() : boolean
since

3.1

Response

booleannone

prepareDiscoverInstall

Prepares the adapter for a discover_install task

prepareDiscoverInstall() : void
inherited
since

3.4

refreshManifestCache

Refreshes the extension table cache

refreshManifestCache() : boolean
since

3.1

Response

booleanresult of operation, true if updated, false on failure

setManifest

Set the manifest object.

setManifest(object $manifest) : \Joomla\CMS\Installer\InstallerAdapter
inherited
since

3.4

Arguments

$manifest

objectThe manifest object

Response

\Joomla\CMS\Installer\InstallerAdapterInstance of this class to support chaining

setRoute

Set the install route being followed

setRoute(string $route) : \Joomla\CMS\Installer\InstallerAdapter
inherited
since

3.4

Arguments

$route

stringThe install route being followed

Response

\Joomla\CMS\Installer\InstallerAdapterInstance of this class to support chaining

setupInstallPaths

Method to do any prechecks and setup the install paths for the extension

setupInstallPaths() : void
inherited abstract
since

3.4

setupScriptfile

Setup the manifest script file for those adapters that use it.

setupScriptfile() : void
inherited
since

3.4

setupUpdates

Method to setup the update routine for the adapter

setupUpdates() : void
inherited
since

3.4

storeExtension

Method to store the extension to the database

storeExtension() : void
inherited abstract
since

3.4

throws

\RuntimeException

triggerManifestScript

Executes a custom install script method

triggerManifestScript(string $method) : boolean
inherited
since

3.4

throws

\RuntimeException

Arguments

$method

stringThe install method to execute

Response

booleanTrue on success

uninstall

Custom uninstall method

uninstall(string $id) : boolean
since

3.1

Arguments

$id

stringThe id of the file to uninstall

Response

booleanTrue on success

update

Generic update method for extensions

update() : boolean|integer
inherited
since

3.4

Response

boolean|integerThe extension ID on success, boolean false on failure

Properties

scriptElement

<scriptfile> element of the extension manifest

since

3.1

Type(s)

object

supportsDiscoverInstall

Flag if the adapter supports discover installs

inherited

Adapters should override this and set to false if discover install is unsupported

since

3.4

Type(s)

boolean

currentExtensionId

ID for the currently installed extension if present

inherited
since

3.4

Type(s)

integer

element

The unique identifier for the extension (e.g. mod_login)

inherited
since

3.4

Type(s)

string

extension

Extension object.

inherited
since

3.4

Type(s)

\Joomla\CMS\Table\Extension

extensionMessage

Messages rendered by custom scripts

inherited
since

3.4

Type(s)

string

manifest

Copy of the XML manifest file.

inherited

Making this object public allows extensions to customize the manifest in custom scripts.

since

3.4

Type(s)

string

manifest_script

A path to the PHP file that the scriptfile declaration in the manifest refers to.

inherited
since

3.4

Type(s)

string

name

Name of the extension

inherited
since

3.4

Type(s)

string

route

Install function routing

inherited
since

3.4

Type(s)

string

type

The type of adapter in use

inherited
since

3.4

Type(s)

string

parent

Parent

inherited
since

1.6

Type(s)

\JAdapter

db

Database

inherited
since

1.6

Type(s)

\JDatabaseDriver

parent

Parent

inherited

Parent object

Type(s)

\Joomla\CMS\Installer\Installer