Installer

class OC\Installer
This class provides the functionality needed to install, update and remove apps
Source:lib/private/Installer.php#62

Properties

Methods

public OC\Installer::__construct($appFetcher, $clientService, $tempManager, $logger, $config, $isCLI)
Source:lib/private/Installer.php#80
public OC\Installer::installApp($appId, $forceEnable=false)
Installs an app that is located in one of the app folders already
Source:

lib/private/Installer.php#104

Parameters:
  • $appId (string) App to install
  • $forceEnable (bool)
Throws:

\Exception

Returns:

string app ID

public OC\Installer::updateAppstoreApp($appId, $allowUnstable=false)
Updates the specified app from the appstore
Source:

lib/private/Installer.php#193

Parameters:
  • $appId (string)
Returns:

bool

public OC\Installer::downloadApp($appId, $allowUnstable=false)
Downloads an app and puts it into the app directory
Source:

lib/private/Installer.php#229

Parameters:
  • $appId (string)
Throws:

\Exception If the installation was not successful

public OC\Installer::isUpdateAvailable($appId, $allowUnstable=false)
Check if an update for the app is available
Source:

lib/private/Installer.php#416

Parameters:
  • $appId (string)
  • $allowUnstable (bool)
Returns:

string | bool false or the version number of the update

public OC\Installer::isDownloaded($name)
Check if app is already downloaded
Source:

lib/private/Installer.php#480

Parameters:
  • $name (string) name of the application to remove
Returns:

bool The function will check if the app is already downloaded in the apps repository

public OC\Installer::removeApp($appId)
Removes an app
Source:

lib/private/Installer.php#508

Parameters:
  • $appId (string) ID of the application to remove
Returns:
bool This function works as follows

-# call uninstall repair steps -# removing the files

The function will not delete preferences, tables and the configuration, this has to be done by the function oc_app_uninstall().

public OC\Installer::installAppBundle($bundle)
Installs the app within the bundle and marks the bundle as installed
Source:

lib/private/Installer.php#529

Parameters:
Throws:

\Exception If app could not get installed

public static OC\Installer::installShippedApps($softErrors=false)
Installs shipped apps
This function installs all apps found in the ‘apps’ directory that should be enabled by default;
Source:

lib/private/Installer.php#552

Parameters:
  • $softErrors (bool) When updating we ignore errors and simply log them, better to have a

working ownCloud at the end instead of an aborted update.

Returns:

array Array of error messages (appid => Exception)

public static OC\Installer::installShippedApp($app)
install an app already placed in the app folder
Source:

lib/private/Installer.php#597

Parameters:
  • $app (string) id of the app to install
Returns:

int