Merge branch 'main' into dependabot/npm_and_yarn/nextcloud/router-2.1.2
This commit is contained in:
Коммит
8aa2d45bdd
|
@ -45,35 +45,34 @@ class ClassLoader
|
|||
/** @var \Closure(string):void */
|
||||
private static $includeFile;
|
||||
|
||||
/** @var ?string */
|
||||
/** @var string|null */
|
||||
private $vendorDir;
|
||||
|
||||
// PSR-4
|
||||
/**
|
||||
* @var array[]
|
||||
* @psalm-var array<string, array<string, int>>
|
||||
* @var array<string, array<string, int>>
|
||||
*/
|
||||
private $prefixLengthsPsr4 = array();
|
||||
/**
|
||||
* @var array[]
|
||||
* @psalm-var array<string, array<int, string>>
|
||||
* @var array<string, list<string>>
|
||||
*/
|
||||
private $prefixDirsPsr4 = array();
|
||||
/**
|
||||
* @var array[]
|
||||
* @psalm-var array<string, string>
|
||||
* @var list<string>
|
||||
*/
|
||||
private $fallbackDirsPsr4 = array();
|
||||
|
||||
// PSR-0
|
||||
/**
|
||||
* @var array[]
|
||||
* @psalm-var array<string, array<string, string[]>>
|
||||
* List of PSR-0 prefixes
|
||||
*
|
||||
* Structured as array('F (first letter)' => array('Foo\Bar (full prefix)' => array('path', 'path2')))
|
||||
*
|
||||
* @var array<string, array<string, list<string>>>
|
||||
*/
|
||||
private $prefixesPsr0 = array();
|
||||
/**
|
||||
* @var array[]
|
||||
* @psalm-var array<string, string>
|
||||
* @var list<string>
|
||||
*/
|
||||
private $fallbackDirsPsr0 = array();
|
||||
|
||||
|
@ -81,8 +80,7 @@ class ClassLoader
|
|||
private $useIncludePath = false;
|
||||
|
||||
/**
|
||||
* @var string[]
|
||||
* @psalm-var array<string, string>
|
||||
* @var array<string, string>
|
||||
*/
|
||||
private $classMap = array();
|
||||
|
||||
|
@ -90,21 +88,20 @@ class ClassLoader
|
|||
private $classMapAuthoritative = false;
|
||||
|
||||
/**
|
||||
* @var bool[]
|
||||
* @psalm-var array<string, bool>
|
||||
* @var array<string, bool>
|
||||
*/
|
||||
private $missingClasses = array();
|
||||
|
||||
/** @var ?string */
|
||||
/** @var string|null */
|
||||
private $apcuPrefix;
|
||||
|
||||
/**
|
||||
* @var self[]
|
||||
* @var array<string, self>
|
||||
*/
|
||||
private static $registeredLoaders = array();
|
||||
|
||||
/**
|
||||
* @param ?string $vendorDir
|
||||
* @param string|null $vendorDir
|
||||
*/
|
||||
public function __construct($vendorDir = null)
|
||||
{
|
||||
|
@ -113,7 +110,7 @@ class ClassLoader
|
|||
}
|
||||
|
||||
/**
|
||||
* @return string[]
|
||||
* @return array<string, list<string>>
|
||||
*/
|
||||
public function getPrefixes()
|
||||
{
|
||||
|
@ -125,8 +122,7 @@ class ClassLoader
|
|||
}
|
||||
|
||||
/**
|
||||
* @return array[]
|
||||
* @psalm-return array<string, array<int, string>>
|
||||
* @return array<string, list<string>>
|
||||
*/
|
||||
public function getPrefixesPsr4()
|
||||
{
|
||||
|
@ -134,8 +130,7 @@ class ClassLoader
|
|||
}
|
||||
|
||||
/**
|
||||
* @return array[]
|
||||
* @psalm-return array<string, string>
|
||||
* @return list<string>
|
||||
*/
|
||||
public function getFallbackDirs()
|
||||
{
|
||||
|
@ -143,8 +138,7 @@ class ClassLoader
|
|||
}
|
||||
|
||||
/**
|
||||
* @return array[]
|
||||
* @psalm-return array<string, string>
|
||||
* @return list<string>
|
||||
*/
|
||||
public function getFallbackDirsPsr4()
|
||||
{
|
||||
|
@ -152,8 +146,7 @@ class ClassLoader
|
|||
}
|
||||
|
||||
/**
|
||||
* @return string[] Array of classname => path
|
||||
* @psalm-return array<string, string>
|
||||
* @return array<string, string> Array of classname => path
|
||||
*/
|
||||
public function getClassMap()
|
||||
{
|
||||
|
@ -161,8 +154,7 @@ class ClassLoader
|
|||
}
|
||||
|
||||
/**
|
||||
* @param string[] $classMap Class to filename map
|
||||
* @psalm-param array<string, string> $classMap
|
||||
* @param array<string, string> $classMap Class to filename map
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
@ -179,24 +171,25 @@ class ClassLoader
|
|||
* Registers a set of PSR-0 directories for a given prefix, either
|
||||
* appending or prepending to the ones previously set for this prefix.
|
||||
*
|
||||
* @param string $prefix The prefix
|
||||
* @param string[]|string $paths The PSR-0 root directories
|
||||
* @param bool $prepend Whether to prepend the directories
|
||||
* @param string $prefix The prefix
|
||||
* @param list<string>|string $paths The PSR-0 root directories
|
||||
* @param bool $prepend Whether to prepend the directories
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function add($prefix, $paths, $prepend = false)
|
||||
{
|
||||
$paths = (array) $paths;
|
||||
if (!$prefix) {
|
||||
if ($prepend) {
|
||||
$this->fallbackDirsPsr0 = array_merge(
|
||||
(array) $paths,
|
||||
$paths,
|
||||
$this->fallbackDirsPsr0
|
||||
);
|
||||
} else {
|
||||
$this->fallbackDirsPsr0 = array_merge(
|
||||
$this->fallbackDirsPsr0,
|
||||
(array) $paths
|
||||
$paths
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -205,19 +198,19 @@ class ClassLoader
|
|||
|
||||
$first = $prefix[0];
|
||||
if (!isset($this->prefixesPsr0[$first][$prefix])) {
|
||||
$this->prefixesPsr0[$first][$prefix] = (array) $paths;
|
||||
$this->prefixesPsr0[$first][$prefix] = $paths;
|
||||
|
||||
return;
|
||||
}
|
||||
if ($prepend) {
|
||||
$this->prefixesPsr0[$first][$prefix] = array_merge(
|
||||
(array) $paths,
|
||||
$paths,
|
||||
$this->prefixesPsr0[$first][$prefix]
|
||||
);
|
||||
} else {
|
||||
$this->prefixesPsr0[$first][$prefix] = array_merge(
|
||||
$this->prefixesPsr0[$first][$prefix],
|
||||
(array) $paths
|
||||
$paths
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -226,9 +219,9 @@ class ClassLoader
|
|||
* Registers a set of PSR-4 directories for a given namespace, either
|
||||
* appending or prepending to the ones previously set for this namespace.
|
||||
*
|
||||
* @param string $prefix The prefix/namespace, with trailing '\\'
|
||||
* @param string[]|string $paths The PSR-4 base directories
|
||||
* @param bool $prepend Whether to prepend the directories
|
||||
* @param string $prefix The prefix/namespace, with trailing '\\'
|
||||
* @param list<string>|string $paths The PSR-4 base directories
|
||||
* @param bool $prepend Whether to prepend the directories
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
*
|
||||
|
@ -236,17 +229,18 @@ class ClassLoader
|
|||
*/
|
||||
public function addPsr4($prefix, $paths, $prepend = false)
|
||||
{
|
||||
$paths = (array) $paths;
|
||||
if (!$prefix) {
|
||||
// Register directories for the root namespace.
|
||||
if ($prepend) {
|
||||
$this->fallbackDirsPsr4 = array_merge(
|
||||
(array) $paths,
|
||||
$paths,
|
||||
$this->fallbackDirsPsr4
|
||||
);
|
||||
} else {
|
||||
$this->fallbackDirsPsr4 = array_merge(
|
||||
$this->fallbackDirsPsr4,
|
||||
(array) $paths
|
||||
$paths
|
||||
);
|
||||
}
|
||||
} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
|
||||
|
@ -256,18 +250,18 @@ class ClassLoader
|
|||
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
||||
}
|
||||
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
|
||||
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
||||
$this->prefixDirsPsr4[$prefix] = $paths;
|
||||
} elseif ($prepend) {
|
||||
// Prepend directories for an already registered namespace.
|
||||
$this->prefixDirsPsr4[$prefix] = array_merge(
|
||||
(array) $paths,
|
||||
$paths,
|
||||
$this->prefixDirsPsr4[$prefix]
|
||||
);
|
||||
} else {
|
||||
// Append directories for an already registered namespace.
|
||||
$this->prefixDirsPsr4[$prefix] = array_merge(
|
||||
$this->prefixDirsPsr4[$prefix],
|
||||
(array) $paths
|
||||
$paths
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -276,8 +270,8 @@ class ClassLoader
|
|||
* Registers a set of PSR-0 directories for a given prefix,
|
||||
* replacing any others previously set for this prefix.
|
||||
*
|
||||
* @param string $prefix The prefix
|
||||
* @param string[]|string $paths The PSR-0 base directories
|
||||
* @param string $prefix The prefix
|
||||
* @param list<string>|string $paths The PSR-0 base directories
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
@ -294,8 +288,8 @@ class ClassLoader
|
|||
* Registers a set of PSR-4 directories for a given namespace,
|
||||
* replacing any others previously set for this namespace.
|
||||
*
|
||||
* @param string $prefix The prefix/namespace, with trailing '\\'
|
||||
* @param string[]|string $paths The PSR-4 base directories
|
||||
* @param string $prefix The prefix/namespace, with trailing '\\'
|
||||
* @param list<string>|string $paths The PSR-4 base directories
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
*
|
||||
|
@ -481,9 +475,9 @@ class ClassLoader
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns the currently registered loaders indexed by their corresponding vendor directories.
|
||||
* Returns the currently registered loaders keyed by their corresponding vendor directories.
|
||||
*
|
||||
* @return self[]
|
||||
* @return array<string, self>
|
||||
*/
|
||||
public static function getRegisteredLoaders()
|
||||
{
|
||||
|
|
|
@ -64,12 +64,12 @@ OC.L10N.register(
|
|||
"If the installation from the App Store fails, you can still do that manually using this command:" : "Se a instalación dende a Tenda de aplicacións falla, aínda pode facelo manualmente usando esta orde:",
|
||||
"Use a demo server" : "Usar un servidor de demostración",
|
||||
"You can use a demo server provided by Collabora and other service providers for giving Collabora Online a try." : "Pode usar un servidor de demostración proporcionado por Collabora e outros provedores de servizos para probar o Collabora Online.",
|
||||
"Your Nextcloud setup is not capable of connecting to the demo servers because:" : "A súa configuración do Nextcloud non é quen de conectarse aos servidores de demostración porque:",
|
||||
"Your Nextcloud setup is not capable of connecting to the demo servers because:" : "A súa configuración de Nextcloud non é quen de conectarse aos servidores de demostración porque:",
|
||||
"it is a local setup (localhost)" : "é un axuste local (localhost)",
|
||||
"it uses an insecure protocol (HTTP)" : "usa un protocolo inseguro (HTTP)",
|
||||
"it is unreachable from the internet (possibly because of a firewall, or lack of port forwarding)" : "non é accesíbel dende a Internet (posibelmente por mor unha devasa ou a falta de reenvío de portos)",
|
||||
"For use cases like this, we offer instructions for a" : "Para casos como este, ofrecemos instrucións para un",
|
||||
"Quick tryout with Nextcloud docker." : "Proba rápida co Nextcloud docker.",
|
||||
"Quick tryout with Nextcloud docker." : "Proba rápida con Nextcloud docker.",
|
||||
"Loading available demo servers …" : "Cargando servidores de demostración dispoñíbeis…",
|
||||
"No available demo servers found." : "Non se atoparon servidores de demostración dispoñíbeis…",
|
||||
"Documents opened with the demo server configured will be sent to a 3rd party server. Only use this for evaluating Collabora Online." : "Os documentos abertos co servidor de demostración configurado enviaranse a un servidor de terceiros. Empregue isto só para avaliar Collabora Online.",
|
||||
|
@ -201,7 +201,7 @@ OC.L10N.register(
|
|||
"template preview" : "Vista previa do modelo",
|
||||
"Select a template directory" : "Seleccionar un directorio de modelos",
|
||||
"Remove personal template folder" : "Retirar o cartafol de modelos persoais",
|
||||
"Templates inside of this directory will be added to the template selector of Nextcloud Office." : "Os modelos dentro deste directorio engádense ao selector de modelos do Nextcloud Office.",
|
||||
"Templates inside of this directory will be added to the template selector of Nextcloud Office." : "Os modelos dentro deste directorio engádense ao selector de modelos de Nextcloud Office.",
|
||||
"Zotero" : "Zotero",
|
||||
"Enter Zotero API Key" : "Introduza a chave da API de Zotero",
|
||||
"Save Zotero API key" : "Gardar a chave da API de Zotero",
|
||||
|
|
|
@ -62,12 +62,12 @@
|
|||
"If the installation from the App Store fails, you can still do that manually using this command:" : "Se a instalación dende a Tenda de aplicacións falla, aínda pode facelo manualmente usando esta orde:",
|
||||
"Use a demo server" : "Usar un servidor de demostración",
|
||||
"You can use a demo server provided by Collabora and other service providers for giving Collabora Online a try." : "Pode usar un servidor de demostración proporcionado por Collabora e outros provedores de servizos para probar o Collabora Online.",
|
||||
"Your Nextcloud setup is not capable of connecting to the demo servers because:" : "A súa configuración do Nextcloud non é quen de conectarse aos servidores de demostración porque:",
|
||||
"Your Nextcloud setup is not capable of connecting to the demo servers because:" : "A súa configuración de Nextcloud non é quen de conectarse aos servidores de demostración porque:",
|
||||
"it is a local setup (localhost)" : "é un axuste local (localhost)",
|
||||
"it uses an insecure protocol (HTTP)" : "usa un protocolo inseguro (HTTP)",
|
||||
"it is unreachable from the internet (possibly because of a firewall, or lack of port forwarding)" : "non é accesíbel dende a Internet (posibelmente por mor unha devasa ou a falta de reenvío de portos)",
|
||||
"For use cases like this, we offer instructions for a" : "Para casos como este, ofrecemos instrucións para un",
|
||||
"Quick tryout with Nextcloud docker." : "Proba rápida co Nextcloud docker.",
|
||||
"Quick tryout with Nextcloud docker." : "Proba rápida con Nextcloud docker.",
|
||||
"Loading available demo servers …" : "Cargando servidores de demostración dispoñíbeis…",
|
||||
"No available demo servers found." : "Non se atoparon servidores de demostración dispoñíbeis…",
|
||||
"Documents opened with the demo server configured will be sent to a 3rd party server. Only use this for evaluating Collabora Online." : "Os documentos abertos co servidor de demostración configurado enviaranse a un servidor de terceiros. Empregue isto só para avaliar Collabora Online.",
|
||||
|
@ -199,7 +199,7 @@
|
|||
"template preview" : "Vista previa do modelo",
|
||||
"Select a template directory" : "Seleccionar un directorio de modelos",
|
||||
"Remove personal template folder" : "Retirar o cartafol de modelos persoais",
|
||||
"Templates inside of this directory will be added to the template selector of Nextcloud Office." : "Os modelos dentro deste directorio engádense ao selector de modelos do Nextcloud Office.",
|
||||
"Templates inside of this directory will be added to the template selector of Nextcloud Office." : "Os modelos dentro deste directorio engádense ao selector de modelos de Nextcloud Office.",
|
||||
"Zotero" : "Zotero",
|
||||
"Enter Zotero API Key" : "Introduza a chave da API de Zotero",
|
||||
"Save Zotero API key" : "Gardar a chave da API de Zotero",
|
||||
|
|
Загрузка…
Ссылка в новой задаче