Support Joomla!

Joomla! 1.5 Documentation

Packages

Package: Joomla-Framework

Developer Network License

The Joomla! Developer Network content is © copyright 2006 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution- NonCommercial- ShareAlike 2.5

 Class JInstaller

Description

Joomla base installer class

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

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 71)

The output from the install/uninstall scripts

array $_adapters = array() (line 58)

Associative array of package installer handlers

object $_db = null (line 52)

A database connector object

object $_manifest = null (line 40)

The installation manifest XML object

boolean $_overwrite = false (line 46)

True if existing files can be overwritten

array $_paths = array() (line 34)

Array of paths needed by the installer

array $_stepStack = array() (line 65)

Stack of installation steps

  • Used for installation rollback

Methods
Constructor __construct (line 78)

Constructor

  • access: protected
JInstaller __construct ()

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

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 908)

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 1088)

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 139)

Get the database connector object

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

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 151)

Get the installation manifest object

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

Get the allow overwrite switch

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

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 168)

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 294)

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 558)

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 687)

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 786)

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 438)

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 476)

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 195)

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 994)

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 209)

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 121)

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 182)

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 403)

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 383)

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 338)

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::getPublicProperties()
 JObject::set()
 JObject::toString()

Documentation generated on Mon, 05 Mar 2007 21:08:39 +0000 by phpDocumentor 1.3.1