Support Joomla!

Packages

Package: Joomla-Framework

License

Content on this site is copyright © 2005 - 2008 Open Source Matters Inc and can be used in accordance with the Joomla! Electronic Documentation License. Some parts of this website may be subject to other licenses.

 Class JInstaller

Description

Joomla base installer class

  • since: 1.5

Located in /joomla/installer/installer.php (line 30)

Class JObject   (Subpackage Base)

Class JInstaller   (Subpackage Installer)
Variable Summary
Variable string $message
Variable array $_adapters
Variable object $_db
Variable object $_manifest
Variable boolean $_overwrite
Variable array $_paths
Variable array $_stepStack
Method Summary
Static method static object An &getInstance ()
Constructor JInstaller __construct ()
Method boolean abort ([string $msg = null], [string $type = null])
Method boolean copyFiles (array $files, [boolean $overwrite = null])
Method boolean copyManifest ([int $cid = 1])
Method object Database &getDBO ()
Method object Manifest &getManifest ()
Method boolean getOverwrite ()
Method string getParams ()
Method string getPath (string $name, [string $default = null])
Method boolean install ([string $path = null])
Method boolean parseFiles (object $element, [int $cid = 0])
Method boolean parseLanguages (object $element, [int $cid = 0])
Method boolean parseMedia (object $element, [int $cid = 0])
Method mixed parseQueries (object $element)
Method mixed parseSQLFiles (object $element, string $version)
Method void pushStep (array $step)
Method boolean removeFiles (object $element, [int $cid = 0])
Method boolean setAdapter (string $name, [object $adapter = null])
Method boolean setOverwrite ([boolean $state = false])
Method void setPath (string $name, string $value)
Method boolean setupInstall ()
Method boolean uninstall (string $type, mixed $identifier, [int $cid = 0])
Method boolean update ([string $path = null])
Variables
string $message = null (line 73)

The output from the install/uninstall scripts

array $_adapters = array() (line 60)

Associative array of package installer handlers

object $_db = null (line 54)

A database connector object

object $_manifest = null (line 42)

The installation manifest XML object

boolean $_overwrite = false (line 48)

True if existing files can be overwritten

array $_paths = array() (line 36)

Array of paths needed by the installer

array $_stepStack = array() (line 67)

Stack of installation steps

  • Used for installation rollback

Inherited Variables

Inherited from JObject

Variable JObject::$_errors
Methods
Constructor __construct (line 80)

Constructor

  • access: protected
JInstaller __construct ()

Redefinition of:
JObject::__construct()
Class constructor, overridden in descendant classes.
abort (line 237)

Installation abort method

  • return: True if successful
  • since: 1.5
  • access: public
boolean abort ([string $msg = null], [string $type = null])
  • string $msg: Abort message from the installer
  • string $type: Package type if defined
copyFiles (line 880)

Copy files from source directory to the target directory

  • return: True on success
  • since: 1.5
  • access: public
boolean copyFiles (array $files, [boolean $overwrite = null])
  • array $files: array with filenames
  • boolean $overwrite: True if existing files can be replaced
copyManifest (line 1073)

Copies the installation manifest file to the extension folder in the given client

  • return: True on success, False on error
  • since: 1.5
  • access: public
boolean copyManifest ([int $cid = 1])
  • int $cid: Where to copy the installfile [optional: defaults to 1 (admin)]
getDBO (line 141)

Get the database connector object

  • return: connector object
  • since: 1.5
  • access: public
object Database &getDBO ()
getInstance (line 93)

Returns a reference to the global Installer object, only creating it if it doesn't already exist.

  • return: installer object
  • since: 1.5
object An &getInstance ()
getManifest (line 153)

Get the installation manifest object

  • return: object
  • since: 1.5
  • access: public
object Manifest &getManifest ()
getOverwrite (line 110)

Get the allow overwrite switch

  • return: Allow overwrite switch
  • since: 1.5
  • access: public
boolean getOverwrite ()
getParams (line 836)

