Class mosInstaller

Description

Installer class

  • abstract:

Located in /administrator/components/com_installer/installer.class.php (line 20)


	
			
Direct descendents
Class Description
mosInstallerComponent Component installer
mosInstallerLanguage Language installer
mosInstallerMambot Module installer
mosInstallerModule Module installer
mosInstallerTemplate Template installer
Variable Summary
Method Summary
mosInstaller mosInstaller ()
boolean copyFiles (string $p_sourcedir, string $p_destdir, array $p_files, [boolean $overwrite = false])
boolean copySetupFile ([mixed $where = 'admin'])
void elementDir ([mixed $p_dirname = null])
void elementName ([mixed $p_name = null])
void elementSpecial ([mixed $p_name = null])
void errno ([mixed $p_errno = null])
void error ([mixed $p_error = null])
boolean extractArchive ()
boolean findInstallFile ()
string getError ([boolean $p_full = false], string 1)
void hasInstallfile ([mixed $p_hasinstallfile = null])
void install ()
void installArchive ([mixed $p_filename = null])
void installDir ([mixed $p_dirname = null])
void installfile ([mixed $p_installfile = null])
void installFilename ([mixed $p_filename = null])
void installType ([mixed $p_installtype = null])
object A isPackageFile (string $p_file)
void isWindows ()
mixed parseFiles ([string $tagName = 'files'], [string $special = ''], [string $specialError = ''], boolean $adminFiles)
boolean preInstallCheck (string $p_fromdir, string $type)
boolean readInstallFile ()
void returnTo (mixed $option, mixed $element)
void setError (int $p_errno, string $p_error)
The setVar (string $name, [mixed $value = null])
void uninstall ()
void unpackDir ([mixed $p_dirname = null])
boolean upload ([string $p_filename = null], [boolean $p_unpack = true])
void xmlDoc ([mixed $p_xmldoc = null])
Variables
mixed $i_docleanup = true (line 30)
string $i_elementdir = '' (line 33)
  • var: The directory where the element is to be installed
string $i_elementname = '' (line 35)
  • var: The name of the Mambo element
string $i_elementspecial = '' (line 37)
  • var: The name of a special atttibute in a tag
mixed $i_errno = 0 (line 26)
mixed $i_error = "" (line 27)
mixed $i_hasinstallfile = null (line 41)

Redefined in descendants as:
mixed $i_installarchive = "" (line 23)
mixed $i_installdir = "" (line 24)
mixed $i_installfile = null (line 42)

Redefined in descendants as:
mixed $i_installfilename = "" (line 22)
mixed $i_installtype = "" (line 28)
mixed $i_iswin = false (line 25)
mixed $i_unpackdir = "" (line 29)
object A $i_xmldoc = null (line 39)
  • var: DOMIT XML document
Methods
Constructor mosInstaller (line 47)

Constructor

mosInstaller mosInstaller ()
copyFiles (line 339)
  • return: True on success, False on error
boolean copyFiles (string $p_sourcedir, string $p_destdir, array $p_files, [boolean $overwrite = false])
  • string $p_sourcedir: Source directory
  • string $p_destdir: Destination directory
  • array $p_files: array with filenames
  • boolean $overwrite: True is existing files can be replaced
copySetupFile (line 368)

Copies the XML setup file to the element Admin directory

Used by Components/Modules/Mambot Installer Installer

  • return: True on success, False on error
boolean copySetupFile ([mixed $where = 'admin'])
elementDir (line 459)
void elementDir ([mixed $p_dirname = null])
elementName (line 463)
void elementName ([mixed $p_name = null])
elementSpecial (line 466)
void elementSpecial ([mixed $p_name = null])
errno (line 447)
void errno ([mixed $p_errno = null])
error (line 423)
void error ([mixed $p_error = null])
extractArchive (line 72)

Extracts the package archive file

  • return: True on success, False on error
boolean extractArchive ()
findInstallFile (line 131)

Tries to find the package XML file

  • return: True on success, False on error
boolean findInstallFile ()
getError (line 389)
string getError ([boolean $p_full = false], string 1)
  • string 1: The error message
  • boolean $p_full: True to display both number and message
hasInstallfile (line 451)
void hasInstallfile ([mixed $p_hasinstallfile = null])
install (line 202)

Abstract install method

void install ()

Redefined in descendants as:
installArchive (line 431)
void installArchive ([mixed $p_filename = null])
installDir (line 435)
void installDir ([mixed $p_dirname = null])
installfile (line 455)
void installfile ([mixed $p_installfile = null])
installFilename (line 408)
void installFilename ([mixed $p_filename = null])
installType (line 419)
void installType ([mixed $p_installtype = null])
isPackageFile (line 155)
  • return: DOMIT XML document, or null if the file failed to parse
object A isPackageFile (string $p_file)
  • string $p_file: A file path
isWindows (line 443)
void isWindows ()
parseFiles (line 256)
  • return: Number of file or False on error
mixed parseFiles ([string $tagName = 'files'], [string $special = ''], [string $specialError = ''], boolean $adminFiles)
  • string $tagName: The tag name to parse
  • string $special: An attribute to search for in a filename element
  • string $specialError: The value of the 'special' element if found
  • boolean $adminFiles: True for Administrator components
preInstallCheck (line 222)
boolean preInstallCheck (string $p_fromdir, string $type)
  • string $p_fromdir: Install from directory
  • string $type: The install type
readInstallFile (line 176)

Loads and parses the XML setup file

  • return: True on success, False on error
boolean readInstallFile ()
returnTo (line 214)

return to method

void returnTo (mixed $option, mixed $element)

Redefined in descendants as:
setError (line 380)
void setError (int $p_errno, string $p_error)
  • int $p_errno: The error number
  • string $p_error: The error message
setVar (line 401)
  • return: value of the property
The setVar (string $name, [mixed $value = null])
  • string $name: The name of the property to set/get
  • mixed $value: The value of the property to set
uninstall (line 208)

Abstract uninstall method

void uninstall ()

Redefined in descendants as:
unpackDir (line 439)
void unpackDir ([mixed $p_dirname = null])
upload (line 56)

Uploads and unpacks a file

  • return: True on success, False on error
boolean upload ([string $p_filename = null], [boolean $p_unpack = true])
  • string $p_filename: The uploaded package filename or install directory
  • boolean $p_unpack: True if the file is an archive file
xmlDoc (line 427)
void xmlDoc ([mixed $p_xmldoc = null])

Documentation generated on Fri, 4 Mar 2005 13:56:23 +1000 by phpDocumentor 1.3.0RC3