Setup

class OC\Setup
Source:lib/private/Setup.php#66

Properties

protected static property OC\Setup::$config
Source:lib/private/Setup.php#68
Type:\OC\SystemConfig
protected static property OC\Setup::$iniWrapper
Source:lib/private/Setup.php#70
Type:\bantu\IniGetWrapper\IniGetWrapper
protected static property OC\Setup::$l10n
Source:lib/private/Setup.php#72
Type:\OCP\IL10N
protected static property OC\Setup::$defaults
Source:lib/private/Setup.php#74
Type:\OCP\Defaults
protected static property OC\Setup::$logger
Source:lib/private/Setup.php#76
Type:\Psr\Log\LoggerInterface
protected static property OC\Setup::$random
Source:lib/private/Setup.php#78
Type:\OCP\Security\ISecureRandom
protected static property OC\Setup::$installer
Source:lib/private/Setup.php#80
Type:\OC\Installer
protected property OC\Setup::$dbSetupClasses
Source:lib/private/Setup.php#100

Methods

public OC\Setup::__construct($config, $iniWrapper, $l10n, $defaults, $logger, $random, $installer)
Source:lib/private/Setup.php#82
protected OC\Setup::class_exists($name)
Wrapper around the “class_exists” PHP function to be able to mock it
Source:

lib/private/Setup.php#114

Parameters:
  • $name (string)
Returns:

bool

protected OC\Setup::is_callable($name)
Wrapper around the “is_callable” PHP function to be able to mock it
Source:

lib/private/Setup.php#124

Parameters:
  • $name (string)
Returns:

bool

protected OC\Setup::getAvailableDbDriversForPdo()
Wrapper around \PDO::getAvailableDrivers
Source:lib/private/Setup.php#133
Returns:array
public OC\Setup::getSupportedDatabases($allowAllDatabases=false)
Get the available and supported databases of this instance
Source:

lib/private/Setup.php#144

Parameters:
  • $allowAllDatabases (bool)
Returns:

array

Throws:

\Exception

public OC\Setup::getSystemInfo($allowAllDatabases=false)
Gathers system information like database type and does
a few system checks.
Source:lib/private/Setup.php#206
Returns:array of system info, including an “errors” value in case of errors/warnings
public OC\Setup::install($options)
Source:

lib/private/Setup.php#275

Parameters:
  • $options
Returns:

array

public static OC\Setup::installBackgroundJobs()
Source:lib/private/Setup.php#446
public static OC\Setup::updateHtaccess()
Append the correct ErrorDocument path for Apache hosts
Source:lib/private/Setup.php#491
Returns:bool True when success, False otherwise
Throws:\OCP\AppFramework\QueryException
public static OC\Setup::protectDataDirectory()
Source:lib/private/Setup.php#562