Method to parse the parameters of an extension, build the INI string for it's default parameters, and return the INI string.

  • return: INI string of parameter values
  • since: 1.5
  • access: public
string getParams ()
getPath (line 170)

Get an installer path by name

  • return: Path
  • since: 1.5
  • access: public
string getPath (string $name, [string $default = null])
  • string $name: Path name
  • string $default: Default value
install (line 298)

Package installation method

  • return: True if successful
  • since: 1.5
  • access: public
boolean install ([string $path = null])
  • string $path: Path to package source folder
parseFiles (line 568)

Method to parse through a files element of the installation manifest and take appropriate action.

  • return: True on success
  • since: 1.5
  • access: public
boolean parseFiles (object $element, int $cid)
  • object $element: The xml node to process
  • int $cid: Application ID of application to install to
parseLanguages (line 655)

Method to parse through a languages element of the installation manifest and take appropriate action.

  • return: True on success
  • since: 1.5
  • access: public
boolean parseLanguages (object $element, int $cid)
  • object $element: The xml node to process
  • int $cid: Application ID of application to install to
parseMedia (line 755)

Method to parse through a media element of the installation manifest and take appropriate action.

  • return: True on success
  • since: 1.5
  • access: public
boolean parseMedia (object $element, int $cid)
  • object $element: The xml node to process
  • int $cid: Application ID of application to install to
parseQueries (line 447)

Backward compatible Method to parse through a queries element of the installation manifest file and take appropriate action.

  • return: Number of queries processed or False on error
  • since: 1.5
  • access: public
mixed parseQueries (object $element)
  • object $element: The xml node to process
parseSQLFiles (line 485)

Method to extract the name of a discreet installation sql file from the installation manifest file.

  • return: Number of queries processed or False on error
  • since: 1.5
  • access: public
mixed parseSQLFiles (object $element, string $version)
  • object $element: The xml node to process
  • string $version: The database connector to use
pushStep (line 197)

Pushes a step onto the installer stack for rolling back steps

  • since: 1.5
  • access: public
void pushStep (array $step)
  • array $step: Installer step
removeFiles (line 974)

Method to parse through a files element of the installation manifest and remove the files that were installed

  • return: True on success
  • since: 1.5
  • access: public
boolean removeFiles (object $element, int $cid)
  • object $element: The xml node to process
  • int $cid: Application ID of application to remove from
setAdapter (line 211)

Set an installer adapter by name

  • return: True if successful
  • since: 1.5
  • access: public
boolean setAdapter (string $name, [object $adapter = null])
  • string $name: Adapter name
  • object $adapter: Installer adapter object
setOverwrite (line 123)

Set the allow overwrite switch

  • return: Previous value
  • since: 1.5
  • access: public
boolean setOverwrite ([boolean $state = false])
  • boolean $state: Overwrite switch state
setPath (line 184)

Sets an installer path by name

  • since: 1.5
  • access: public
void setPath (string $name, string $value)
  • string $name: Path name
  • string $value: Path
setupInstall (line 412)

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

  • return: True on success
  • since: 1.0
  • access: public
boolean setupInstall ()
uninstall (line 391)

Package uninstallation method

  • return: True if successful
  • since: 1.5
  • access: public
boolean uninstall (string $type, mixed $identifier, int $cid)
  • string $type: Package type
  • mixed $identifier: Package identifier for adapter
  • int $cid: Application ID
update (line 345)

Package update method

  • return: True if successful
  • since: 1.5
  • access: public
boolean update ([string $path = null])
  • string $path: Path to package source folder

Inherited Methods

Inherited From JObject

 JObject::JObject()
 JObject::__construct()
 JObject::get()
 JObject::getError()
 JObject::getErrors()
 JObject::getProperties()
 JObject::getPublicProperties()
 JObject::set()
 JObject::setError()
 JObject::setProperties()
 JObject::toString()

Documentation generated on Mon, 22 Sep 2008 12:10:27 +0100 by phpDocumentor 1.3.1