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: 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: Parameters: - $appId (string)
Returns: bool
-
public
OC\Installer::
downloadApp
($appId, $allowUnstable=false)¶ - Downloads an app and puts it into the app directory
Source: 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: 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: 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: 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: Parameters: - $bundle (
OC\App\AppStore\Bundles\Bundle
)
Throws: \Exception
If app could not get installed - $bundle (
-
public static
OC\Installer::
installShippedApps
($softErrors=false)¶ - Installs shipped appsThis function installs all apps found in the ‘apps’ directory that should be enabled by default;
Source: 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: Parameters: - $app (string) id of the app to install
Returns: int