JInstaller
class JInstaller extends JAdapter
Joomla base installer class
Properties
object | $manifestClass | The manifest trigger class | |
JTableExtension | $extension | Extension Table Entry | |
string | $message | The output from the install/uninstall scripts | |
object | $manifest | The installation manifest XML object |
Methods
Constructor
Sets a default value if not alreay assigned
Returns a property of the object or the default value if the property is not set.
Returns an associative array of object properties.
Get the most recent error message.
Modifies a property of the object, creating it if it does not already exist.
Set the object properties based on a named array/hash.
Set an adapter by name
Returns the global Installer object, only creating it if it doesn't already exist.
Get the allow overwrite switch
Set the allow overwrite switch
Get the redirect location
Set the redirect location
Get the upgrade switch
Set the upgrade switch
Get the installation manifest object
Get an installer path by name
Sets an installer path by name
Pushes a step onto the installer stack for rolling back steps
Installation abort method
Package installation method
No description
Extension discover method Asks each adapter to find extensions
Package update method
Package uninstallation method
Refreshes the manifest cache stored in #__extensions
Prepare for installation: this method sets the installation directory, finds and checks the installation file and verifies the installation type.
Backward compatible method to parse through a queries element of the installation manifest file and take appropriate action.
Method to extract the name of a discreet installation sql file from the installation manifest file.
Set the schema version for an extension by looking at its latest update
Method to parse through a files element of the installation manifest and take appropriate action.
Method to parse through a languages element of the installation manifest and take appropriate action.
Method to parse through a media element of the installation manifest and take appropriate action.
Method to parse the parameters of an extension, build the INI string for its default parameters, and return the INI string.
Copyfiles
Method to parse through a files element of the installation manifest and remove the files that were installed
Copies the installation manifest file to the extension folder in the given client
Tries to find the package manifest file
Is the XML file a valid Joomla installation manifest file
Generates a manifest cache
Cleans up discovered extensions if they're being installed some other way
Compares two "files" entries to find deleted files/folders
Loads an MD5SUMS file into an associative array
Details
at line 113
JObject
__construct()
Constructor
in JObject at line 56
string
__toString()
Magic method to convert the object to a string gracefully.
in JObject at line 70
mixed
def(string $property, mixed $default = null)
Sets a default value if not alreay assigned
in JObject at line 88
mixed
get(string $property, mixed $default = null)
Returns a property of the object or the default value if the property is not set.
in JObject at line 107
array
getProperties(boolean $public = true)
Returns an associative array of object properties.
in JObject at line 133
string
getError(integer $i = null, boolean $toString = true)
Get the most recent error message.
in JObject at line 165
array
getErrors()
Return all errors, if any.
in JObject at line 180
mixed
set(string $property, mixed $value = null)
Modifies a property of the object, creating it if it does not already exist.
in JObject at line 198
boolean
setProperties(mixed $properties)
Set the object properties based on a named array/hash.
in JObject at line 222
void
setError(string $error)
Add an error message.
in JObject at line 235
string
toString()
deprecated
deprecated
in JAdapter at line 90
object
getDBO()
Get the database connector object
in JAdapter at line 106
boolean
setAdapter(string $name, object $adapter = null, array $options = array())
Set an adapter by name
in JAdapter at line 141
object
getAdapter(string $name, array $options = array())
Return an adapter.
in JAdapter at line 163
void
loadAllAdapters(array $options = array())
Loads all adapters.
at line 125
static object
getInstance()
Returns the global Installer object, only creating it if it doesn't already exist.
at line 141
boolean
getOverwrite()
Get the allow overwrite switch
at line 154
boolean
setOverwrite(boolean $state = false)
Set the allow overwrite switch
at line 174
string
getRedirectURL()
Get the redirect location
at line 185
setRedirectURL(string $newurl)
Set the redirect location
at line 196
boolean
getUpgrade()
Get the upgrade switch
at line 209
boolean
setUpgrade(boolean $state = false)
Set the upgrade switch
at line 229
object
getManifest()
Get the installation manifest object
at line 247
string
getPath(string $name, string $default = null)
Get an installer path by name
at line 261
void
setPath(string $name, string $value)
Sets an installer path by name
at line 274
void
pushStep(array $step)
Pushes a step onto the installer stack for rolling back steps
at line 288
boolean
abort(string $msg = null, string $type = null)
Installation abort method
at line 376
boolean
install(string $path = null)
Package installation method
at line 430
discover_install($eid = null)
at line 495
array
discover()
Extension discover method Asks each adapter to find extensions
at line 525
boolean
update(string $path = null)
Package update method
at line 578
boolean
uninstall(string $type, mixed $identifier, integer $cid)
Package uninstallation method
at line 611
mixed
refreshManifestCache(integer $eid)
Refreshes the manifest cache stored in #__extensions
at line 669
boolean
setupInstall()
Prepare for installation: this method sets the installation directory, finds and checks the installation file and verifies the installation type.
at line 698
mixed
parseQueries(JXMLElement $element)
Backward compatible method to parse through a queries element of the installation manifest file and take appropriate action.
at line 739
mixed
parseSQLFiles(object $element)
Method to extract the name of a discreet installation sql file from the installation manifest file.
at line 826
void
setSchemaVersion(JXMLElement $schema, integer $eid)
Set the schema version for an extension by looking at its latest update
at line 881
boolean
parseSchemaUpdates(JXMLElement $schema, integer $eid)
Method to process the updates for an item
at line 996
boolean
parseFiles(JXMLElement $element, integer $cid, array $oldFiles = null, array $oldMD5 = null)
Method to parse through a files element of the installation manifest and take appropriate action.
at line 1105
boolean
parseLanguages(JXMLElement $element, integer $cid)
Method to parse through a languages element of the installation manifest and take appropriate action.
at line 1207
boolean
parseMedia(JXMLElement $element, integer $cid)
Method to parse through a media element of the installation manifest and take appropriate action.
at line 1282
string
getParams()
Method to parse the parameters of an extension, build the INI string for its default parameters, and return the INI string.
at line 1333
boolean
copyFiles(array $files, boolean $overwrite = null)
Copyfiles
Copy files from source directory to the target directory
at line 1428
boolean
removeFiles(object $element, integer $cid)
Method to parse through a files element of the installation manifest and remove the files that were installed
at line 1570
boolean
copyManifest(integer $cid = 1)
Copies the installation manifest file to the extension folder in the given client
at line 1596
boolean
findManifest()
Tries to find the package manifest file
at line 1651
mixed
isManifest(string $file)
Is the XML file a valid Joomla installation manifest file
at line 1699
string
generateManifestCache()
Generates a manifest cache
at line 1715
object
cleanDiscoveredExtension(string $type, string $element, string $folder = '', integer $client)
Cleans up discovered extensions if they're being installed some other way
at line 1732
array
findDeletedFiles(array $old_files, array $new_files)
Compares two "files" entries to find deleted files/folders
at line 1818
array
loadMD5Sum(string $filename)
Loads an MD5SUMS file into an associative array